Skip to content

Commit

Permalink
use context
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdiramen committed Jan 11, 2024
1 parent 8cfe6ad commit 3f4e7e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/controller/ingress/tcpedge_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (r *TCPEdgeReconciler) listTCPEdgesForIPPolicy(ctx context.Context, obj cli
}

edges := &ingressv1alpha1.TCPEdgeList{}
if err := r.Client.List(context.Background(), edges); err != nil {
if err := r.Client.List(ctx, edges); err != nil {
r.Log.Error(err, "failed to list TCPEdges for ippolicy", "name", policy.Name, "namespace", policy.Namespace)
return []reconcile.Request{}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/ingress/tlsedge_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (r *TLSEdgeReconciler) listTLSEdgesForIPPolicy(ctx context.Context, obj cli
}

edges := &ingressv1alpha1.TLSEdgeList{}
if err := r.Client.List(context.Background(), edges); err != nil {
if err := r.Client.List(ctx, edges); err != nil {
r.Log.Error(err, "failed to list TLSEdges for ippolicy", "name", policy.Name, "namespace", policy.Namespace)
return []reconcile.Request{}
}
Expand Down

0 comments on commit 3f4e7e6

Please sign in to comment.