-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 sync defined machine labels to node #11650
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
df52d4f
to
cb79cc3
Compare
cb79cc3
to
2d97f8a
Compare
2d97f8a
to
5ff55f6
Compare
main.go
Outdated
@@ -254,6 +255,14 @@ func InitFlags(fs *pflag.FlagSet) { | |||
"Use deprecated infrastructure machine naming") | |||
_ = fs.MarkDeprecated("use-deprecated-infra-machine-naming", "This flag will be removed in v1.9.") | |||
|
|||
fs.StringArrayVar(&syncMachineLabels, "sync-machine-labels", []string{ | |||
"node-role.kubernetes.io", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a use case to disable these ones? i.e should the flag always be additive over the core ones supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not have a strong preference i this case. From the original proposal it looks like the default labels were chosen because the they were identified as the recommended set of labels to sync down.
I am +1 if we should do additive to default list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know if some users might prefer a more granular setup and have different labels for different clusters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give sane defaults, if users want to disable or only allow a subnet, it should be an open choice imo
Thanks! let's please make sure to add a counter part issue and update the original proposal https://github.com/kubernetes-sigs/cluster-api/blob/12cd150d55330e04b2639396469786a6020a5b82/docs/proposals/20220927-label-sync-between-machine-and-nodes.md |
TODO:
|
Thanks for this! Something that would be useful here is some sort of wildcard support, in case administrators would like all labels propagated. |
This is supported by setting |
5ff55f6
to
804d45d
Compare
@ykakarap: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What this PR does / why we need it:
Add an flag to the CAPI manager to dictate the labels that should be synced form the Machine to the node. If the flag is not specified it defaults to:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #11657
/area machine