Skip to content

Commit 99bcbe8

Browse files
committed
fix: r
Signed-off-by: ashing <[email protected]>
1 parent ea2c857 commit 99bcbe8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/controller/ingress_controller.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ func (r *IngressReconciler) checkIngressClass(obj client.Object) bool {
150150
// if it does not match, check if the ingress class is controlled by us
151151
ingressClass := networkingv1.IngressClass{}
152152
if err := r.Client.Get(context.Background(), client.ObjectKey{Name: *ingress.Spec.IngressClassName}, &ingressClass); err != nil {
153-
r.Log.Error(err, "failed to get ingress class", "ingress", ingress.GetName(), "ingressclass", *ingress.Spec.IngressClassName)
154153
return false
155154
}
156155

@@ -172,7 +171,7 @@ func (r *IngressReconciler) matchesIngressController(obj client.Object) bool {
172171
func (r *IngressReconciler) listIngressForIngressClass(ctx context.Context, ingressClass client.Object) []reconcile.Request {
173172
ingressList := &networkingv1.IngressList{}
174173
if err := r.List(ctx, ingressList, client.MatchingFields{
175-
indexer.IngressClass: ingressClass.GetName(),
174+
indexer.IngressClassRef: ingressClass.GetName(),
176175
}); err != nil {
177176
r.Log.Error(err, "failed to list ingresses for ingress class", "ingressclass", ingressClass.GetName())
178177
return nil

0 commit comments

Comments
 (0)