-
Notifications
You must be signed in to change notification settings - Fork 89
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
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: arshadd-b 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 |
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 |
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
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.
|
||
|
||
## Motivation | ||
PowerVS cluster reconciler sets controllercreated field whenever resource is created by controller, which was initially introduced to allow proper cleanup of newly created resource vs the use of existing resources. |
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.
I think you need to start with something the existing system like
PowerVS cluster creation supports both creating infrastructure required for cluster creation and also use of existing resources.
2. The status is expected to be created from spec, considering the scenario of backup and recover. If we move the spec to fresh management cluster which is setting the status, the controller created will be set as false as the resource already exists in cloud but it was created during its previous concilation. | ||
|
||
## Goal | ||
1. This proposal aims to tag the PowerVS clusters and delete the resources created by controller based on tag. |
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.
1. This proposal aims to tag the PowerVS clusters and delete the resources created by controller based on tag. | |
1. This proposal aims to tag the PowerVS cluster's cloud resources and delete the resources created by controller based on tag. |
|
||
## Goal | ||
1. This proposal aims to tag the PowerVS clusters and delete the resources created by controller based on tag. | ||
2. User should be able to add tags to the resources if he wants. |
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.
2. User should be able to add tags to the resources if he wants. | |
2. Provide user ability to set custom tags to cloud resources. |
|
||
|
||
### Controller tag | ||
Add Controller tag `powervs.cluster.x-k8s.io-resource-owner:<cluster_name>` to handle deletion of PowerVS Cluster resources created by controller |
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.
Can we update something like?
Add Controller tag `powervs.cluster.x-k8s.io-resource-owner:<cluster_name>` to handle deletion of PowerVS Cluster resources created by controller | |
A tag of format`powervs.cluster.x-k8s.io-resource-owner:<cluster_name>` will be added by the controller to newly created cloud resources marking the resource as created by controller. | |
During deletion phase the system will look for the presence of the tag inorder to proceed with deletion or to keep as it is. |
```shell | ||
|
||
// IBMPowerVSClusterSpec defines the desired state of IBMPowerVSCluster. | ||
type IBMPowerVSClusterSpec struct { |
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.
You can add only the newly introduced field or any change in the existing fields, rest all can be ignored here.
``` | ||
### Cluster creation workflow |
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.
I think its good to explain in few words about the workflow apart from image.
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: