Skip to content

Commit

Permalink
avoid deprecated code (#618)
Browse files Browse the repository at this point in the history
Signed-off-by: David J. M. Karlsen <[email protected]>
  • Loading branch information
davidkarlsen authored Feb 11, 2024
1 parent 724f285 commit d4335d5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

Expand Down Expand Up @@ -71,15 +70,12 @@ func main() {
Scheme: scheme,
MetricsBindAddress: metricsAddr,
HealthProbeBindAddress: healthProbeAddr,
Port: 9443,
Namespace: namespace,
LeaderElection: enableLeaderElection,
LeaderElectionID: "4ef9cd91.tietoevry.com",
LeaderElectionResourceLock: "configmapsleases",
}
if strings.Contains(namespace, ",") {
options.Namespace = ""
options.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(namespace, ","))
options.Cache.Namespaces = strings.Split(namespace, ",")
}
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), options)

Expand Down

0 comments on commit d4335d5

Please sign in to comment.