mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Remove false positive warning in kubeadm cmd
This commit is contained in:
parent
240a72b5c0
commit
b90228f52f
@ -17,8 +17,6 @@ limitations under the License.
|
|||||||
package componentconfigs
|
package componentconfigs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sort"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
@ -338,13 +336,7 @@ func GetVersionStates(clusterCfg *kubeadmapi.ClusterConfiguration, client client
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate is a placeholder for performing a validation on an already loaded component configs in a ClusterConfiguration
|
// Validate is a placeholder for performing a validation on an already loaded component configs in a ClusterConfiguration
|
||||||
// Currently it prints a warning that no validation was performed
|
// TODO: investigate if the function can be repurposed for validating component config via CLI
|
||||||
func Validate(clusterCfg *kubeadmapi.ClusterConfiguration) field.ErrorList {
|
func Validate(clusterCfg *kubeadmapi.ClusterConfiguration) field.ErrorList {
|
||||||
groups := []string{}
|
|
||||||
for group := range clusterCfg.ComponentConfigs {
|
|
||||||
groups = append(groups, group)
|
|
||||||
}
|
|
||||||
sort.Strings(groups) // The sort is needed to make the output predictable
|
|
||||||
klog.Warningf("WARNING: kubeadm cannot validate component configs for API groups %v", groups)
|
|
||||||
return field.ErrorList{}
|
return field.ErrorList{}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user