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

Refactor vsphere tagging mechanism #1532

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

moadqassem
Copy link
Member

@moadqassem moadqassem commented Jan 13, 2023

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:

Stop creating and deleting vSphere tags unconditionally in machine controller.

Documentation:

None

Signed-off-by: Moath Qasim <moad.qassem@gmail.com>
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. sig/osm Denotes a PR or issue as being assigned to SIG OSM. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. docs/none Denotes a PR that doesn't need documentation (changes). and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Jan 13, 2023
@moadqassem
Copy link
Member Author

/retest

1 similar comment
@moadqassem
Copy link
Member Author

/retest

Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve 🚀

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b4e1a69d5aa9a680ec8febb6d7a05076c024dc06

@kubermatic-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/osm Denotes a PR or issue as being assigned to SIG OSM. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants