Skip to content

Commit

Permalink
Merge pull request #7763 from idebeijer/docs/add-comment-leader-elect…
Browse files Browse the repository at this point in the history
…ion-flags

docs: add comment to prevent leader-election flag binding to be moved after flag parsing
  • Loading branch information
k8s-ci-robot authored Jan 24, 2025
2 parents 49a0c57 + 131e954 commit 26c8bbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cluster-autoscaler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ func main() {
}

leaderElection := leaderElectionConfiguration()
// Must be called before kube_flag.InitFlags() to ensure leader election flags are parsed and available.
componentopts.BindLeaderElectionFlags(&leaderElection, pflag.CommandLine)

logsapi.AddFlags(loggingConfig, pflag.CommandLine)
Expand Down

0 comments on commit 26c8bbd

Please sign in to comment.