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

Co-authored-by: Alan <zg.zhu@daocloud.io>
This commit is contained in:
Ricardo Katz 2021-10-03 20:55:07 -03:00 committed by GitHub
parent 25b87436f7
commit 0f5d2c6383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1680,7 +1680,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)
}
}