-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unknown flag: --leader-elect
, all leader-elect flags are unknown since 1.32.0
#7668
Comments
Hi, We are experiencing same issue on version |
Seems it isn't the first time it happened: #6115 Maybe we should add a comment to the code above |
Per your suggestion @aleksandra-malinowska, I have added a comment to try and prevent this bug from happening again in the future. (#7763) I have also manually cherry picked the fix to |
Appreciate you fixing that so quickly @idebeijer. Is there any chance we can get a 1.32.1 release that includes the fix? |
Hi @CameronHall, unfortunately I can't create a release as I'm not a maintainer and I'm fairly new to all this so I don't exactly know how the release process works for the cluster-autoscaler. I believe we can ask in the #sig-autoscaling Kubernetes Slack channel if there is any release planned or being worked on. |
We've had a great experience using this library for flags parsing that makes all this declarative: Not sure if there would be appetite to migrate but I would highly recommend if there is. |
Which component are you using?:
/area cluster-autoscaler
What version of the component are you using?:
Component version:
1.32.0
What k8s version are you using (
kubectl version
)?:kubectl version
OutputWhat environment is this in?:
AWS but not with EKS just EC2 and self-managed k8s.
What did you expect to happen?:
When upgrading the cluster-autoscaler from 1.31.0 to 1.32.0 the
--leader-elect
flag would still exists.What happened instead?:
The cluster-autoscaler crashed saying the
--leader-elect
flag is unknown:How to reproduce it (as minimally and precisely as possible):
Start the cluster-autoscaler version 1.32.0+ and set any of the following flags:
Anything else we need to know?:
This bug is likely the result of c382519.
In the main func since above commit,
kube_flag.InitFlags()
is called beforecomponentopts.BindLeaderElectionFlags(&leaderElection, pflag.CommandLine)
. When I check out the repository and callkube_flag.InitFlags()
aftercomponentopts.BindLeaderElectionFlags(&leaderElection, pflag.CommandLine)
like before the above commit, then runninggo run main.go --help
shows the flags again.The text was updated successfully, but these errors were encountered: