package bootstrap matches dir

Change-Id: I56104a0a16e6bd1d7b12097f5eda417dd8ad6247
This commit is contained in:
Antonio Ojea
2025-05-15 11:43:59 +00:00
parent 2d063df463
commit cf8acf5cb7
3 changed files with 4 additions and 4 deletions

View File

@@ -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")
}

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package bootstrap
package jws
import (
"fmt"

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package bootstrap
package jws
import (
"testing"