Merge pull request #120073 from SataQiu/fix-kubeadm-20230820-02

kubeadm: fix the field path for JoinControlPlane.CertificateKey validation
This commit is contained in:
Kubernetes Prow Robot 2023-08-20 06:31:21 -07:00 committed by GitHub
commit d5a42e2c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ func ValidateJoinControlPlane(c *kubeadm.JoinControlPlane, fldPath *field.Path)
allErrs := field.ErrorList{}
if c != nil {
allErrs = append(allErrs, ValidateAPIEndpoint(&c.LocalAPIEndpoint, fldPath.Child("localAPIEndpoint"))...)
allErrs = append(allErrs, ValidateCertificateKey(c.CertificateKey, field.NewPath("certificateKey"))...)
allErrs = append(allErrs, ValidateCertificateKey(c.CertificateKey, fldPath.Child("certificateKey"))...)
}
return allErrs
}