update description
This commit is contained in:
@@ -278,7 +278,7 @@ func ValidateIngressCreate(ingress *networking.Ingress) field.ErrorList {
|
||||
annotationVal, annotationIsSet := ingress.Annotations[annotationIngressClass]
|
||||
if annotationIsSet && ingress.Spec.IngressClassName != nil && annotationVal != *ingress.Spec.IngressClassName {
|
||||
annotationPath := field.NewPath("annotations").Child(annotationIngressClass)
|
||||
allErrs = append(allErrs, field.Invalid(annotationPath, annotationVal, "ingressClass annotation and IngressClassName should have the same value"))
|
||||
allErrs = append(allErrs, field.Invalid(annotationPath, annotationVal, "must match `ingressClassName` when both are specified"))
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
@@ -1005,7 +1005,7 @@ func TestValidateIngressCreate(t *testing.T) {
|
||||
ingress.Spec.IngressClassName = utilpointer.String("bar")
|
||||
ingress.Annotations = map[string]string{annotationIngressClass: "foo"}
|
||||
},
|
||||
expectedErrs: field.ErrorList{field.Invalid(field.NewPath("annotations").Child(annotationIngressClass), "foo", "ingressClass annotation and IngressClassName should have the same value")},
|
||||
expectedErrs: field.ErrorList{field.Invalid(field.NewPath("annotations").Child(annotationIngressClass), "foo", "must match `ingressClassName` when both are specified")},
|
||||
},
|
||||
"valid regex path": {
|
||||
tweakIngress: func(ingress *networking.Ingress) {
|
||||
|
Reference in New Issue
Block a user