Skip to content

Commit

Permalink
BUG: remove unnecessary store argument for ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmatmati authored and oktalz committed Oct 25, 2024
1 parent 3577793 commit 9cc03a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/status/updatestatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))) ||
Expand Down

0 comments on commit 9cc03a0

Please sign in to comment.