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"