-
Notifications
You must be signed in to change notification settings - Fork 117
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
Support for IaaS machine tags for all machines in a worker pool #750
Comments
IIUC, they would also require that they can change the tags after the machines are created? @unmarshall @rishabh-11 this is exactly the use-case which we were discussing yesterday while discussing project-wide ssh keys |
Good question, but I guess on create is sufficient and simpler to build (with an admission plugin to prevent changing the tags in the shoot spec)? It would be a lot more effort to "revisit" machines again and change them, right (we do not do that today/yet)? |
|
OK, then let's focus on immutable tags. That we then initiate a rolling update is the right thing. 👍 |
Proposed solution:
Then we can have a mechanism of syncingVMTags just like we have it for syncing nodeMachineAnnotation/lables/taints. cc @elankath |
I went through the code again, and this is what we follow currently : |
Yes, i tested this as well. I added labels to the shoot yaml and it was correctly reflected in the machine class. Name of the machine class contains a name which comprises of the deployment name and a worker pool Hash. This does not include labels so any change made to labels will not change the hash and will thus not cause a rolling update. However the machine objects did not get the updated tags. If we take AWS then they provide API to update tags (Golang API). But i did not find any reference/usage of this API today in our code. |
We don't really want to cause a rolling update of all VMs for a label change so we don't trigger a hash change when labels are added. It still has the effect that the node objects are updated with the new labels AFAIK but not the machines. Ideally we could have a hook in the MCM lifecycle that updates the VMs with as many attributes as it can update (ignoring those it can't update) |
We had a meeting , and we decided the following approach:
|
Uh, that sounds a bit "ugly", doesn't it? I mean: Dear user, you can/have to place tags under labels (not tags), but with a "magic" prefix, that is then cut off later before it materialises as tag and btw, the label you just defined, won't materialise as label at the node, despite being added to the label section. We won't win a beauty contest this way. What was the motivation for this proposal? |
Yes it sounds ugly but we considered the following benefits:
If we use the |
Only learnt recently that the the labels in the worker pool are meant to be applied on I agree that labels is now no longer clear if we include tags that should only be applied to VMs and should not be added to Node as labels. I really wish the tags:
- vm:
key1: value1
key2: value2
- network:
- key3
- key4 |
If we go with the approach to keep them as labels, then i would recommend that we properly choose a prefix which can then be extended to support other kinds of tags in the future. Proposal: Also to keep things consistent then all labels should also be visible on the Node/Machine objects as well and only labels which are namespaced/prefixed with In addition, somewhere these prefixes should be clearly documented so that consumers are aware of the correct way to set these tags. Drawbacks of using the label approach for VM tags:
|
needs |
What would you like to be added:
Gardener adopters like to provide IaaS machine tags for all machines in a worker pool, much like labels, annotations, and taints are provided in the
shoot
spec perworker
pool. All machines in that pool shall be created with those tags (ideally atomically, i.e. machine+tags together, so that there is no intermediate state with machines with no/missing tags), e.g.:Why is this needed:
For asset management various Gardener adopters rely on machine tags to automatically classify machines. Since Gardener/MCM creates those, adopters have no way today to provide those with Gardener so that Gardner/MCM creates them for all machines in a worker pool uniformly.
The text was updated successfully, but these errors were encountered: