Skip to content

Commit

Permalink
Fix breaking changes due to controller-runtime version upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Malay Kumar Parida <[email protected]>
  • Loading branch information
malayparida2000 committed Oct 19, 2023
1 parent 88fbc58 commit d3513db
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/cache"
apiclient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metrics "sigs.k8s.io/controller-runtime/pkg/metrics/server"
// +kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -129,14 +130,12 @@ func main() {
cfg := ctrl.GetConfigOrDie()
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Metrics: metrics.Options{BindAddress: metricsAddr},
HealthProbeBindAddress: probeAddr,
Port: 9443,
LeaderElection: enableLeaderElection,
LeaderElectionID: "ab76f4c9.openshift.io",
LeaderElectionNamespace: operatorNamespace,
Namespace: operatorNamespace,
Cache: cache.Options{Namespaces: []string{operatorNamespace}},
Cache: cache.Options{DefaultNamespaces: map[string]cache.Config{operatorNamespace: {}}},
})
if err != nil {
setupLog.Error(err, "unable to start manager")
Expand Down

0 comments on commit d3513db

Please sign in to comment.