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 b219555e75
commit e8d9144759
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)
}
}