-
Notifications
You must be signed in to change notification settings - Fork 131
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
Refactor vsphere tagging mechanism #1532
Refactor vsphere tagging mechanism #1532
Conversation
Signed-off-by: Moath Qasim <moad.qassem@gmail.com>
/retest |
1 similar comment
/retest |
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.
/approve 🚀
LGTM label has been added. Git tree hash: b4e1a69d5aa9a680ec8febb6d7a05076c024dc06
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahmedwaleedmalik, moadqassem The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
When a new tag is being added to a vsphere machine deployment, a new tag is being created(if it didn't exist) and assign it to the machine. Once the machine is cleaned up, machine controller would simply delete that tag. Such a scenario is implemented in different cloud provider. However, vSphere tags are kinda different from a structure perspective, as tags must first belong to a tag category and then they can be assigned. In addition to that, tags can from different categories can be shared across different inventory resources.
With that being said, if a machine being cleaned up and one tag is assigned to another VM, this tag will be lost. Also, if tags are created manually be users and assign across different resources, machine controller should never delete any resources which is not managed by it.
This PR changes this behaviour to either attach tags on VMs or detach them in case of machine cleanups instead of deleting or creating those tags.
Which issue(s) this PR fixes:
Fixes #
What type of PR is this?
/kind bug
/kind api-change
/kind feature
Special notes for your reviewer:
Does this PR introduce a user-facing change? Then add your Release Note here:
Documentation: