Merge pull request #91065 from SataQiu/fix-kubeadm-20200513

kubeadm: log more information when missing the necessary config element
This commit is contained in:
Kubernetes Prow Robot 2020-05-15 02:49:17 -07:00 committed by GitHub
commit 9e88546f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ func SplitYAMLDocuments(yamlBytes []byte) (kubeadmapi.DocumentMap, error) {
return nil, err return nil, err
} }
if len(gvk.Group) == 0 || len(gvk.Version) == 0 || len(gvk.Kind) == 0 { if len(gvk.Group) == 0 || len(gvk.Version) == 0 || len(gvk.Kind) == 0 {
return nil, errors.New("invalid configuration: kind and apiVersion is mandatory information that needs to be specified") return nil, errors.Errorf("invalid configuration for GroupVersionKind %+v: kind and apiVersion is mandatory information that must be specified", gvk)
} }
// Check whether the kind has been registered before. If it has, throw an error // Check whether the kind has been registered before. If it has, throw an error