Skip to content

Commit

Permalink
Kubernetes V1.30.0-k3s1 (#10063)
Browse files Browse the repository at this point in the history
* kubernetes 1.30.0-k3s1

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Update go version to v1.22.2

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* update dynamiclistener and helm-controller

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* update go in go.mod to 1.22.2

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* update go in Dockerfiles

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* update cri-dockerd

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add proctitle package with linux and windows constraints

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* go mod tidy

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Fixing setproctitle function

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* update dynamiclistener to v0.6.0-rc1

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
  • Loading branch information
galal-hussein committed May 6, 2024
1 parent fe7d114 commit 144f5ad
Show file tree
Hide file tree
Showing 55 changed files with 322 additions and 290 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.dapper
@@ -1,4 +1,4 @@
ARG GOLANG=golang:1.21.9-alpine3.18
ARG GOLANG=golang:1.22.2-alpine3.18
FROM ${GOLANG}

# Set proxy environment variables
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.local
@@ -1,4 +1,4 @@
ARG GOLANG=golang:1.21.9-alpine3.18
ARG GOLANG=golang:1.22.2-alpine3.18
FROM ${GOLANG} as infra

ARG http_proxy=$http_proxy
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.manifest
@@ -1,4 +1,4 @@
ARG GOLANG=golang:1.21.9-alpine3.18
ARG GOLANG=golang:1.22.2-alpine3.18
FROM ${GOLANG}

COPY --from=plugins/manifest:1.2.3 /bin/* /bin/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.test
@@ -1,4 +1,4 @@
ARG GOLANG=golang:1.21.9-alpine3.18
ARG GOLANG=golang:1.22.2-alpine3.18
FROM ${GOLANG} as test-base

RUN apk -U --no-cache add bash jq
Expand Down
2 changes: 1 addition & 1 deletion cmd/k3s/main.go
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/k3s-io/k3s/pkg/untar"
"github.com/k3s-io/k3s/pkg/version"
"github.com/pkg/errors"
"github.com/rancher/wrangler/pkg/resolvehome"
"github.com/rancher/wrangler/v3/pkg/resolvehome"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
"github.com/urfave/cli"
Expand Down
144 changes: 66 additions & 78 deletions go.mod

Large diffs are not rendered by default.

220 changes: 99 additions & 121 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hack/crdgen.go
Expand Up @@ -5,7 +5,7 @@ import (

k3scrd "github.com/k3s-io/k3s/pkg/crd"
_ "github.com/k3s-io/k3s/pkg/generated/controllers/k3s.cattle.io/v1"
"github.com/rancher/wrangler/pkg/crd"
"github.com/rancher/wrangler/v3/pkg/crd"
)

func main() {
Expand Down
1 change: 1 addition & 0 deletions main.go
Expand Up @@ -48,6 +48,7 @@ func main() {
secretsencrypt.RotateKeys,
),
cmds.NewCertCommands(
cert.Check,
cert.Rotate,
cert.RotateCA,
),
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/config/config.go
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/k3s-io/k3s/pkg/vpn"
"github.com/pkg/errors"
"github.com/rancher/wharfie/pkg/registries"
"github.com/rancher/wrangler/pkg/slice"
"github.com/rancher/wrangler/v3/pkg/slice"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/json"
"k8s.io/apimachinery/pkg/util/wait"
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/containerd/containerd.go
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/natefinch/lumberjack"
"github.com/pkg/errors"
"github.com/rancher/wharfie/pkg/tarfile"
"github.com/rancher/wrangler/pkg/merr"
"github.com/rancher/wrangler/v3/pkg/merr"
"github.com/sirupsen/logrus"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/certmonitor/certmonitor.go
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/k3s-io/k3s/pkg/version"
"github.com/prometheus/client_golang/prometheus"
certutil "github.com/rancher/dynamiclistener/cert"
"github.com/rancher/wrangler/pkg/merr"
"github.com/rancher/wrangler/v3/pkg/merr"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/agent/agent.go
Expand Up @@ -9,17 +9,17 @@ import (
"path/filepath"
"runtime"

"github.com/erikdubbelboer/gspt"
"github.com/gorilla/mux"
"github.com/k3s-io/k3s/pkg/agent"
"github.com/k3s-io/k3s/pkg/authenticator"
"github.com/k3s-io/k3s/pkg/cli/cmds"
"github.com/k3s-io/k3s/pkg/datadir"
"github.com/k3s-io/k3s/pkg/proctitle"
"github.com/k3s-io/k3s/pkg/spegel"
"github.com/k3s-io/k3s/pkg/util"
"github.com/k3s-io/k3s/pkg/version"
"github.com/k3s-io/k3s/pkg/vpn"
"github.com/rancher/wrangler/pkg/signals"
"github.com/rancher/wrangler/v3/pkg/signals"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
apiauth "k8s.io/apiserver/pkg/authentication/authenticator"
Expand All @@ -31,7 +31,7 @@ func Run(ctx *cli.Context) error {

// hide process arguments from ps output, since they may contain
// database credentials or other secrets.
gspt.SetProcTitle(os.Args[0] + " agent")
proctitle.SetProcTitle(os.Args[0] + " agent")

// Evacuate cgroup v2 before doing anything else that may fork.
if err := cmds.EvacuateCgroup2(); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/cert/cert.go
Expand Up @@ -8,14 +8,14 @@ import (
"strings"
"time"

"github.com/erikdubbelboer/gspt"
"github.com/k3s-io/k3s/pkg/agent/util"
"github.com/k3s-io/k3s/pkg/bootstrap"
"github.com/k3s-io/k3s/pkg/cli/cmds"
"github.com/k3s-io/k3s/pkg/clientaccess"
"github.com/k3s-io/k3s/pkg/daemons/config"
"github.com/k3s-io/k3s/pkg/daemons/control/deps"
"github.com/k3s-io/k3s/pkg/datadir"
"github.com/k3s-io/k3s/pkg/proctitle"
"github.com/k3s-io/k3s/pkg/server"
"github.com/k3s-io/k3s/pkg/util/services"
"github.com/k3s-io/k3s/pkg/version"
Expand All @@ -27,7 +27,7 @@ import (
)

func commandSetup(app *cli.Context, cfg *cmds.Server, sc *server.Config) (string, error) {
gspt.SetProcTitle(os.Args[0])
proctitle.SetProcTitle(os.Args[0])

dataDir, err := datadir.Resolve(cfg.DataDir)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/cmds/log_linux.go
Expand Up @@ -11,7 +11,7 @@ import (
"syscall"

systemd "github.com/coreos/go-systemd/v22/daemon"
"github.com/erikdubbelboer/gspt"
"github.com/k3s-io/k3s/pkg/proctitle"
"github.com/k3s-io/k3s/pkg/version"
"github.com/natefinch/lumberjack"
"github.com/pkg/errors"
Expand Down Expand Up @@ -42,7 +42,7 @@ func forkIfLoggingOrReaping() error {
}

if enableLogRedirect || enableReaping {
gspt.SetProcTitle(os.Args[0] + " init")
proctitle.SetProcTitle(os.Args[0] + " init")

pwd, err := os.Getwd()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/etcdsnapshot/etcd_snapshot.go
Expand Up @@ -12,12 +12,12 @@ import (
"text/tabwriter"
"time"

"github.com/erikdubbelboer/gspt"
k3s "github.com/k3s-io/k3s/pkg/apis/k3s.cattle.io/v1"
"github.com/k3s-io/k3s/pkg/cli/cmds"
"github.com/k3s-io/k3s/pkg/clientaccess"
"github.com/k3s-io/k3s/pkg/cluster/managed"
"github.com/k3s-io/k3s/pkg/etcd"
"github.com/k3s-io/k3s/pkg/proctitle"
"github.com/k3s-io/k3s/pkg/server"
util2 "github.com/k3s-io/k3s/pkg/util"
"github.com/pkg/errors"
Expand All @@ -34,7 +34,7 @@ var timeout = 2 * time.Minute
func commandSetup(app *cli.Context, cfg *cmds.Server) (*etcd.SnapshotRequest, *clientaccess.Info, error) {
// hide process arguments from ps output, since they may contain
// database credentials or other secrets.
gspt.SetProcTitle(os.Args[0] + " etcd-snapshot")
proctitle.SetProcTitle(os.Args[0] + " etcd-snapshot")

sr := &etcd.SnapshotRequest{}
// Operation and name are set by the command handler.
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/secretsencrypt/secrets_encrypt.go
Expand Up @@ -10,9 +10,9 @@ import (
"text/tabwriter"
"time"

"github.com/erikdubbelboer/gspt"
"github.com/k3s-io/k3s/pkg/cli/cmds"
"github.com/k3s-io/k3s/pkg/clientaccess"
"github.com/k3s-io/k3s/pkg/proctitle"
"github.com/k3s-io/k3s/pkg/secretsencrypt"
"github.com/k3s-io/k3s/pkg/server"
"github.com/k3s-io/k3s/pkg/version"
Expand All @@ -24,7 +24,7 @@ import (
func commandPrep(cfg *cmds.Server) (*clientaccess.Info, error) {
// hide process arguments from ps output, since they may contain
// database credentials or other secrets.
gspt.SetProcTitle(os.Args[0] + " secrets-encrypt")
proctitle.SetProcTitle(os.Args[0] + " secrets-encrypt")

dataDir, err := server.ResolveDataDir(cfg.DataDir)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/server/server.go
Expand Up @@ -10,7 +10,6 @@ import (
"time"

systemd "github.com/coreos/go-systemd/v22/daemon"
"github.com/erikdubbelboer/gspt"
"github.com/gorilla/mux"
"github.com/k3s-io/k3s/pkg/agent"
"github.com/k3s-io/k3s/pkg/agent/loadbalancer"
Expand All @@ -19,14 +18,15 @@ import (
"github.com/k3s-io/k3s/pkg/daemons/config"
"github.com/k3s-io/k3s/pkg/datadir"
"github.com/k3s-io/k3s/pkg/etcd"
"github.com/k3s-io/k3s/pkg/proctitle"
"github.com/k3s-io/k3s/pkg/rootless"
"github.com/k3s-io/k3s/pkg/server"
"github.com/k3s-io/k3s/pkg/spegel"
"github.com/k3s-io/k3s/pkg/util"
"github.com/k3s-io/k3s/pkg/version"
"github.com/k3s-io/k3s/pkg/vpn"
"github.com/pkg/errors"
"github.com/rancher/wrangler/pkg/signals"
"github.com/rancher/wrangler/v3/pkg/signals"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
utilnet "k8s.io/apimachinery/pkg/util/net"
Expand Down Expand Up @@ -55,7 +55,7 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont

// hide process arguments from ps output, since they may contain
// database credentials or other secrets.
gspt.SetProcTitle(os.Args[0] + " server")
proctitle.SetProcTitle(os.Args[0] + " server")

// If the agent is enabled, evacuate cgroup v2 before doing anything else that may fork.
// If the agent is disabled, we don't need to bother doing this as it is only the kubelet
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/token/token.go
Expand Up @@ -11,10 +11,10 @@ import (
"text/tabwriter"
"time"

"github.com/erikdubbelboer/gspt"
"github.com/k3s-io/k3s/pkg/cli/cmds"
"github.com/k3s-io/k3s/pkg/clientaccess"
"github.com/k3s-io/k3s/pkg/kubeadm"
"github.com/k3s-io/k3s/pkg/proctitle"
"github.com/k3s-io/k3s/pkg/server"
"github.com/k3s-io/k3s/pkg/util"
"github.com/k3s-io/k3s/pkg/version"
Expand Down Expand Up @@ -171,7 +171,7 @@ func Rotate(app *cli.Context) error {

func serverAccess(cfg *cmds.Token) (*clientaccess.Info, error) {
// hide process arguments from ps output, since they likely contain tokens.
gspt.SetProcTitle(os.Args[0] + " token")
proctitle.SetProcTitle(os.Args[0] + " token")

dataDir, err := server.ResolveDataDir("")
if err != nil {
Expand Down
18 changes: 9 additions & 9 deletions pkg/cloudprovider/cloudprovider.go
Expand Up @@ -7,15 +7,15 @@ import (

"github.com/k3s-io/k3s/pkg/util"
"github.com/k3s-io/k3s/pkg/version"
"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/generated/controllers/apps"
appsclient "github.com/rancher/wrangler/pkg/generated/controllers/apps/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
coreclient "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
"github.com/rancher/wrangler/pkg/generated/controllers/discovery"
discoveryclient "github.com/rancher/wrangler/pkg/generated/controllers/discovery/v1"
"github.com/rancher/wrangler/pkg/generic"
"github.com/rancher/wrangler/pkg/start"
"github.com/rancher/wrangler/v3/pkg/apply"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/apps"
appsclient "github.com/rancher/wrangler/v3/pkg/generated/controllers/apps/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/core"
coreclient "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/discovery"
discoveryclient "github.com/rancher/wrangler/v3/pkg/generated/controllers/discovery/v1"
"github.com/rancher/wrangler/v3/pkg/generic"
"github.com/rancher/wrangler/v3/pkg/start"
"github.com/sirupsen/logrus"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
Expand Down
10 changes: 5 additions & 5 deletions pkg/cloudprovider/servicelb.go
Expand Up @@ -10,11 +10,11 @@ import (

"github.com/k3s-io/k3s/pkg/util"
"github.com/k3s-io/k3s/pkg/version"
"github.com/rancher/wrangler/pkg/condition"
coreclient "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
discoveryclient "github.com/rancher/wrangler/pkg/generated/controllers/discovery/v1"
"github.com/rancher/wrangler/pkg/merr"
"github.com/rancher/wrangler/pkg/objectset"
"github.com/rancher/wrangler/v3/pkg/condition"
coreclient "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1"
discoveryclient "github.com/rancher/wrangler/v3/pkg/generated/controllers/discovery/v1"
"github.com/rancher/wrangler/v3/pkg/merr"
"github.com/rancher/wrangler/v3/pkg/objectset"
"github.com/sirupsen/logrus"
apps "k8s.io/api/apps/v1"
core "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/address_controller.go
Expand Up @@ -5,7 +5,7 @@ import (
"sync"

"github.com/k3s-io/k3s/pkg/util"
controllerv1 "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
controllerv1 "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1"
"github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/https.go
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/rancher/dynamiclistener/storage/file"
"github.com/rancher/dynamiclistener/storage/kubernetes"
"github.com/rancher/dynamiclistener/storage/memory"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/core"
"github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilsnet "k8s.io/utils/net"
Expand Down
2 changes: 1 addition & 1 deletion pkg/codegen/cleanup/main.go
@@ -1,7 +1,7 @@
package main

import (
"github.com/rancher/wrangler/pkg/cleanup"
"github.com/rancher/wrangler/v3/pkg/cleanup"
"github.com/sirupsen/logrus"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/codegen/main.go
Expand Up @@ -5,8 +5,8 @@ import (

bindata "github.com/go-bindata/go-bindata"
v1 "github.com/k3s-io/k3s/pkg/apis/k3s.cattle.io/v1"
controllergen "github.com/rancher/wrangler/pkg/controller-gen"
"github.com/rancher/wrangler/pkg/controller-gen/args"
controllergen "github.com/rancher/wrangler/v3/pkg/controller-gen"
"github.com/rancher/wrangler/v3/pkg/controller-gen/args"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/configfilearg/parser.go
Expand Up @@ -12,7 +12,7 @@ import (
"strings"

"github.com/k3s-io/k3s/pkg/agent/util"
"github.com/rancher/wrangler/pkg/data/convert"
"github.com/rancher/wrangler/v3/pkg/data/convert"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"gopkg.in/yaml.v2"
Expand Down
2 changes: 1 addition & 1 deletion pkg/crd/crds.go
Expand Up @@ -2,7 +2,7 @@ package crd

import (
v1 "github.com/k3s-io/k3s/pkg/apis/k3s.cattle.io/v1"
"github.com/rancher/wrangler/pkg/crd"
"github.com/rancher/wrangler/v3/pkg/crd"
)

func List() []crd.CRD {
Expand Down
4 changes: 2 additions & 2 deletions pkg/daemons/config/types.go
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/k3s-io/k3s/pkg/generated/controllers/k3s.cattle.io"
"github.com/k3s-io/kine/pkg/endpoint"
"github.com/rancher/wharfie/pkg/registries"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
"github.com/rancher/wrangler/pkg/leader"
"github.com/rancher/wrangler/v3/pkg/generated/controllers/core"
"github.com/rancher/wrangler/v3/pkg/leader"
utilnet "k8s.io/apimachinery/pkg/util/net"
"k8s.io/apiserver/pkg/authentication/authenticator"
"k8s.io/client-go/tools/record"
Expand Down
2 changes: 1 addition & 1 deletion pkg/daemons/control/deps/deps.go
Expand Up @@ -30,7 +30,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/apis/apiserver"
apiserverconfigv1 "k8s.io/apiserver/pkg/apis/config/v1"
apiserverconfigv1 "k8s.io/apiserver/pkg/apis/apiserver/v1"
"k8s.io/apiserver/pkg/authentication/user"
"k8s.io/client-go/util/keyutil"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/datadir/datadir.go
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/k3s-io/k3s/pkg/version"
"github.com/pkg/errors"
"github.com/rancher/wrangler/pkg/resolvehome"
"github.com/rancher/wrangler/v3/pkg/resolvehome"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions pkg/deploy/controller.go
Expand Up @@ -20,10 +20,10 @@ import (
controllersv1 "github.com/k3s-io/k3s/pkg/generated/controllers/k3s.cattle.io/v1"
pkgutil "github.com/k3s-io/k3s/pkg/util"
errors2 "github.com/pkg/errors"
"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/kv"
"github.com/rancher/wrangler/pkg/merr"
"github.com/rancher/wrangler/pkg/objectset"
"github.com/rancher/wrangler/v3/pkg/apply"
"github.com/rancher/wrangler/v3/pkg/kv"
"github.com/rancher/wrangler/v3/pkg/merr"
"github.com/rancher/wrangler/v3/pkg/objectset"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
2 changes: 1 addition & 1 deletion pkg/etcd/etcd.go
Expand Up @@ -33,7 +33,7 @@ import (
cp "github.com/otiai10/copy"
"github.com/pkg/errors"
certutil "github.com/rancher/dynamiclistener/cert"
controllerv1 "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
controllerv1 "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1"
"github.com/robfig/cron/v3"
"github.com/sirupsen/logrus"
"go.etcd.io/etcd/api/v3/etcdserverpb"
Expand Down

0 comments on commit 144f5ad

Please sign in to comment.