From 12adfebc2ca3bce31c9da7b783b44bfe017ce4b0 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Thu, 12 Oct 2023 08:59:35 -0700 Subject: [PATCH] Bump k3s, support token rotate Signed-off-by: Derek Nola --- go.mod | 63 ++++++++++---------- go.sum | 106 +++++++++++++++++----------------- pkg/cli/cmds/cert.go | 22 +------ pkg/cli/cmds/etcd_snapshot.go | 2 +- pkg/cli/cmds/token.go | 9 ++- pkg/cli/defaults/defaults.go | 2 +- 6 files changed, 96 insertions(+), 108 deletions(-) diff --git a/go.mod b/go.mod index c08fa13d36..34dcef1e24 100644 --- a/go.mod +++ b/go.mod @@ -50,41 +50,42 @@ replace ( google.golang.org/genproto => google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 google.golang.org/grpc => google.golang.org/grpc v1.51.0 gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2 - k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.26.8-k3s1 - k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.26.8-k3s1 - k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.26.8-k3s1 - k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.26.8-k3s1 - k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.26.8-k3s1 - k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.26.8-k3s1 - k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.26.8-k3s1 - k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.26.8-k3s1 - k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.26.8-k3s1 - k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.26.8-k3s1 - k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.26.8-k3s1 - k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.26.8-k3s1 + k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.26.9-k3s1 + k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.26.9-k3s1 + k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.26.9-k3s1 + k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.26.9-k3s1 + k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.26.9-k3s1 + k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.26.9-k3s1 + k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.26.9-k3s1 + k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.26.9-k3s1 + k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.26.9-k3s1 + k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.26.9-k3s1 + k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.26.9-k3s1 + k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.26.9-k3s1 k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.27.1-k3s1 - k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.26.8-k3s1 - k8s.io/dynamic-resource-allocation => github.com/k3s-io/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.26.8-k3s1 + k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.26.9-k3s1 + k8s.io/dynamic-resource-allocation => github.com/k3s-io/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.26.9-k3s1 k8s.io/klog => github.com/k3s-io/klog v1.0.0-k3s2 // k3s-release-1.x k8s.io/klog/v2 => github.com/k3s-io/klog/v2 v2.80.1-k3s1 // k3s-main - k8s.io/kms => github.com/k3s-io/kubernetes/staging/src/k8s.io/kms v1.26.8-k3s1 - k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.26.8-k3s1 - k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.26.8-k3s1 + k8s.io/kms => github.com/k3s-io/kubernetes/staging/src/k8s.io/kms v1.26.9-k3s1 + k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.26.9-k3s1 + k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.26.9-k3s1 k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 - k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.26.8-k3s1 - k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.26.8-k3s1 - k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.26.8-k3s1 - k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.26.8-k3s1 - k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.26.8-k3s1 - k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.26.8-k3s1 - k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.26.8-k3s1 - k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.26.8-k3s1 - k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.26.8-k3s1 - k8s.io/pod-security-admission => github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.26.8-k3s1 - k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.26.8-k3s1 - k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.26.8-k3s1 - k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.26.8-k3s1 + k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.26.9-k3s1 + k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.26.9-k3s1 + k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.26.9-k3s1 + k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.26.9-k3s1 + k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.26.9-k3s1 + k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.26.9-k3s1 + k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.26.9-k3s1 + k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.26.9-k3s1 + k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.26.9-k3s1 + k8s.io/pod-security-admission => github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.26.9-k3s1 + k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.26.9-k3s1 + k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.26.9-k3s1 + k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.26.9-k3s1 mvdan.cc/unparam => mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 + vbom.ml/util => github.com/fvbommel/util v0.0.3 // github.com/tigera/operator using old repo ) require ( @@ -94,7 +95,7 @@ require ( github.com/google/go-containerregistry v0.14.0 github.com/iamacarpet/go-win64api v0.0.0-20210311141720-fe38760bed28 github.com/k3s-io/helm-controller v0.15.4 - github.com/k3s-io/k3s v1.26.10-0.20231006204049-db869dfc2386 // release-1.26 + github.com/k3s-io/k3s v1.26.10-0.20231011231744-ad6579a43f9c // release-1.26 github.com/libp2p/go-netroute v0.2.0 github.com/natefinch/lumberjack v2.0.0+incompatible github.com/onsi/ginkgo/v2 v2.11.0 diff --git a/go.sum b/go.sum index 09ef8ec309..650a33cade 100644 --- a/go.sum +++ b/go.sum @@ -203,6 +203,7 @@ github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2y github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= github.com/bronze1man/goStrongswanVici v0.0.0-20201105010758-936f38b697fd h1:qn6a8rGrW+7p4ghypmYHZUKewXURuUDYxKqZxEoFjPc= github.com/bronze1man/goStrongswanVici v0.0.0-20201105010758-936f38b697fd/go.mod h1:fWUtBEPt2yjrr3WFhOqvajM8JSEU8bEeBcoeSCsKRpc= +github.com/bruth/assert v0.0.0-20130823105606-de420fa3b72e/go.mod h1:MT8TZkfLPRir91B19sXF7pmKBma+n6ecyjbqgXabchs= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= @@ -444,6 +445,7 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/fsouza/go-dockerclient v0.0.0-20171004212419-da3951ba2e9e/go.mod h1:KpcjM623fQYE9MZiTGzKhjfxXAV9wbyX2C1cyRHfhl0= github.com/fullstorydev/grpcurl v1.8.0/go.mod h1:Mn2jWbdMrQGJQ8UD62uNyMumT2acsZUCkZIqFxsQf1o= github.com/fullstorydev/grpcurl v1.8.1/go.mod h1:3BWhvHZwNO7iLXaQlojdg5NA6SxUDePli4ecpK1N7gw= +github.com/fvbommel/util v0.0.3/go.mod h1:izA2AZeYyvrB6Qo1T9wenVzrx1Clqo3ReUreqM8o5t8= github.com/getsentry/raven-go v0.0.0-20190513200303-c977f96e1095/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= @@ -569,7 +571,6 @@ github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cadvisor v0.46.1 h1:zCOqaAOS4LvAEldLFc0KrbsDX/AFIDRI1X2WtJSwgmg= github.com/google/cadvisor v0.46.1/go.mod h1:YnCDnR8amaS0HoMEjheOI0TMPzFKCBLc30mciLEjwGI= -github.com/google/cel-go v0.12.6/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= github.com/google/cel-go v0.12.7 h1:jM6p55R0MKBg79hZjn1zs2OlrywZ1Vk00rxVvad1/O0= github.com/google/cel-go v0.12.7/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= @@ -824,8 +825,8 @@ github.com/k3s-io/etcd/server/v3 v3.5.9-k3s1 h1:B3039IkTPnwQEt4tIMjC6yd6b1Q3Z9ZZ github.com/k3s-io/etcd/server/v3 v3.5.9-k3s1/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= github.com/k3s-io/helm-controller v0.15.4 h1:l4DWmUWpphbtwmuXGtpr5Rql/2NaCLSv4ZD8HlND9uY= github.com/k3s-io/helm-controller v0.15.4/go.mod h1:BgCPBQblj/Ect4Q7/Umf86WvyDjdG/34D+n8wfXtoeM= -github.com/k3s-io/k3s v1.26.10-0.20231006204049-db869dfc2386 h1:z+9bveygO9gsUgavuR6vhzf1yZB/EAkkrhIliPuB/BI= -github.com/k3s-io/k3s v1.26.10-0.20231006204049-db869dfc2386/go.mod h1:R7mePvt4oJ//q0Q0sRWvp3WpBTfZITaWduTopJxJkaM= +github.com/k3s-io/k3s v1.26.10-0.20231011231744-ad6579a43f9c h1:n83JjtxdHULzZu/V6knvytOFGaTD1fDELA2Ik+NmKM4= +github.com/k3s-io/k3s v1.26.10-0.20231011231744-ad6579a43f9c/go.mod h1:R7mePvt4oJ//q0Q0sRWvp3WpBTfZITaWduTopJxJkaM= github.com/k3s-io/kine v0.10.3 h1:OamjhtcQnK7zpzbiUDvXXKaAwdkXIuzr+nuyFWSC1ZA= github.com/k3s-io/kine v0.10.3/go.mod h1:hiOK3Gj89Py+AB11YK0fxEwkdWxBvNfaMt8PRWXqh6M= github.com/k3s-io/klog v1.0.0-k3s2 h1:yyvD2bQbxG7m85/pvNctLX2bUDmva5kOBvuZ77tTGBA= @@ -834,57 +835,57 @@ github.com/k3s-io/klog/v2 v2.80.1-k3s1 h1:mGMXURxxmabQurmtRhXuQTJ9jC0pvIhESSxRSy github.com/k3s-io/klog/v2 v2.80.1-k3s1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= github.com/k3s-io/kube-router/v2 v2.0.1-0.20230508174102-b42e5faded1c h1:7IaKAByGXNvZAmhYlaHH2LiqOGWtPNVg8vKV1Xvlrek= github.com/k3s-io/kube-router/v2 v2.0.1-0.20230508174102-b42e5faded1c/go.mod h1:zhLSRTL1M+0BqeDTRzT42ZtlFJH/d9xaGvXGQR4c2Gc= -github.com/k3s-io/kubernetes v1.26.8-k3s1 h1:d0I9SEQCe2vilxiS9JXz8p1HNB9vB8lhr9u7G/YTgj4= -github.com/k3s-io/kubernetes v1.26.8-k3s1/go.mod h1:EBE8dfGfk2sZ3yzZVQjr1wQ/k28/wwaajL/1+77Cjmg= -github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.26.8-k3s1 h1:gS4kucc+D21BKul2s3YiBpRr7dfTmNxmFbaXSfk8EW0= -github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.26.8-k3s1/go.mod h1:+1vthlCPcGuQBmdFWFiVdyeGaK8uH+5GSSzchUjaxvI= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.26.8-k3s1 h1:5eAPlW5l+kXY7HZmsC1dERB+mIiTgIbArtfbX7he6DE= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.26.8-k3s1/go.mod h1:HFumXasEmeKBnmKAliCZlE5B7krxtrFsQAoFWFg43jQ= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.26.8-k3s1 h1:LwS6QcLnKFY5LfTQVOZKf7zTUeCxCGPIuq0q6cQfWq0= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.26.8-k3s1/go.mod h1:jFMaz5omYbyXTZUPTxoZTXH38xeWPCHTxEh8SxuYYfg= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.26.8-k3s1 h1:gky2wzYBjD7RbEjqou07G/aEZ4UoskZx5j5xGXBsJek= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.26.8-k3s1/go.mod h1:5FtWmu+JdP58ZKOO6KexHXgYz6MD0JwbjDx9dMknCqY= -github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.26.8-k3s1 h1:9xomZ3bqJj9Kgk3elgTlNTKQnEc8QAfl67DmYDNrw5w= -github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.26.8-k3s1/go.mod h1:x5AIiu7opvyBj6kx8imTadewvJIFIR8xcbnVUE9pgwc= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.26.8-k3s1 h1:RJigBq+I566QAvaMK80rdAPl63zc2FmuxAiacwfQ3uM= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.26.8-k3s1/go.mod h1:JpIrGooKmHj6LUJjoLKIuy5CR1GihpCa0ABDnkU4Jzo= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.26.8-k3s1 h1:KpRJ7c0olcV1EAdeDS+Xch7nf6JGBBLQ23qDCFNP+L0= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.26.8-k3s1/go.mod h1:mO56uSYIeUeenOwbdZz7phwT7jGU5pNbdwDcEG4Q06c= -github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.26.8-k3s1/go.mod h1:A6qAGH7iuQhRbEoCGfyTfhUADlZ6VczOZifemPd14pk= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.26.8-k3s1 h1:Qh2gphPhSWRI7CCCtfnMWCmHRwvwvHDeaapIRQXd3WE= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.26.8-k3s1/go.mod h1:a+8wWkJkZ9wTcF6CRkrgkMBGuLqzA6tYBnqpyi3KM7o= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.26.8-k3s1 h1:AMoM+xujg1o39cufNBxz3wxNOywy0ZndkKU5s8KIHeY= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.26.8-k3s1/go.mod h1:uSavDCHjDVCetgmpM/UGdTFEYm8rQ8XVcZEWaeq3Z5Y= -github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.26.8-k3s1 h1:nVmfYGOI6M0g0SaQbeKV1aCyHXUZTIrDKUk6YJ4h3SI= -github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.26.8-k3s1/go.mod h1:e4AqUUuwFGbU+SCnm/F9bnlIhg1nrATrO/3Hgv5VkUw= +github.com/k3s-io/kubernetes v1.26.9-k3s1 h1:AyVyBBSDyLiJVK/HWBnoBafql+kOwpCXa2qHf7hBuc4= +github.com/k3s-io/kubernetes v1.26.9-k3s1/go.mod h1:gvP7bsbtu0/cA0ZBJqayLm9lS1PP3WCwrhQOAbpqsK8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.26.9-k3s1 h1:SE0mlM1hWvDay5P+YvFBSovwS5f7bJDM+IcgMTOXMqA= +github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.26.9-k3s1/go.mod h1:+1vthlCPcGuQBmdFWFiVdyeGaK8uH+5GSSzchUjaxvI= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.26.9-k3s1 h1:Rk75MODIDRsTPYqfPz9WzOUYCI7ghO+udXLRnjdjwbQ= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.26.9-k3s1/go.mod h1:f4y0J10YVXj/nSbir0bInYsA3Tvvp+TJ1m9tS5OO/v4= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.26.9-k3s1 h1:YlJpXK7oKHzilP+v9z3qk0J32vvrux9xZOX9DXNmJp4= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.26.9-k3s1/go.mod h1:jFMaz5omYbyXTZUPTxoZTXH38xeWPCHTxEh8SxuYYfg= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.26.9-k3s1 h1:ifyglL7T48kljQ2fXC+XIYrR2/rYIlmRXXgKNIj1ZHU= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.26.9-k3s1/go.mod h1:zQhsracqZGMhBcto5uGSlXsmBbs6TytWU8pr3ILDle8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.26.9-k3s1 h1:6FPthGEPNq6dow2ubbQLlhKdRKkLel13vbHJdKyEp2I= +github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.26.9-k3s1/go.mod h1:x5AIiu7opvyBj6kx8imTadewvJIFIR8xcbnVUE9pgwc= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.26.9-k3s1 h1:0WVA62tDMFfWmJOfueLVl3l6VksIeJhGX4JvvroxO3c= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.26.9-k3s1/go.mod h1:rTAm1dxkbIp/if9B/Scm/tkXiW5yswCnpmP4Uut/wcQ= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.26.9-k3s1 h1:Njp6aoNwMYwjde7+fbE9MmWe0K9Bj4OzfTNKf8vF5ZA= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.26.9-k3s1/go.mod h1:mO56uSYIeUeenOwbdZz7phwT7jGU5pNbdwDcEG4Q06c= +github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.26.9-k3s1/go.mod h1:A6qAGH7iuQhRbEoCGfyTfhUADlZ6VczOZifemPd14pk= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.26.9-k3s1 h1:9IYEy+KhUwHHRnm4o0cLOCH7S77eFJnGKkQ4tczgha8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.26.9-k3s1/go.mod h1:Q7yVHajUkntYvz2jcVokakDhH8PO9RZ7Jt8H9u41uac= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.26.9-k3s1 h1:J6VZSIUPM1GhnTu4VszT1iI5W0VzajsUMUSKeSAFkik= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.26.9-k3s1/go.mod h1:uSavDCHjDVCetgmpM/UGdTFEYm8rQ8XVcZEWaeq3Z5Y= +github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.26.9-k3s1 h1:K8W1qOeVIVjTT2IZ3MmXV2Mmw8agztYkLx0RvP0ZFdc= +github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.26.9-k3s1/go.mod h1:LXZVQA+vqiO+AmrCvt5y4j8K3lepHjJJmekXGhZk7KM= github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.27.1-k3s1 h1:9aR7csENNdVUzEVJxYVEUuFq4lIfgbObIKqJiISmOKw= github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.27.1-k3s1/go.mod h1:P3jQ0JFCbQmHTNdnpQ6+rgpBvHW5jRJdpY13LRFk9MY= -github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.26.8-k3s1 h1:LttbyReYckFaLF/rSUmSl0jOLm/AeFYYJCU8TjHnrGA= -github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.26.8-k3s1/go.mod h1:o9XozbaZpD6QIiqs1MQ/OxVXxQi9bJRDAjxjvQ/5rbo= -github.com/k3s-io/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.26.8-k3s1 h1:T9XAWIBwyENFgVG6hLdf+KR/UPhNwNjZtwSoy9a0h3o= -github.com/k3s-io/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.26.8-k3s1/go.mod h1:u4CAuO2LbwIlBMpaGiIWXWgOBMeGKbfWRElMwF0F4G0= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kms v1.26.8-k3s1 h1:SObLy5z1LwCQMIRuVjM4uGUhWeeMyK2d1sAdXb70908= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kms v1.26.8-k3s1/go.mod h1:uzei6+XRNkQICBV+e8BACOZwRpfWPvpZ6bVCWYsuxfQ= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.26.8-k3s1 h1:sdrBclyIr+hLsmlqZBMwvz0XVsgwtgIzvfoJjB/9zWY= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.26.8-k3s1/go.mod h1:19F9DKeFumZRao3ePJmm/BP9EFgerSwQ0fa5KvdD1/g= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.26.8-k3s1 h1:DMKipYZ+eq0GHRxbwatu5EZi6lj/jZsNbpVmZcbkJGw= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.26.8-k3s1/go.mod h1:yljUUU7zuOHiwfHBgwvya7mhTqCj2zfgR68o2vBW1/g= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.26.8-k3s1 h1:DtF3ZmVNIpTgzq4aKxTLbgooFbjiKMFU64tHQFz5nkI= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.26.8-k3s1/go.mod h1:39PpQBS7sLt6VLdJ4qMYikvsV2VIyKpfC10lmyrradk= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.26.8-k3s1 h1:WpOjD3CxLRGRGNtg0jw92I0TE4aDl8N9E52klGhxV4c= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.26.8-k3s1/go.mod h1:OHPXNEkk64+TFlLN0eKWaa6BXZol6OC4p4LZlObulE8= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.26.8-k3s1 h1:vpVBiHfZRcKKGbdgaggwID5UQG4OS2++n+vCpeyi1nw= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.26.8-k3s1/go.mod h1:D49iwI3QD/pzBLBYXrouHtBTwcVf9Kk5Rt2lw0/m030= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.26.8-k3s1 h1:Tdj6EtREZQVT+kqpSdG/Vtw+LHRSwgUAxhqoISq/zT8= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.26.8-k3s1/go.mod h1:dfUorXtk94dh8yUGKLcf6+BlDE4jGCGmSmK1n1yJiUU= -github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.26.8-k3s1 h1:h7psqOlipyBltIWXzv9ABzQuAx1vA0yc3+OfKsZFNVk= -github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.26.8-k3s1/go.mod h1:1pQ2Ut5Ql99HJEygV2CqTtiIv65q4qJ0ssWkhlU1mPU= -github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.26.8-k3s1 h1:U0YoyK65vAFrHCkVNy++FMndXMdCxQR8P4S9sLYP97k= -github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.26.8-k3s1/go.mod h1:+gfhn+sBZhhIfEMfniVySPseRCFpURM+57wkoEW3QGs= -github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.26.8-k3s1 h1:H3T2viYzRb8obSfYr3TBvyKwdJP0OZaJ3pYmckF6qr4= -github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.26.8-k3s1/go.mod h1:Xv4esSdxyeauCQqd77P5rMAjH8eAhtUfZjgykqPkXIg= -github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.26.8-k3s1 h1:X9ohd4aNAIUHD46/dliqIAHtFobE1LyWiTEpbpn2PjI= -github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.26.8-k3s1/go.mod h1:l7wMjt1eho8N7xMyd+UUSQxu8XLqio/O72zmJNQ6URo= +github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.26.9-k3s1 h1:6c/auK7973scyfnShkQs79ToXLGtsU/wLb0nkiuY4u8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.26.9-k3s1/go.mod h1:o9XozbaZpD6QIiqs1MQ/OxVXxQi9bJRDAjxjvQ/5rbo= +github.com/k3s-io/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.26.9-k3s1 h1:ssn/YeKuaRf6lhDFaFLlkv/EHoKyOqA5GJHKWgzLAHE= +github.com/k3s-io/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v1.26.9-k3s1/go.mod h1:u4CAuO2LbwIlBMpaGiIWXWgOBMeGKbfWRElMwF0F4G0= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kms v1.26.9-k3s1 h1:2ElqL2v/7W9jFe1nH30EjLkgqoUjd3qPvlD9JZIVxK8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kms v1.26.9-k3s1/go.mod h1:uzei6+XRNkQICBV+e8BACOZwRpfWPvpZ6bVCWYsuxfQ= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.26.9-k3s1 h1:cUP5Ozqm7TUqyoZ7tqR18NvQBgaBz5+BN59Zi8e1U4Y= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.26.9-k3s1/go.mod h1:einvGS+L93JTBK3ZknFFQKd6WOW87a2ag9UGfzBbF7U= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.26.9-k3s1 h1:EGtTlCrdamZrnm3xwm49iBeRCSkbWRAHlASbpZlGDaI= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.26.9-k3s1/go.mod h1:yljUUU7zuOHiwfHBgwvya7mhTqCj2zfgR68o2vBW1/g= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.26.9-k3s1 h1:CKvJyMCC12mKKdhZIp1WjmA6qQYDPEAvnmt8eL2lfeo= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.26.9-k3s1/go.mod h1:39PpQBS7sLt6VLdJ4qMYikvsV2VIyKpfC10lmyrradk= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.26.9-k3s1 h1:AN7h5JctKnwpZDcCG6/sde09Wzg/GbyRC4jmORzK18I= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.26.9-k3s1/go.mod h1:OHPXNEkk64+TFlLN0eKWaa6BXZol6OC4p4LZlObulE8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.26.9-k3s1 h1:SEdSBHAynTMPMIMHugEd7cEAJtqxBWJRYQIFW7GhvkE= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.26.9-k3s1/go.mod h1:D49iwI3QD/pzBLBYXrouHtBTwcVf9Kk5Rt2lw0/m030= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.26.9-k3s1 h1:zwRzjtVjPX9KM4cRD3sLt7khNtJnLw7jf8jbJldibjI= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.26.9-k3s1/go.mod h1:dfUorXtk94dh8yUGKLcf6+BlDE4jGCGmSmK1n1yJiUU= +github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.26.9-k3s1 h1:y6uEAd88hTUh8MHxpFOX/cduSwiA5K95D3G9XZhqWrE= +github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.26.9-k3s1/go.mod h1:1pQ2Ut5Ql99HJEygV2CqTtiIv65q4qJ0ssWkhlU1mPU= +github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.26.9-k3s1 h1:Vp6E1KA/jTiIKMNMWZtpLCWeYqVjN9Kh4E2Zf1wtrV8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.26.9-k3s1/go.mod h1:+gfhn+sBZhhIfEMfniVySPseRCFpURM+57wkoEW3QGs= +github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.26.9-k3s1 h1:xmihoHXkELLFfia0qbpWnMX+rUQVstGA80zeRNWiwgc= +github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.26.9-k3s1/go.mod h1:Xv4esSdxyeauCQqd77P5rMAjH8eAhtUfZjgykqPkXIg= +github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.26.9-k3s1 h1:GsgN+pNd/E9BExwjOSKM4DbfiorMpawNr1hy33e7PJg= +github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.26.9-k3s1/go.mod h1:cc21uHZIM33dHmEe7xMNOVrCbz34Qy3WqzqqNNECw1Q= github.com/k3s-io/stargz-snapshotter v0.14.3-k3s1 h1:29UZBqL+9Kcwl7ES7oUdN9UtS0oVZY6AL+IujwGNwPk= github.com/k3s-io/stargz-snapshotter v0.14.3-k3s1/go.mod h1:j2Ya4JeA5gMZJr8BchSkPjlcCEh++auAxp4nidPI6N0= github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI= @@ -1999,4 +2000,3 @@ sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/cli/cmds/cert.go b/pkg/cli/cmds/cert.go index d934b87917..6102a9f237 100644 --- a/pkg/cli/cmds/cert.go +++ b/pkg/cli/cmds/cert.go @@ -6,30 +6,10 @@ import ( "github.com/k3s-io/k3s/pkg/cli/cert" "github.com/k3s-io/k3s/pkg/cli/cmds" "github.com/k3s-io/k3s/pkg/configfilearg" - "github.com/k3s-io/k3s/pkg/version" "github.com/rancher/rke2/pkg/rke2" "github.com/urfave/cli" ) -var certSubcommands = []cli.Command{ - { - Name: "rotate", - Usage: "Rotate " + version.Program + " component certificates on disk", - SkipFlagParsing: false, - SkipArgReorder: true, - Action: Rotate, - Flags: cmds.CertRotateCommandFlags, - }, - { - Name: "rotate-ca", - Usage: "Write updated " + version.Program + " CA certificates to the datastore", - SkipFlagParsing: false, - SkipArgReorder: true, - Action: cert.RotateCA, - Flags: cmds.CertRotateCACommandFlags, - }, -} - func NewCertCommand() cli.Command { k3sOpts := K3SFlagSet{} subCommandOpts := map[string]K3SFlagSet{ @@ -57,7 +37,7 @@ func NewCertCommand() cli.Command { }, } - command := cmds.NewCertCommand(certSubcommands) + command := cmds.NewCertCommands(Rotate, cert.RotateCA) command.Usage = "Manage RKE2 certificates" configfilearg.DefaultParser.ValidFlags[command.Name] = command.Flags for i, subcommand := range command.Subcommands { diff --git a/pkg/cli/cmds/etcd_snapshot.go b/pkg/cli/cmds/etcd_snapshot.go index 102088bc2d..60609413a2 100644 --- a/pkg/cli/cmds/etcd_snapshot.go +++ b/pkg/cli/cmds/etcd_snapshot.go @@ -10,7 +10,7 @@ import ( const defaultSnapshotRentention = 5 func NewEtcdSnapshotCommand() cli.Command { - cmds.ServerConfig.DatastoreEndpoint = "etcd" + cmds.ServerConfig.ClusterInit = true k3sOpts := K3SFlagSet{ "config": copyFlag, "debug": copyFlag, diff --git a/pkg/cli/cmds/token.go b/pkg/cli/cmds/token.go index e2acdb90d6..4cca3f1631 100644 --- a/pkg/cli/cmds/token.go +++ b/pkg/cli/cmds/token.go @@ -25,9 +25,16 @@ func NewTokenCommand() cli.Command { "list": { "output": copyFlag, }, + "rotate": { + "token": copyFlag, + "new-token": copyFlag, + "server": { + Default: "https://127.0.0.1:9345", + }, + }, } - command := cmds.NewTokenCommands(token.Create, token.Delete, token.Generate, token.List) + command := cmds.NewTokenCommands(token.Create, token.Delete, token.Generate, token.List, token.Rotate) configfilearg.DefaultParser.ValidFlags[command.Name] = command.Flags for i, subcommand := range command.Subcommands { if s, ok := subCommandOpts[subcommand.Name]; ok { diff --git a/pkg/cli/defaults/defaults.go b/pkg/cli/defaults/defaults.go index bcdb1ebc90..1db87c2ec9 100644 --- a/pkg/cli/defaults/defaults.go +++ b/pkg/cli/defaults/defaults.go @@ -17,7 +17,7 @@ func Set(_ *cli.Context, dataDir string) error { return errors.Wrapf(err, "failed to create directory %s", logsDir) } - cmds.ServerConfig.DatastoreEndpoint = "etcd" + cmds.ServerConfig.ClusterInit = true cmds.ServerConfig.DisableNPC = true cmds.ServerConfig.FlannelBackend = "none" cmds.ServerConfig.AdvertisePort = 6443