fix overlap check when ingress is configured as canary (#7719)

This commit is contained in:
Alan 2021-10-04 05:05:07 +08:00 committed by GitHub
parent 8de035f227
commit 3d61b3cbcf

View file

@ -1713,7 +1713,7 @@ func checkOverlap(ing *networking.Ingress, ingresses []*ingress.Ingress, servers
return fmt.Errorf(`host "%s" and path "%s" is already defined in ingress %s/%s`, rule.Host, path.Path, existing.Namespace, existing.Name)
}
if annotationErr == errors.ErrMissingAnnotations && existingAnnotationErr == existingAnnotationErr {
if annotationErr == errors.ErrMissingAnnotations && existingAnnotationErr == errors.ErrMissingAnnotations {
return fmt.Errorf(`host "%s" and path "%s" is already defined in ingress %s/%s`, rule.Host, path.Path, existing.Namespace, existing.Name)
}
}