Skip to content

Commit c7fec6b

Browse files
committed
address review comments
1 parent 0f4cb6b commit c7fec6b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/proposal/controller-and-user-tags.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Add tags to PowerVS Cluster resources and delete on the bases of specific tag
1+
# Tagging PowerVS cluster resources for lifecycle management
22

33

44
## Motivation
5-
PowerVS cluster creation supports both creating infrastructure and using existing resources required for cluster creation. If the infrastructure is created during cluster creation then this tagging will be applied and created infrastructure will also be deleted based on tagging.
5+
PowerVS cluster creation supports both creating infrastructure and using existing resources required for cluster creation.
66
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.
77

88
Though its working as expected and fulfills the purpose, we see some drawbacks.
@@ -34,22 +34,21 @@ A tag of format`powervs.cluster.x-k8s.io-resource-owner:<cluster_name>` will be
3434
8. [COS Instance](https://www.ibm.com/products/cloud-object-storage)
3535

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

4039

4140
### User tags
4241
User can add tags to resources when creating PowerVS cluster.
4342

4443
#### Proposed API changes
45-
UserTags field will contain list of tags that will be applied on resources.
44+
UserTags field will contain list of tags that will be attached to resources.
4645

4746
```shell
4847

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

52-
// UserTags contains list of tags needs to be applied on resources
51+
// UserTags contains list of tags needs to be attached to resources
5352
UserTags []string `json:"tags,omitempty"`
5453
.
5554
.
@@ -61,8 +60,8 @@ type IBMPowerVSClusterSpec struct {
6160

6261

6362
### Cluster creation workflow
64-
The controller will attach the tag to the resources after resources are created.
65-
During cluster creation first we will check if User tags set or not, if it is set then those tags will be attached to the resources. After that Controller tag will be attached to all the resources created by conroller.
63+
1. The controller will attach the `powervs.cluster.x-k8s.io-resource-owner:<cluster_name>` tag to the created resources.
64+
2. If user tags are set in the spec, they will be attached to the resources.
6665
![add-tag-workflow.png](../images/add-tag-workflow.png)
6766

6867

0 commit comments

Comments
 (0)