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