Fix to validate spec.types of MultiClusterService Webhook

Signed-off-by: lonelyCZ <chengzhe@zju.edu.cn>
This commit is contained in:
lonelyCZ 2023-10-09 13:12:24 +08:00
parent 38ec57982c
commit 9aefb4c4dd
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)...)