Skip to content

Commit

Permalink
Merge pull request kubernetes#3630 from marc-sensenich/configurable-l…
Browse files Browse the repository at this point in the history
…eader-election-resource-lock-name

Allow for the leader election resourcelock to have a configurable name
  • Loading branch information
k8s-ci-robot authored Jan 27, 2021
2 parents b72d066 + 2b402b5 commit b470c62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cluster-autoscaler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func main() {
lock, err := resourcelock.New(
leaderElection.ResourceLock,
*namespace,
"cluster-autoscaler",
leaderElection.ResourceName,
kubeClient.CoreV1(),
kubeClient.CoordinationV1(),
resourcelock.ResourceLockConfig{
Expand Down Expand Up @@ -457,6 +457,7 @@ func defaultLeaderElectionConfiguration() componentbaseconfig.LeaderElectionConf
RenewDeadline: metav1.Duration{Duration: defaultRenewDeadline},
RetryPeriod: metav1.Duration{Duration: defaultRetryPeriod},
ResourceLock: resourcelock.LeasesResourceLock,
ResourceName: "cluster-autoscaler",
}
}

Expand Down

0 comments on commit b470c62

Please sign in to comment.