From e7aecfb3124e5349ea0c4d9daeed858dc8f40055 Mon Sep 17 00:00:00 2001 From: Ivan Matmati Date: Thu, 24 Oct 2024 18:15:35 +0200 Subject: [PATCH] BUG: remove unnecessary store argument for ingress --- pkg/controller/controller.go | 2 +- pkg/ingress/ingress.go | 2 +- pkg/status/updatestatus.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index c6b6a424..7cf7c7c9 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -150,7 +150,7 @@ func (c *HAProxyController) updateHAProxy() { } c.store.SecretsProcessed = map[string]struct{}{} for _, ingResource := range namespace.Ingresses { - i := ingress.New(c.store, ingResource, c.osArgs.IngressClass, c.osArgs.EmptyIngressClass, c.annotations) + i := ingress.New(ingResource, c.osArgs.IngressClass, c.osArgs.EmptyIngressClass, c.annotations) if !i.Supported(c.store, c.annotations) { logger.Debugf("ingress '%s/%s' ignored: no matching", ingResource.Namespace, ingResource.Name) } else { diff --git a/pkg/ingress/ingress.go b/pkg/ingress/ingress.go index a4b6c196..6fbaaeae 100644 --- a/pkg/ingress/ingress.go +++ b/pkg/ingress/ingress.go @@ -40,7 +40,7 @@ type Ingress struct { // New returns an Ingress instance to handle the k8s ingress resource given in params. // If the k8s ingress resource is not assigned to the controller (no matching IngressClass) // then New will return nil -func New(k store.K8s, resource *store.Ingress, class string, emptyClass bool, a annotations.Annotations) *Ingress { +func New(resource *store.Ingress, class string, emptyClass bool, a annotations.Annotations) *Ingress { return &Ingress{resource: resource, controllerClass: class, allowEmptyClass: emptyClass, annotations: a} } diff --git a/pkg/status/updatestatus.go b/pkg/status/updatestatus.go index 35734768..8b724032 100644 --- a/pkg/status/updatestatus.go +++ b/pkg/status/updatestatus.go @@ -51,7 +51,7 @@ func (m *UpdateStatusManagerImpl) Update(k store.K8s, h haproxy.HAProxy, a annot } for _, ingResource := range namespace.Ingresses { - i := ingress.New(k, ingResource, m.ingressClass, m.emptyIngressClass, a) + i := ingress.New(ingResource, m.ingressClass, m.emptyIngressClass, a) supported := i.Supported(k, a) if (!supported && (len(ingResource.Addresses) == 0 || !utils.EqualSliceStringsWithoutOrder(k.PublishServiceAddresses, ingResource.Addresses))) ||