Skip to content

Commit

Permalink
Remove false positive warning in kubeadm cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
helenfeng737 committed Aug 6, 2020
1 parent 240a72b commit b90228f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions cmd/kubeadm/app/componentconfigs/configset.go
Expand Up @@ -17,8 +17,6 @@ limitations under the License.
package componentconfigs

import (
"sort"

"github.com/pkg/errors"

apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -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{}
}

0 comments on commit b90228f

Please sign in to comment.