From b90228f52f695d8bf7483877fff0f3bd7f3af527 Mon Sep 17 00:00:00 2001 From: ZhiFeng1993 Date: Mon, 27 Jul 2020 14:34:26 -0700 Subject: [PATCH] Remove false positive warning in kubeadm cmd --- cmd/kubeadm/app/componentconfigs/configset.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cmd/kubeadm/app/componentconfigs/configset.go b/cmd/kubeadm/app/componentconfigs/configset.go index 36f96b5b73f..906d99fd8cd 100644 --- a/cmd/kubeadm/app/componentconfigs/configset.go +++ b/cmd/kubeadm/app/componentconfigs/configset.go @@ -17,8 +17,6 @@ limitations under the License. package componentconfigs import ( - "sort" - "github.com/pkg/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 -// 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 { - 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{} }