From 9cc03a0f4f5e749f35b925e41b3c5caa45f19ea1 Mon Sep 17 00:00:00 2001 From: Ivan Matmati Date: Thu, 24 Oct 2024 18:11:48 +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 94f16f0c..45e965b9 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -137,7 +137,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 099cb9ed..386a0741 100644 --- a/pkg/ingress/ingress.go +++ b/pkg/ingress/ingress.go @@ -38,7 +38,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))) ||