Merge pull request #4096 from lonelyCZ/fix-mcs-webhook

Fix to validate spec.types of MultiClusterService Webhook
This commit is contained in:
karmada-bot 2023-10-09 15:02:15 +08:00 committed by GitHub
commit ff433ce1f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ func (v *ValidatingAdmission) validateMultiClusterServiceSpec(mcs *networkingv1a
allErrs = append(allErrs, v.validateExposurePort(&port, allPortNames, portPath)...)
}
typesPath := specPath.Child("types")
for i := range mcs.Spec.Ports {
for i := range mcs.Spec.Types {
typePath := typesPath.Index(i)
exposureType := mcs.Spec.Types[i]
allErrs = append(allErrs, v.validateExposureType(&exposureType, typePath)...)