Migrate components to EndpointsLeases leader election lock

This commit is contained in:
wojtekt
2019-10-18 12:59:59 +02:00
parent 7d13dfe3c3
commit ce499ac286
5 changed files with 12 additions and 4 deletions

View File

@@ -126,6 +126,10 @@ func RecommendedDefaultGenericControllerManagerConfiguration(obj *kubectrlmgrcon
obj.Controllers = []string{"*"}
}
if len(obj.LeaderElection.ResourceLock) == 0 {
obj.LeaderElection.ResourceLock = "endpointsleases"
}
// Use the default ClientConnectionConfiguration and LeaderElectionConfiguration options
componentbaseconfigv1alpha1.RecommendedDefaultClientConnectionConfiguration(&obj.ClientConnection)
componentbaseconfigv1alpha1.RecommendedDefaultLeaderElectionConfiguration(&obj.LeaderElection)