Skip to content

Commit

Permalink
chore: ensure functiosns use inherited context
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Aug 5, 2024
1 parent 8c1505c commit 5cb40ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/controller/modelregistry_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (
"context"
errors2 "errors"
"fmt"
"strings"
"text/template"

"github.com/banzaicloud/k8s-objectmatcher/patch"
"github.com/go-logr/logr"
authorino "github.com/kuadrant/authorino/api/v1beta2"
Expand Down Expand Up @@ -48,8 +51,6 @@ import (
klog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"strings"
"text/template"
)

const (
Expand Down Expand Up @@ -995,7 +996,7 @@ func (r *ModelRegistryReconciler) setClusterDomain(ctx context.Context, registry
} else if r.IsOpenShift {
ingress := configv1.Ingress{}
namespacedName := types.NamespacedName{Name: "cluster"}
err = r.Client.Get(context.Background(), namespacedName, &ingress)
err = r.Client.Get(ctx, namespacedName, &ingress)
if err != nil {
return err
}
Expand Down

0 comments on commit 5cb40ce

Please sign in to comment.