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