kubeadm: improve the error/warning messages of 'validateSupportedVersion' to include the checked resource kind

This commit is contained in:
SataQiu
2024-06-27 18:47:09 +08:00
parent 7210f2aa68
commit 7120b3902c
6 changed files with 29 additions and 21 deletions

View File

@@ -106,7 +106,7 @@ func documentMapToJoinConfiguration(gvkmap kubeadmapi.DocumentMap, allowDeprecat
}
// check if this version is supported and possibly not deprecated
if err := validateSupportedVersion(gvk.GroupVersion(), allowDeprecated, allowExperimental); err != nil {
if err := validateSupportedVersion(gvk, allowDeprecated, allowExperimental); err != nil {
return nil, err
}