-
Notifications
You must be signed in to change notification settings - Fork 92
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
base: main
Are you sure you want to change the base?
Conversation
|
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 Once the patch is verified, the new status will be reflected by the 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. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
/ok-to-test |
|
/retitle Proposal to use tags for tracking PowerVS cluster resources |
Karthik-K-N
left a comment
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.
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
Karthik-K-N
left a comment
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.
Thanks for the PR, Most of the things are good,lets update it bit more to make it better.
48c48f4 to
e0b2d89
Compare
done |
d862267 to
0f4cb6b
Compare
Amulyam24
left a comment
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.
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. |
Amulyam24
left a comment
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.
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.
| - 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. |
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.
| - 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
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.
@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 .
c7fec6b to
14da794
Compare
Updated the flow diagram |
|
@arshadd-b, PTAL at the failing verify check |
sure will check |
7ab7dc5 to
da655fc
Compare
|
/retest |
|
Looks like some links are changed and returning 500 now. will have a look |
da655fc to
c49231d
Compare
Amulyam24
left a comment
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.
IMO, tagging a resource with UUID alone should suffice right?
As in either case we check with it at the end and decide the flow based on that. wdyt?
I think it should be okay to use only UUID alone So before creating we check if resource exist with same UUID, then error out to user. If it doesn't exist then create. |
I think that should be perfect, I can't recall why we didn't drop using name when we discoverd UUID is necessary |
| ### Controller tags | ||
| When cluster creation is triggered, resources gets created in the cloud. So to distinguish whether resources are newly created or user has given pre-existing resources, | ||
| tags of format`powervs.cluster.x-k8s.io/owner: <cluster-name>` and `powervs.cluster.x-k8s.io/cluster-uuid: UUID` will be added by the controller to newly created cloud resources marking the resource as created by controller. | ||
| During cluster creation with infrastructure creation if the resources are already present with the same name in the cloud. It will lead to security issues because there is a possibilty the existing resources in the cloud belong to different user. So to handle this scenario this tag `powervs.cluster.x-k8s.io/cluster-uuid: UUID` is added. UUID in tag `powervs.cluster.x-k8s.io/cluster-uuid: UUID` represents cluster object ID. |
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.
Are you planning to tag existing resource or not? Below statement stats that you are not and that makes sense. Maybe missed to remove?
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.
No if user is using existing resources to create cluster we won't add any tag
here we have mentioned https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/pull/2364/files#diff-702383f3b28082fe9eabfb59e5f348409edd0882e4f3a682690b3787847dd29eR36
c49231d to
51f1c13
Compare
|
Hi @Amulyam24 @Karthik-K-N @dharaneeshvrd |
Amulyam24
left a comment
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.
553d503 to
3f3d33d
Compare
done |
Prajyot-Parab
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Amulyam24, arshadd-b, Prajyot-Parab 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 |
|
Thanks! @arshadd-b |
|
/hold |
|
/test pull-cluster-api-provider-ibmcloud-verify |
|
/retest-required |
|
@arshadd-b: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
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
Release note: