Migrate scheduler, controller-manager and cloud-controller-manager to lease lock.

This commit is contained in:
wojtekt
2020-09-08 08:21:57 +02:00
parent 92d8429651
commit 805c1753cd
6 changed files with 23 additions and 16 deletions

View File

@@ -130,7 +130,10 @@ func RecommendedDefaultGenericControllerManagerConfiguration(obj *kubectrlmgrcon
}
if len(obj.LeaderElection.ResourceLock) == 0 {
obj.LeaderElection.ResourceLock = "endpointsleases"
// Use lease-based leader election to reduce cost.
// We migrated for EndpointsLease lock in 1.17 and starting in 1.20 we
// migrated to Lease lock.
obj.LeaderElection.ResourceLock = "leases"
}
// Use the default ClientConnectionConfiguration and LeaderElectionConfiguration options