You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/proposal/controller-and-user-tags.md
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff 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
2
2
3
3
4
4
## 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.
6
6
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.
7
7
8
8
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
- 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.
39
38
40
39
41
40
### User tags
42
41
User can add tags to resources when creating PowerVS cluster.
43
42
44
43
#### 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.
46
45
47
46
```shell
48
47
49
48
// IBMPowerVSClusterSpec defines the desired state of IBMPowerVSCluster.
50
49
type IBMPowerVSClusterSpec struct {
51
50
52
-
// UserTags contains list of tags needs to be applied on resources
51
+
// UserTags contains list of tags needs to be attached to resources
53
52
UserTags []string `json:"tags,omitempty"`
54
53
.
55
54
.
@@ -61,8 +60,8 @@ type IBMPowerVSClusterSpec struct {
61
60
62
61
63
62
### 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.
0 commit comments