From 2b402b56703556de381a6ea7177e2a846c4ba3c4 Mon Sep 17 00:00:00 2001 From: Marc Sensenich Date: Sat, 22 Feb 2020 12:07:07 -0500 Subject: [PATCH] Allow for the leader election resourcelock to have a configurable name --- cluster-autoscaler/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster-autoscaler/main.go b/cluster-autoscaler/main.go index 258011cb9221..9ef17aa09b05 100644 --- a/cluster-autoscaler/main.go +++ b/cluster-autoscaler/main.go @@ -411,7 +411,7 @@ func main() { lock, err := resourcelock.New( leaderElection.ResourceLock, *namespace, - "cluster-autoscaler", + leaderElection.ResourceName, kubeClient.CoreV1(), kubeClient.CoordinationV1(), resourcelock.ResourceLockConfig{ @@ -449,6 +449,7 @@ func defaultLeaderElectionConfiguration() componentbaseconfig.LeaderElectionConf RenewDeadline: metav1.Duration{Duration: defaultRenewDeadline}, RetryPeriod: metav1.Duration{Duration: defaultRetryPeriod}, ResourceLock: resourcelock.LeasesResourceLock, + ResourceName: "cluster-autoscaler", } }