From e8d914475910e6de6e2dc1977d22db0161eb96f4 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 4 Oct 2021 05:05:07 +0800 Subject: [PATCH] fix overlap check when ingress is configured as canary (#7719) --- 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 aeed32278..f935f5fff 100644 --- a/internal/ingress/controller/controller.go +++ b/internal/ingress/controller/controller.go @@ -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) } }