From cc372e2059ea3b19aab986d6c9603137a381616b Mon Sep 17 00:00:00 2001 From: Himanshu Sharma Date: Fri, 22 Jul 2022 14:44:11 +0530 Subject: [PATCH] migrate from endpointleases to leases --- kubernetes/deployment/in-tree/control-cluster-role.yaml | 1 - kubernetes/deployment/in-tree/target-cluster-role.yaml | 1 - kubernetes/deployment/out-of-tree/control-cluster-role.yaml | 1 - kubernetes/deployment/out-of-tree/target-cluster-role.yaml | 1 - pkg/util/client/leaderelectionconfig/config.go | 3 +-- 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/kubernetes/deployment/in-tree/control-cluster-role.yaml b/kubernetes/deployment/in-tree/control-cluster-role.yaml index e1c73c70e..a2f57544e 100644 --- a/kubernetes/deployment/in-tree/control-cluster-role.yaml +++ b/kubernetes/deployment/in-tree/control-cluster-role.yaml @@ -31,7 +31,6 @@ rules: - nodes/status - configmaps - secrets - - endpoints - events verbs: - create diff --git a/kubernetes/deployment/in-tree/target-cluster-role.yaml b/kubernetes/deployment/in-tree/target-cluster-role.yaml index 4b52bdf3a..4369881c2 100644 --- a/kubernetes/deployment/in-tree/target-cluster-role.yaml +++ b/kubernetes/deployment/in-tree/target-cluster-role.yaml @@ -7,7 +7,6 @@ rules: - "" resources: - nodes - - endpoints - replicationcontrollers - pods verbs: diff --git a/kubernetes/deployment/out-of-tree/control-cluster-role.yaml b/kubernetes/deployment/out-of-tree/control-cluster-role.yaml index 9ef87408f..ba3c0e5fc 100644 --- a/kubernetes/deployment/out-of-tree/control-cluster-role.yaml +++ b/kubernetes/deployment/out-of-tree/control-cluster-role.yaml @@ -36,7 +36,6 @@ rules: - nodes/status - configmaps - secrets - - endpoints - events verbs: - create diff --git a/kubernetes/deployment/out-of-tree/target-cluster-role.yaml b/kubernetes/deployment/out-of-tree/target-cluster-role.yaml index 259a03367..4c35d7205 100644 --- a/kubernetes/deployment/out-of-tree/target-cluster-role.yaml +++ b/kubernetes/deployment/out-of-tree/target-cluster-role.yaml @@ -7,7 +7,6 @@ rules: - "" resources: - nodes - - endpoints - replicationcontrollers - pods verbs: diff --git a/pkg/util/client/leaderelectionconfig/config.go b/pkg/util/client/leaderelectionconfig/config.go index 446beb5a7..6a14132f8 100644 --- a/pkg/util/client/leaderelectionconfig/config.go +++ b/pkg/util/client/leaderelectionconfig/config.go @@ -44,8 +44,7 @@ func DefaultLeaderElectionConfiguration() options.LeaderElectionConfiguration { LeaseDuration: metav1.Duration{Duration: DefaultLeaseDuration}, RenewDeadline: metav1.Duration{Duration: DefaultRenewDeadline}, RetryPeriod: metav1.Duration{Duration: DefaultRetryPeriod}, - // TODO(acumino): migrate default to `leases` in one of the next releases - ResourceLock: rl.EndpointsLeasesResourceLock, + ResourceLock: rl.LeasesResourceLock, } }