From d14e5f561fb02f21f620275543d9fe9ec167beb2 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Thu, 12 Oct 2023 09:25:18 -0700 Subject: [PATCH] Bump k3s, support token rotate Signed-off-by: Derek Nola --- go.mod | 61 ++++++++++----------- go.sum | 101 ++++++++++++++++++----------------- pkg/cli/cmds/cert.go | 22 +------- pkg/cli/cmds/token.go | 9 +++- pkg/cli/defaults/defaults.go | 2 +- 5 files changed, 92 insertions(+), 103 deletions(-) diff --git a/go.mod b/go.mod index 2d44798f5d..920598e366 100644 --- a/go.mod +++ b/go.mod @@ -49,39 +49,40 @@ replace ( google.golang.org/genproto => google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 google.golang.org/grpc => google.golang.org/grpc v1.40.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.25.13-k3s1 - k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.25.13-k3s1 - k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.25.13-k3s1 - k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.25.13-k3s1 - k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.25.13-k3s1 - k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.25.13-k3s1 - k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.25.13-k3s1 - k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.25.13-k3s1 - k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.25.13-k3s1 - k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.25.13-k3s1 - k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.25.13-k3s1 - k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.25.13-k3s1 - k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.25.13-k3s1 - k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.25.13-k3s1 + k8s.io/api => github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.25.14-k3s1 + k8s.io/apiextensions-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.25.14-k3s1 + k8s.io/apimachinery => github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.25.14-k3s1 + k8s.io/apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.25.14-k3s1 + k8s.io/cli-runtime => github.com/k3s-io/kubernetes/staging/src/k8s.io/cli-runtime v1.25.14-k3s1 + k8s.io/client-go => github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.25.14-k3s1 + k8s.io/cloud-provider => github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.25.14-k3s1 + k8s.io/cluster-bootstrap => github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.25.14-k3s1 + k8s.io/code-generator => github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.25.14-k3s1 + k8s.io/component-base => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.25.14-k3s1 + k8s.io/component-helpers => github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.25.14-k3s1 + k8s.io/controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.25.14-k3s1 + k8s.io/cri-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.25.14-k3s1 + k8s.io/csi-translation-lib => github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.25.14-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.60.1-k3s1 // k3s-main - k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.25.13-k3s1 - k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.25.13-k3s1 + k8s.io/kube-aggregator => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.25.14-k3s1 + k8s.io/kube-controller-manager => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.25.14-k3s1 k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 - k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.25.13-k3s1 - k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.25.13-k3s1 - k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.25.13-k3s1 - k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.25.13-k3s1 - k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.25.13-k3s1 - k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.25.13-k3s1 - k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.25.13-k3s1 - k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.25.13-k3s1 - k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.25.13-k3s1 - k8s.io/pod-security-admission => github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.25.13-k3s1 - k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.25.13-k3s1 - k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.25.13-k3s1 - k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.25.13-k3s1 + k8s.io/kube-proxy => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.25.14-k3s1 + k8s.io/kube-scheduler => github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.25.14-k3s1 + k8s.io/kubectl => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.25.14-k3s1 + k8s.io/kubelet => github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.25.14-k3s1 + k8s.io/kubernetes => github.com/k3s-io/kubernetes v1.25.14-k3s1 + k8s.io/legacy-cloud-providers => github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.25.14-k3s1 + k8s.io/metrics => github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.25.14-k3s1 + k8s.io/mount-utils => github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.25.14-k3s1 + k8s.io/node-api => github.com/k3s-io/kubernetes/staging/src/k8s.io/node-api v1.25.14-k3s1 + k8s.io/pod-security-admission => github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.25.14-k3s1 + k8s.io/sample-apiserver => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-apiserver v1.25.14-k3s1 + k8s.io/sample-cli-plugin => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.25.14-k3s1 + k8s.io/sample-controller => github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller v1.25.14-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 ( @@ -95,7 +96,7 @@ require ( github.com/gruntwork-io/terratest v0.40.19 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.25.15-0.20231005201114-8bfd2389fe47 // release-1.25 + github.com/k3s-io/k3s v1.25.15-0.20231012151134-0816812c9922 // release-1.25 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 692b72b77f..3e8c5e990f 100644 --- a/go.sum +++ b/go.sum @@ -221,6 +221,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= @@ -474,6 +475,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/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.0.0-20190513200303-c977f96e1095/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= @@ -876,8 +878,8 @@ github.com/k3s-io/etcd/server/v3 v3.5.4-k3s1 h1:swbvfSDpl7QsYO6Vh+EBgxZCMyG4N1tU github.com/k3s-io/etcd/server/v3 v3.5.4-k3s1/go.mod h1:S5/YTU15KxymM5l3T6b09sNOHPXqGYIZStpuuGbb65c= 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.25.15-0.20231005201114-8bfd2389fe47 h1:slbHvuluYIAbXeS1AU+pxeZIwFehf1CCXDMRQQ/LVAw= -github.com/k3s-io/k3s v1.25.15-0.20231005201114-8bfd2389fe47/go.mod h1:t0RtnjhvRKVA9EcF93evymByX5kIR6P5/MTNfjdHo5U= +github.com/k3s-io/k3s v1.25.15-0.20231012151134-0816812c9922 h1:R6uCalQ4g+r8vJAewA8obft+QdetGD8wYIPY4sK6JUw= +github.com/k3s-io/k3s v1.25.15-0.20231012151134-0816812c9922/go.mod h1:t0RtnjhvRKVA9EcF93evymByX5kIR6P5/MTNfjdHo5U= 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= @@ -886,53 +888,53 @@ github.com/k3s-io/klog/v2 v2.60.1-k3s1 h1:C1hsMF1Eo6heGVQzts6cZ+rDZAReSiOBUxsYMu github.com/k3s-io/klog/v2 v2.60.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.25.13-k3s1 h1:7lAq4NMHnWkphKGgGGGJE4dzN4/tPJxzXwtruzVBDdU= -github.com/k3s-io/kubernetes v1.25.13-k3s1/go.mod h1:CjSm5tJyKxHyGhK5aAID68YMErzDhAjWLL7Nd7NMonU= -github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.25.13-k3s1 h1:0cLdneFzwkn4Zd0c+HednWesldX6Zn0jSS6I7/CiLcI= -github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.25.13-k3s1/go.mod h1:+QI300GY597FN8TpO7pytB4kWismY430j1D6mL5cTp4= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.25.13-k3s1 h1:1tV67HgdEwEr3q0LODSU43Pa8cT9VTkSBbwLGT1jnbE= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.25.13-k3s1/go.mod h1:dl7Or1PfMKU8MtbVPSnXXwicTNa+aggV+GmmRm123d4= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.25.13-k3s1 h1:naAaUIsSky0Ujf/gQcCl1Lj5w/Jmt6G1UcfDxnVQyXA= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.25.13-k3s1/go.mod h1:Mbkk3DoMea5ERnQV1xe2Ui+H+S0I5FHtlr+kANEadSQ= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.25.13-k3s1 h1:puZl/up/lN8i30baVR0ic3pBig8fkmn2BATL8tEaBFI= -github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.25.13-k3s1/go.mod h1:somyfXcyXXmuly9PkCBtgOAJ7kfJxAoQb/bJMrftf2U= -github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.25.13-k3s1 h1:yAzatUrAIuThv35ZMLjh3eluhe5pMPlDMmcX1wCXsVE= -github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.25.13-k3s1/go.mod h1:8/gi03GkQ3maTqAsK6y7xbUsTLQI4/yqFAGzw+a8iak= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.25.13-k3s1 h1:D6SqEV1zju+uf/xX7ACGYV/3nzCYUs/8tbH5yVbw8XU= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.25.13-k3s1/go.mod h1:rN5OIR9sGGlRQNlqBx2gukgNJwy7UbJ2vVCV66sawfQ= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.25.13-k3s1 h1:+IAE5Kh/7OBbJM1/k91E95G0ii3zNuvLmmQnnaRb/bA= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.25.13-k3s1/go.mod h1:3Wx/XBkrtr1BJf2RymEwaiBPBRiPL6G/n22kv134uYo= -github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.25.13-k3s1/go.mod h1:/+RPJA3puwktt5E9/GPeZDbLsIJcFTQcoFLw83SG8QQ= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.25.13-k3s1 h1:GgUgGx3vJLyr0Baa1iElPXmKjLX5XI7CcY7d5mHjH0k= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.25.13-k3s1/go.mod h1:aLXZLR1sTt84Ct1LPVoe/pRhcwdT7EqGvIhhpdA8/HM= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.25.13-k3s1 h1:c++P3ldbYo1tnD1GIR04H5kjH5Y3CDj7Pq4ZUGDCDBM= -github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.25.13-k3s1/go.mod h1:kIe9caWhUte6YlMiai+ayq/UyRv3aLpJ6gJiJL9X9WE= -github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.25.13-k3s1 h1:WQyyz1J+eADscEXQ3NtzaHSCoLSNbnryDP0BmIEHah4= -github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.25.13-k3s1/go.mod h1:ismNQih4WIk0/5jXNOa4nYji/vnYoBdIY/cB2EMjXuA= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.25.13-k3s1 h1:SZdciQjQ0xinkuQD+FLmYk3yZU+uCfOX/RwWM32rJRw= -github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.25.13-k3s1/go.mod h1:JeF3Inn67uBuQqc43+16WRrkxWt3JrGtrqxwWXU/jVI= -github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.25.13-k3s1 h1:NAnvcGuKOji8q2+Qf55pPwzyliZ0nW8joaW4kxXPAew= -github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.25.13-k3s1/go.mod h1:du7agetVNNAJI8vFZiNOZUFInZVth9MkdmT7NwCXXmg= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.25.13-k3s1 h1:o28D03isOFx7C4LmwcrhEFBc1EltlaGYhuKU8UYQV6s= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.25.13-k3s1/go.mod h1:DBzym9XbNp0vA/uk38cS/m3ry+JhmAxF/aMY0JN81Kg= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.25.13-k3s1 h1:Pj7SIecuW/g3Ec75yJNQslyzhf8BynLl7J0fWg5Jqf4= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.25.13-k3s1/go.mod h1:b+iaSEtlTyY5gjwpILB+CY+oRK+ErfDonOrij/aypss= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.25.13-k3s1 h1:GvpAFTGpnoeEuIlrewGHBYjAR9u8t78CO40L3MpdwKQ= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.25.13-k3s1/go.mod h1:hp9gFRXDqF7Ri/YosRNaC1MScZ7c2FYRb0/f/Shddao= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.25.13-k3s1 h1:H01Fh6VaI1byo2cjx9o3BUbNlo5PZ1h+7IBQWb9+wEc= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.25.13-k3s1/go.mod h1:9KJowNJ+WkCaGPN3LSMjtaipio+5/HYieC3gpNLdhGs= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.25.13-k3s1 h1:WXP5ot6Fo5g/XNXzqoUfYt0968LOTxfgLd1LjSsUdpE= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.25.13-k3s1/go.mod h1:NxI4NE+yjA0Orvd/noyp1ss09rYiBLfl83Gop30LAaY= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.25.13-k3s1 h1:dDxPaFJW/Uj9X269nze4EjERRUpTXdTGevXsB1T9mA4= -github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.25.13-k3s1/go.mod h1:4z3FUEwZF2eTF1uLklXaQLQPMs9GmSRIbHSB+OMtYXw= -github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.25.13-k3s1 h1:RUMqqT8nCJVdxRkPNyNQ+UqFXWXIf5U7gRvk6Sdhe8g= -github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.25.13-k3s1/go.mod h1:5c7hPc7TkL94CWTxcEjOEYetL/atBDEFPiCjLuqWNZE= -github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.25.13-k3s1 h1:yU8mOfWORPC6SarkIzmjGCP/pkZQwgy8uCZz7jhH8n4= -github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.25.13-k3s1/go.mod h1:qze1zH60BRHdG3e7W7CNRpEP4XIKmu9VeXAyytsLfG8= -github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.25.13-k3s1 h1:uOVvaeRV4XRiQRYRjR9ovZY5IbUW+LxdUszIoEiPmfk= -github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.25.13-k3s1/go.mod h1:fjm1+ZAtrpHXwBvdiNHHoHsGBrBZ26o8sdHS3x4qgYs= -github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.25.13-k3s1 h1:jxN143Hhk56eKR9MyjCR59014KJ58gPDJ6G1KC6yuzY= -github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.25.13-k3s1/go.mod h1:R9y97oFQRahnKT5KCsU1s4i/qHwI+/va0XpxrF6jZX0= +github.com/k3s-io/kubernetes v1.25.14-k3s1 h1:PW6QMDYXYYBAmtaPmB84nyTaVBa6Ut+agEWPTgsOlV8= +github.com/k3s-io/kubernetes v1.25.14-k3s1/go.mod h1:CjSm5tJyKxHyGhK5aAID68YMErzDhAjWLL7Nd7NMonU= +github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.25.14-k3s1 h1:fMLhNlinpqKfLa5iDUDDE8iDk0G6WAVUzKJrmt25qm4= +github.com/k3s-io/kubernetes/staging/src/k8s.io/api v1.25.14-k3s1/go.mod h1:+QI300GY597FN8TpO7pytB4kWismY430j1D6mL5cTp4= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.25.14-k3s1 h1:mGxfLSgEVlKid92bK1tQU77vHEHExD4GFAzSEhE51c4= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.25.14-k3s1/go.mod h1:dl7Or1PfMKU8MtbVPSnXXwicTNa+aggV+GmmRm123d4= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.25.14-k3s1 h1:XZ5677d0j9EUmeBOCCJp8YD8eaOrFa1m1k9aagxrlkg= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apimachinery v1.25.14-k3s1/go.mod h1:Mbkk3DoMea5ERnQV1xe2Ui+H+S0I5FHtlr+kANEadSQ= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.25.14-k3s1 h1:tR6aV+wMwtOO3ignpB5Og2jxcqDZrulZ1mrJq6hAvek= +github.com/k3s-io/kubernetes/staging/src/k8s.io/apiserver v1.25.14-k3s1/go.mod h1:somyfXcyXXmuly9PkCBtgOAJ7kfJxAoQb/bJMrftf2U= +github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.25.14-k3s1 h1:gqrCbtEyjwLDlr29cNrBEodrUpg+nxj6CS3qXrorsP8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/client-go v1.25.14-k3s1/go.mod h1:8/gi03GkQ3maTqAsK6y7xbUsTLQI4/yqFAGzw+a8iak= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.25.14-k3s1 h1:wyNQguab/0gF6PGtd/5Y3RnFQWOKQJME/6dN+9UH9v8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cloud-provider v1.25.14-k3s1/go.mod h1:rN5OIR9sGGlRQNlqBx2gukgNJwy7UbJ2vVCV66sawfQ= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.25.14-k3s1 h1:0ivDNyKeGX20v25PM8T+f6GQDxhvOQCUs+VQl56fbGo= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.25.14-k3s1/go.mod h1:3Wx/XBkrtr1BJf2RymEwaiBPBRiPL6G/n22kv134uYo= +github.com/k3s-io/kubernetes/staging/src/k8s.io/code-generator v1.25.14-k3s1/go.mod h1:/+RPJA3puwktt5E9/GPeZDbLsIJcFTQcoFLw83SG8QQ= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.25.14-k3s1 h1:rps+/iRVFblOk0L12OSdBe/zwqOKIlkeNOVBPv5qjBE= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-base v1.25.14-k3s1/go.mod h1:aLXZLR1sTt84Ct1LPVoe/pRhcwdT7EqGvIhhpdA8/HM= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.25.14-k3s1 h1:fRaH6acTvXYeN9QAnCTiRrvSczdmsQpfEnlodanecr8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/component-helpers v1.25.14-k3s1/go.mod h1:kIe9caWhUte6YlMiai+ayq/UyRv3aLpJ6gJiJL9X9WE= +github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.25.14-k3s1 h1:v10PCb6gQamM1JNK25MObtKjSYfOdOye6j660w/BppA= +github.com/k3s-io/kubernetes/staging/src/k8s.io/controller-manager v1.25.14-k3s1/go.mod h1:ismNQih4WIk0/5jXNOa4nYji/vnYoBdIY/cB2EMjXuA= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.25.14-k3s1 h1:OWxnDxLgzO/hU8STjbfE24t2zwL2ALoCVxxpMy/PSBg= +github.com/k3s-io/kubernetes/staging/src/k8s.io/cri-api v1.25.14-k3s1/go.mod h1:JeF3Inn67uBuQqc43+16WRrkxWt3JrGtrqxwWXU/jVI= +github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.25.14-k3s1 h1:tv9KbdoOCgTJKxJb3enAH5M4UvcW66jw1ZMbIbir7pU= +github.com/k3s-io/kubernetes/staging/src/k8s.io/csi-translation-lib v1.25.14-k3s1/go.mod h1:du7agetVNNAJI8vFZiNOZUFInZVth9MkdmT7NwCXXmg= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.25.14-k3s1 h1:r7q4TPIotwrrnjUQl9YLRsgCu9Y6RXSLauMt9dYdsJc= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-aggregator v1.25.14-k3s1/go.mod h1:DBzym9XbNp0vA/uk38cS/m3ry+JhmAxF/aMY0JN81Kg= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.25.14-k3s1 h1:y9OMfd0G6+gaSbFldIc2pj+UOAUCPn4aImmJGjiXE5o= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-controller-manager v1.25.14-k3s1/go.mod h1:b+iaSEtlTyY5gjwpILB+CY+oRK+ErfDonOrij/aypss= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.25.14-k3s1 h1:tRukzGbfAqwE1NjEMhtmu2v26bxgBySXTS3/b7hayzI= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-proxy v1.25.14-k3s1/go.mod h1:hp9gFRXDqF7Ri/YosRNaC1MScZ7c2FYRb0/f/Shddao= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.25.14-k3s1 h1:7oZVG7b2Exey/69ub/bBDv+1ZLcO0w7lJyxrVtf4kq0= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kube-scheduler v1.25.14-k3s1/go.mod h1:9KJowNJ+WkCaGPN3LSMjtaipio+5/HYieC3gpNLdhGs= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.25.14-k3s1 h1:Ed/DmXX8+f1fSFNTcOHhuKZSp8iB42/b6QMcFcs6lv8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubectl v1.25.14-k3s1/go.mod h1:NxI4NE+yjA0Orvd/noyp1ss09rYiBLfl83Gop30LAaY= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.25.14-k3s1 h1:K+ajP8bI6yKR2uAgpZw2vVAyXipp8HYSy+R5Z2Exb40= +github.com/k3s-io/kubernetes/staging/src/k8s.io/kubelet v1.25.14-k3s1/go.mod h1:4z3FUEwZF2eTF1uLklXaQLQPMs9GmSRIbHSB+OMtYXw= +github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.25.14-k3s1 h1:HRn0OLchpmX3F6fWBrV7hqHDh0soJ6cd4vPY5c1zqFI= +github.com/k3s-io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.25.14-k3s1/go.mod h1:5c7hPc7TkL94CWTxcEjOEYetL/atBDEFPiCjLuqWNZE= +github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.25.14-k3s1 h1:Gf+1CXFN+dLJICXBoHtJeyFHpYS533fkysDYCumS8og= +github.com/k3s-io/kubernetes/staging/src/k8s.io/metrics v1.25.14-k3s1/go.mod h1:qze1zH60BRHdG3e7W7CNRpEP4XIKmu9VeXAyytsLfG8= +github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.25.14-k3s1 h1:CMJ08rrIhBOT5AZ267F503v1FJFAhOzdxup6Yu7OZE4= +github.com/k3s-io/kubernetes/staging/src/k8s.io/mount-utils v1.25.14-k3s1/go.mod h1:fjm1+ZAtrpHXwBvdiNHHoHsGBrBZ26o8sdHS3x4qgYs= +github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.25.14-k3s1 h1:IwlLLEfcjABKJxPJv1nqzCuziOAr7ZHlbkz3S8qBTTU= +github.com/k3s-io/kubernetes/staging/src/k8s.io/pod-security-admission v1.25.14-k3s1/go.mod h1:R9y97oFQRahnKT5KCsU1s4i/qHwI+/va0XpxrF6jZX0= 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.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= @@ -2131,4 +2133,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/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 de50f0f567..4db0188c80 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