diff --git a/examples/sample-operator/cmd/manager/main.go b/examples/sample-operator/cmd/manager/main.go index 68126533..b7264579 100644 --- a/examples/sample-operator/cmd/manager/main.go +++ b/examples/sample-operator/cmd/manager/main.go @@ -9,6 +9,8 @@ import ( "runtime" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) + _ "k8s.io/client-go/plugin/pkg/client/auth" + "github.com/operator-framework/operator-sdk/pkg/k8sutil" kubemetrics "github.com/operator-framework/operator-sdk/pkg/kube-metrics" "github.com/operator-framework/operator-sdk/pkg/leader" @@ -18,7 +20,6 @@ import ( "github.com/spf13/pflag" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - _ "k8s.io/client-go/plugin/pkg/client/auth" "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client/config" logf "sigs.k8s.io/controller-runtime/pkg/log" diff --git a/examples/sample-operator/pkg/controller/sampleconfig/controller.go b/examples/sample-operator/pkg/controller/sampleconfig/controller.go index 42b69083..5d53744e 100644 --- a/examples/sample-operator/pkg/controller/sampleconfig/controller.go +++ b/examples/sample-operator/pkg/controller/sampleconfig/controller.go @@ -136,7 +136,7 @@ type ReconcileSampleConfig struct { // Reconcile reads that state of the cluster for a SampleConfig object and makes changes based on the state read // and what is in the SampleConfig.Spec -func (r *ReconcileSampleConfig) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) { +func (r *ReconcileSampleConfig) Reconcile(_ context.Context, request reconcile.Request) (reconcile.Result, error) { reqLogger := log.WithValues("Request.Namespace", request.Namespace, "Request.Name", request.Name) reqLogger.Info("Reconciling SampleConfig") return r.reconciler.Reconcile(request, r.operatorArgs.OperatorVersion, reqLogger)