diff --git a/cmd/operator/controller/start.go b/cmd/operator/controller/start.go index f34be8c8d..05ff27fab 100644 --- a/cmd/operator/controller/start.go +++ b/cmd/operator/controller/start.go @@ -26,6 +26,7 @@ import ( // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) // to ensure that exec-entrypoint and run can make use of them. "golang.org/x/time/rate" + "k8s.io/client-go/kubernetes" _ "k8s.io/client-go/plugin/pkg/client/auth" "github.com/spf13/cobra" @@ -228,6 +229,17 @@ func start() { os.Exit(1) } + clientset, err := kubernetes.NewForConfig(cfg) + if err != nil { + logger.Error(err, "failed to create clientset") + os.Exit(1) + } + + if err = util.InitializeIngressCapabilities(clientset); err != nil { + logger.Error(err, "failed to retrieve cluster ingress capabilities") + os.Exit(1) + } + var registry *scheduler.Registry if enableBatchScheduler { registry = scheduler.GetRegistry()