Skip to content

Commit

Permalink
CNF-10294: main: remove deprecated multi ns function (#770)
Browse files Browse the repository at this point in the history
* main: remove deprecated multi ns function

The latest operator SDK version allow specifying
multiple namespaces directly as part of the cache options.

Functionality would remain the same.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>

* main: remove lint skip

The issue was with the depracated function, now that we fix it, we can remove the annotation.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>

---------

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
  • Loading branch information
Tal-or committed Nov 8, 2023
1 parent 12b9a12 commit f2e0fb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/cluster-node-tuning-operator/main.go
Expand Up @@ -123,7 +123,7 @@ func operatorRun() {
restConfig := ctrl.GetConfigOrDie()
le := util.GetLeaderElectionConfig(restConfig, enableLeaderElection)
mgr, err := ctrl.NewManager(rest.AddUserAgent(ctrl.GetConfigOrDie(), version.OperatorFilename), ctrl.Options{
NewCache: cache.MultiNamespacedCacheBuilder(namespaces), //nolint:staticcheck
Cache: cache.Options{Namespaces: namespaces},
Scheme: scheme,
LeaderElection: enableLeaderElection,
LeaderElectionID: config.OperatorLockName,
Expand All @@ -132,7 +132,6 @@ func operatorRun() {
LeaseDuration: &le.LeaseDuration.Duration,
RetryPeriod: &le.RetryPeriod.Duration,
RenewDeadline: &le.RenewDeadline.Duration,
Namespace: ntoNamespace,
WebhookServer: webhook.NewServer(webhook.Options{
Port: webhookPort,
CertDir: webhookCertDir,
Expand Down

0 comments on commit f2e0fb3

Please sign in to comment.