mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-24 11:01:26 +00:00
kubeadm: Fix a false positive in a warning
The warning message ``` [config] WARNING: Ignored YAML document with GroupVersionKind ... ``` is printed for all GVKs that are not part of the kubeadm core types. This is wrong as the component config types are supported and successfully parsed and used despite the fact that the warning is printed for them too. Hence this simple fix first checks if the group of the GVK is a supported component config group and the warning is printed only if it's not. Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
This commit is contained in:
parent
f3df7a2fdb
commit
7f2d675ad0
@ -270,7 +270,10 @@ func documentMapToInitConfiguration(gvkmap kubeadmapi.DocumentMap, allowDeprecat
|
||||
continue
|
||||
}
|
||||
|
||||
fmt.Printf("[config] WARNING: Ignored YAML document with GroupVersionKind %v\n", gvk)
|
||||
// If the group is neither a kubeadm core type or of a supported component config group, we dump a warning about it being ignored
|
||||
if !componentconfigs.Scheme.IsGroupRegistered(gvk.Group) {
|
||||
fmt.Printf("[config] WARNING: Ignored YAML document with GroupVersionKind %v\n", gvk)
|
||||
}
|
||||
}
|
||||
|
||||
// Enforce that InitConfiguration and/or ClusterConfiguration has to exist among the YAML documents
|
||||
|
Loading…
Reference in New Issue
Block a user