diff --git a/cluster-autoscaler/main.go b/cluster-autoscaler/main.go index 4e1baf592d06..a7360a527132 100644 --- a/cluster-autoscaler/main.go +++ b/cluster-autoscaler/main.go @@ -419,7 +419,7 @@ func main() { lock, err := resourcelock.New( leaderElection.ResourceLock, *namespace, - "cluster-autoscaler", + leaderElection.ResourceName, kubeClient.CoreV1(), kubeClient.CoordinationV1(), resourcelock.ResourceLockConfig{ @@ -457,6 +457,7 @@ func defaultLeaderElectionConfiguration() componentbaseconfig.LeaderElectionConf RenewDeadline: metav1.Duration{Duration: defaultRenewDeadline}, RetryPeriod: metav1.Duration{Duration: defaultRetryPeriod}, ResourceLock: resourcelock.LeasesResourceLock, + ResourceName: "cluster-autoscaler", } }