From 0f5d2c63837dd7af8f0b5a3faa10c25720c17aef Mon Sep 17 00:00:00 2001 From: Ricardo Katz Date: Sun, 3 Oct 2021 20:55:07 -0300 Subject: [PATCH] fix overlap check when ingress is configured as canary (#7719) (#7741) Co-authored-by: Alan --- internal/ingress/controller/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ingress/controller/controller.go b/internal/ingress/controller/controller.go index 61c9dc5c9..7d4478b43 100644 --- a/internal/ingress/controller/controller.go +++ b/internal/ingress/controller/controller.go @@ -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) } }