Skip to content

Commit

Permalink
Initialise ingress capability
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Salway <[email protected]>
  • Loading branch information
jacobsalway committed Sep 29, 2024
1 parent d37a0e9 commit 77ae0a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/operator/controller/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 77ae0a6

Please sign in to comment.