Skip to content
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

Node Label Updates Not Propagated to Existing Machines #458

Closed
dgoodwin opened this issue Jul 26, 2018 · 3 comments
Closed

Node Label Updates Not Propagated to Existing Machines #458

dgoodwin opened this issue Jul 26, 2018 · 3 comments

Comments

@dgoodwin
Copy link
Contributor

Not sure if this is expected behavior or not, we allow defining some object metadata for nodes here: https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/machine_types.go#L52

This does mention node "creation" specifically.

Today if you later go edit these labels on a machine set, the changes do not get reflected in pre-existing machines. Only once you delete the machine and wait for a new one to be created will they appear. This means any controller syncing on machines to apply those labels to the node on an on-going basis will not work.

Is this expected? Should node labels be a one time deal or a persistent managed set of labels to apply?

Worth noting if we do support updates, removing one won't work as we can't assume to fully sync the set of labels, other things or the user themselves may be setting labels. It would only be additive, or changing an existing nodes value that would be possible I think.

@ingvagabund
Copy link
Contributor

Worth noting if we do support updates, removing one won't work as we can't assume to fully sync the set of labels, other things or the user themselves may be setting labels. It would only be additive, or changing an existing nodes value that would be possible I think.

Would it make sense to divide the labels into cluster-api managed labels and user managed ones? E.g. all labels prefixed with cluster.k8s.io and whitelisted can be removed/updated/added. If a user sets a label that does not belong to both groups just don't do anything?

@roberthbailey
Copy link
Contributor

@dgoodwin - just seeing this issue. I don't recall if this was intentional or just an oversight. I think it would be worth seeing what the behavior is with the same labels changes in replicasets and how they propogate, or don't, to pods so we can match that behavior.

@roberthbailey
Copy link
Contributor

I'm going to close this in favor of #493, where we are going to implement label application on node creation. We should fix the code comments / docs to reflect that the labels aren't actively reconciled (or if some of them are, which ones) since labels / taints need to be additive and not authoritative.

jayunit100 pushed a commit to jayunit100/cluster-api that referenced this issue Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants