Skip to content

Proposal to use tags for tracking PowerVS cluster resources #2364

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

arshadd-b
Copy link
Contributor

What this PR does / why we need it:
Proposal for adding the tags to PowerVS Cluster resources and performing delete of resources on the bases of tags
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 #

Special notes for your reviewer:

/area provider/ibmcloud

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Add tags to PowerVS Cluster resources and delete resources based on tags

@k8s-ci-robot k8s-ci-robot added the area/provider/ibmcloud Issues or PRs related to ibmcloud provider label May 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: arshadd-b
Once this PR has been reviewed and has the lgtm label, please assign prajyot-parab for approval. For more information see the Code Review Process.

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

@k8s-ci-robot k8s-ci-robot requested a review from Karthik-K-N May 20, 2025 08:00
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 20, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 20, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @arshadd-b. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 20, 2025
Copy link

netlify bot commented May 20, 2025

Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!

Name Link
🔨 Latest commit 14da794
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-ibmcloud/deploys/684fd89ead7e920008fbc82a
😎 Deploy Preview https://deploy-preview-2364.cluster-api-ibmcloud.sigs.k8s.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Amulyam24
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 20, 2025
@Amulyam24
Copy link
Contributor

/retitle Proposal to use tags for tracking PowerVS cluster resources

@k8s-ci-robot k8s-ci-robot changed the title Add tags to PowerVS Cluster resources and delete resources based on tags Proposal to use tags for tracking PowerVS cluster resources May 22, 2025
Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

In the delete flow diagram, I think If is not needed inside the rhombus as its already a decision block
In create flow diagram I think you missed to consider COSInstance

Copy link
Contributor

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, Most of the things are good,lets update it bit more to make it better.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 29, 2025
@arshadd-b arshadd-b force-pushed the add-tags-proposal branch from 48c48f4 to e0b2d89 Compare May 29, 2025 13:48
@arshadd-b
Copy link
Contributor Author

In the delete flow diagram, I think If is not needed inside the rhombus as its already a decision block In create flow diagram I think you missed to consider COSInstance

done

@arshadd-b arshadd-b requested a review from Karthik-K-N May 30, 2025 10:22
@arshadd-b arshadd-b force-pushed the add-tags-proposal branch from e0b2d89 to d862267 Compare May 30, 2025 13:24
@arshadd-b arshadd-b force-pushed the add-tags-proposal branch from d862267 to 0f4cb6b Compare May 30, 2025 13:29
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 30, 2025
Copy link
Contributor

@Amulyam24 Amulyam24 left a comment

Choose a reason for hiding this comment

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

Hi @arshadd-b, Thank you for the proposal!

I'm not clear on how user tags will be used apart from the controller tag. Can you please share more details on it?

@arshadd-b
Copy link
Contributor Author

Hi @arshadd-b, Thank you for the proposal!

I'm not clear on how user tags will be used apart from the controller tag. Can you please share more details on it?

Hi @Amulyam24 , It is the same functionality that we do from UI, adding tags to IBM Cloud resources if user wants to tag resources. It can help to user in resource management.

@arshadd-b arshadd-b requested a review from Amulyam24 June 11, 2025 14:25
Copy link
Contributor

@Amulyam24 Amulyam24 left a comment

Choose a reason for hiding this comment

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

Hi @Amulyam24 , It is the same functionality that we do from UI, adding tags to IBM Cloud resources if user wants to tag resources. It can help to user in resource management.

Got it, Thanks for the clarification.

A couple of suggestions have been added.

In the create flow diagram, how about we enhance the condition such as cluster.spec.UserTags > 0 , then proceed to attach user provided tags.

Comment on lines 37 to 38
- Currently TransitGateway Connections doesn't support tagging, So we will handle deletion of connections based on VPC.
- DHCP Server doesn't support tagging, So we will tag DHCP Network and handle deletion based on Network.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Currently TransitGateway Connections doesn't support tagging, So we will handle deletion of connections based on VPC.
- DHCP Server doesn't support tagging, So we will tag DHCP Network and handle deletion based on Network.
Currently transit gateway connections and DHCP server don't support tagging. We will handle their deletion using the VPC and network tag respectively.

When DHCP server is created, we use its network right, is that taggable?

should we depend on workspace resource tag instead?

cc @Karthik-K-N

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Amulyam24 Actually there is ause case when workspace is already created but DHCP network is newly created,
in that case we want to delete the network only not workspace. So for this case we have to tag the network.
I have already checked for network tagging is supported .

// IBMPowerVSClusterSpec defines the desired state of IBMPowerVSCluster.
type IBMPowerVSClusterSpec struct {

// UserTags contains list of tags needs to be applied on resources
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// UserTags contains list of tags needs to be applied on resources
// UserTags contains list of tags needs to be attached to resources

Will the user provided tags be attached to all the cluster resources?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes User tags will be added to all the cluster resources

@arshadd-b arshadd-b force-pushed the add-tags-proposal branch from c7fec6b to 14da794 Compare June 16, 2025 08:41
@arshadd-b
Copy link
Contributor Author

Hi @Amulyam24 , It is the same functionality that we do from UI, adding tags to IBM Cloud resources if user wants to tag resources. It can help to user in resource management.

Got it, Thanks for the clarification.

A couple of suggestions have been added.

In the create flow diagram, how about we enhance the condition such as cluster.spec.UserTags > 0 , then proceed to attach user provided tags.

Updated the flow diagram

@arshadd-b arshadd-b requested a review from Amulyam24 June 17, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants