Merge pull request #4096 from lonelyCZ/fix-mcs-webhook
Fix to validate spec.types of MultiClusterService Webhook
This commit is contained in:
commit
ff433ce1f9
|
@ -82,7 +82,7 @@ func (v *ValidatingAdmission) validateMultiClusterServiceSpec(mcs *networkingv1a
|
||||||
allErrs = append(allErrs, v.validateExposurePort(&port, allPortNames, portPath)...)
|
allErrs = append(allErrs, v.validateExposurePort(&port, allPortNames, portPath)...)
|
||||||
}
|
}
|
||||||
typesPath := specPath.Child("types")
|
typesPath := specPath.Child("types")
|
||||||
for i := range mcs.Spec.Ports {
|
for i := range mcs.Spec.Types {
|
||||||
typePath := typesPath.Index(i)
|
typePath := typesPath.Index(i)
|
||||||
exposureType := mcs.Spec.Types[i]
|
exposureType := mcs.Spec.Types[i]
|
||||||
allErrs = append(allErrs, v.validateExposureType(&exposureType, typePath)...)
|
allErrs = append(allErrs, v.validateExposureType(&exposureType, typePath)...)
|
||||||
|
|
Loading…
Reference in New Issue