From cf8acf5cb734c53990f6fa421e5c0f141b456cc6 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 15 May 2025 11:43:59 +0000 Subject: [PATCH] package bootstrap matches dir Change-Id: I56104a0a16e6bd1d7b12097f5eda417dd8ad6247 --- cmd/kubeadm/app/discovery/token/token.go | 4 ++-- staging/src/k8s.io/cluster-bootstrap/token/jws/jws.go | 2 +- staging/src/k8s.io/cluster-bootstrap/token/jws/jws_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/kubeadm/app/discovery/token/token.go b/cmd/kubeadm/app/discovery/token/token.go index effd0048c61..bbae01f0950 100644 --- a/cmd/kubeadm/app/discovery/token/token.go +++ b/cmd/kubeadm/app/discovery/token/token.go @@ -32,7 +32,7 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" certutil "k8s.io/client-go/util/cert" bootstrapapi "k8s.io/cluster-bootstrap/token/api" - bootstrap "k8s.io/cluster-bootstrap/token/jws" + tokenjws "k8s.io/cluster-bootstrap/token/jws" "k8s.io/klog/v2" bootstraptokenv1 "k8s.io/kubernetes/cmd/kubeadm/app/apis/bootstraptoken/v1" @@ -181,7 +181,7 @@ func validateClusterInfoToken(insecureClusterInfo *v1.ConfigMap, token *bootstra return nil, errors.Errorf("token id %q is invalid for this cluster or it has expired. Use \"kubeadm token create\" on the control-plane node to create a new valid token", token.ID) } - if !bootstrap.DetachedTokenIsValid(detachedJWSToken, insecureKubeconfigString, token.ID, token.Secret) { + if !tokenjws.DetachedTokenIsValid(detachedJWSToken, insecureKubeconfigString, token.ID, token.Secret) { return nil, errors.New("failed to verify JWS signature of received cluster info object, can't trust this API Server") } diff --git a/staging/src/k8s.io/cluster-bootstrap/token/jws/jws.go b/staging/src/k8s.io/cluster-bootstrap/token/jws/jws.go index 859067f9f3f..75a31ffcd05 100644 --- a/staging/src/k8s.io/cluster-bootstrap/token/jws/jws.go +++ b/staging/src/k8s.io/cluster-bootstrap/token/jws/jws.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package bootstrap +package jws import ( "fmt" diff --git a/staging/src/k8s.io/cluster-bootstrap/token/jws/jws_test.go b/staging/src/k8s.io/cluster-bootstrap/token/jws/jws_test.go index 1f86e1dce48..4c0f2c01b90 100644 --- a/staging/src/k8s.io/cluster-bootstrap/token/jws/jws_test.go +++ b/staging/src/k8s.io/cluster-bootstrap/token/jws/jws_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package bootstrap +package jws import ( "testing"