Skip to content

Commit

Permalink
fix: only consider matching ingress class (STRRL#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcaldwell authored Nov 25, 2023
1 parent ec9de57 commit 92c327d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/controller/ingress-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,16 @@ func (i *IngressController) listControlledIngressClasses(ctx context.Context) ([
if err != nil {
return nil, errors.Wrap(err, "list ingress classes")
}
return list.Items, nil

filteredList := make([]networkingv1.IngressClass, 0, len(list.Items))
for _, ingress := range list.Items {
if ingress.Spec.Controller != i.controllerClassName {
continue
}
filteredList = append(filteredList, ingress)
}

return filteredList, nil
}

func (i *IngressController) listControlledIngresses(ctx context.Context) ([]networkingv1.Ingress, error) {
Expand Down

0 comments on commit 92c327d

Please sign in to comment.