mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Merge pull request #129561 from mozillazg/patch-1
kubeadm: fix a wrong comment
This commit is contained in:
@@ -98,7 +98,7 @@ func ValidateConfigInfo(config *clientcmdapi.Config, discoveryTimeout time.Durat
|
|||||||
clusterinfoCM, lastError = client.CoreV1().ConfigMaps(metav1.NamespacePublic).Get(context.TODO(), bootstrapapi.ConfigMapClusterInfo, metav1.GetOptions{})
|
clusterinfoCM, lastError = client.CoreV1().ConfigMaps(metav1.NamespacePublic).Get(context.TODO(), bootstrapapi.ConfigMapClusterInfo, metav1.GetOptions{})
|
||||||
if lastError != nil {
|
if lastError != nil {
|
||||||
if apierrors.IsForbidden(lastError) {
|
if apierrors.IsForbidden(lastError) {
|
||||||
// If the request is unauthorized, the cluster admin has not granted access to the cluster info configmap for unauthenticated users
|
// If the request fails with a forbidden error, the cluster admin has not granted access to the cluster info configmap for anonymous clients.
|
||||||
// In that case, trust the cluster admin and do not refresh the cluster-info data
|
// In that case, trust the cluster admin and do not refresh the cluster-info data
|
||||||
klog.Warningf("[discovery] Could not access the %s ConfigMap for refreshing the cluster-info information, but the TLS cert is valid so proceeding...\n", bootstrapapi.ConfigMapClusterInfo)
|
klog.Warningf("[discovery] Could not access the %s ConfigMap for refreshing the cluster-info information, but the TLS cert is valid so proceeding...\n", bootstrapapi.ConfigMapClusterInfo)
|
||||||
return true, nil
|
return true, nil
|
||||||
|
Reference in New Issue
Block a user