From d3fbf0cb1ac4f17d188fc6ec2e6fbd6897d73ae3 Mon Sep 17 00:00:00 2001 From: Sonu Kumar Singh Date: Fri, 22 Jul 2022 20:36:36 +0530 Subject: [PATCH] migrate from endpointleases to leases (#711) Co-authored-by: Himanshu Sharma --- 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, } }