Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
olliewalsh committed Feb 21, 2024
1 parent 75e17cd commit 0490a14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions controllers/ovncontroller_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,18 @@ func (r *OVNControllerReconciler) SetupWithManager(mgr ctrl.Manager, ctx context
Complete(r)
}

func (r *OVNControllerReconciler) findObjectsForSrc(src client.Object) []reconcile.Request {
func (r *OVNControllerReconciler) findObjectsForSrc(ctx context.Context, src client.Object) []reconcile.Request {
requests := []reconcile.Request{}

l := log.FromContext(context.Background()).WithName("Controllers").WithName("OVNController")
l := log.FromContext(ctx).WithName("Controllers").WithName("OVNController")

for _, field := range allWatchFields {
crList := &ovnv1.OVNControllerList{}
listOps := &client.ListOptions{
FieldSelector: fields.OneTermEqualSelector(field, src.GetName()),
Namespace: src.GetNamespace(),
}
err := r.Client.List(context.TODO(), crList, listOps)
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
}
Expand Down
6 changes: 3 additions & 3 deletions controllers/ovndbcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,18 @@ func (r *OVNDBClusterReconciler) SetupWithManager(mgr ctrl.Manager) error {
Complete(r)
}

func (r *OVNDBClusterReconciler) findObjectsForSrc(src client.Object) []reconcile.Request {
func (r *OVNDBClusterReconciler) findObjectsForSrc(ctx context.Context, src client.Object) []reconcile.Request {
requests := []reconcile.Request{}

l := log.FromContext(context.Background()).WithName("Controllers").WithName("OVNDBCluster")
l := log.FromContext(ctx).WithName("Controllers").WithName("OVNDBCluster")

for _, field := range allWatchFields {
crList := &ovnv1.OVNDBClusterList{}
listOps := &client.ListOptions{
FieldSelector: fields.OneTermEqualSelector(field, src.GetName()),
Namespace: src.GetNamespace(),
}
err := r.Client.List(context.TODO(), crList, listOps)
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
}
Expand Down
6 changes: 3 additions & 3 deletions controllers/ovnnorthd_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,18 @@ func (r *OVNNorthdReconciler) SetupWithManager(mgr ctrl.Manager, ctx context.Con
Complete(r)
}

func (r *OVNNorthdReconciler) findObjectsForSrc(src client.Object) []reconcile.Request {
func (r *OVNNorthdReconciler) findObjectsForSrc(ctx context.Context, src client.Object) []reconcile.Request {
requests := []reconcile.Request{}

l := log.FromContext(context.Background()).WithName("Controllers").WithName("OVNNorthd")
l := log.FromContext(ctx).WithName("Controllers").WithName("OVNNorthd")

for _, field := range allWatchFields {
crList := &ovnv1.OVNNorthdList{}
listOps := &client.ListOptions{
FieldSelector: fields.OneTermEqualSelector(field, src.GetName()),
Namespace: src.GetNamespace(),
}
err := r.Client.List(context.TODO(), crList, listOps)
err := r.Client.List(ctx, crList, listOps)
if err != nil {
return []reconcile.Request{}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
k8s.io/api v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
sigs.k8s.io/controller-runtime v0.16.5
)

Expand Down Expand Up @@ -73,7 +74,6 @@ require (
k8s.io/component-base v0.28.3 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down

0 comments on commit 0490a14

Please sign in to comment.