Skip to content

Commit 9cc03a0

Browse files
ivanmatmatioktalz
authored andcommitted
BUG: remove unnecessary store argument for ingress
1 parent 3577793 commit 9cc03a0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/controller/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (c *HAProxyController) updateHAProxy() {
137137
}
138138
c.store.SecretsProcessed = map[string]struct{}{}
139139
for _, ingResource := range namespace.Ingresses {
140-
i := ingress.New(c.store, ingResource, c.osArgs.IngressClass, c.osArgs.EmptyIngressClass, c.annotations)
140+
i := ingress.New(ingResource, c.osArgs.IngressClass, c.osArgs.EmptyIngressClass, c.annotations)
141141
if !i.Supported(c.store, c.annotations) {
142142
logger.Debugf("ingress '%s/%s' ignored: no matching", ingResource.Namespace, ingResource.Name)
143143
} else {

pkg/ingress/ingress.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type Ingress struct {
3838
// New returns an Ingress instance to handle the k8s ingress resource given in params.
3939
// If the k8s ingress resource is not assigned to the controller (no matching IngressClass)
4040
// then New will return nil
41-
func New(k store.K8s, resource *store.Ingress, class string, emptyClass bool, a annotations.Annotations) *Ingress {
41+
func New(resource *store.Ingress, class string, emptyClass bool, a annotations.Annotations) *Ingress {
4242
return &Ingress{resource: resource, controllerClass: class, allowEmptyClass: emptyClass, annotations: a}
4343
}
4444

pkg/status/updatestatus.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (m *UpdateStatusManagerImpl) Update(k store.K8s, h haproxy.HAProxy, a annot
5151
}
5252

5353
for _, ingResource := range namespace.Ingresses {
54-
i := ingress.New(k, ingResource, m.ingressClass, m.emptyIngressClass, a)
54+
i := ingress.New(ingResource, m.ingressClass, m.emptyIngressClass, a)
5555
supported := i.Supported(k, a)
5656

5757
if (!supported && (len(ingResource.Addresses) == 0 || !utils.EqualSliceStringsWithoutOrder(k.PublishServiceAddresses, ingResource.Addresses))) ||

0 commit comments

Comments
 (0)