Skip to content

Commit

Permalink
Allow for the leader election resourcelock to have a configurable name
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-sensenich authored and Marc Sensenich committed Oct 19, 2020
1 parent 0e8e609 commit 2b402b5
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 @@ -411,7 +411,7 @@ func main() {
lock, err := resourcelock.New(
leaderElection.ResourceLock,
*namespace,
"cluster-autoscaler",
leaderElection.ResourceName,
kubeClient.CoreV1(),
kubeClient.CoordinationV1(),
resourcelock.ResourceLockConfig{
Expand Down Expand Up @@ -449,6 +449,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 2b402b5

Please sign in to comment.