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
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,28 @@ This proposal presents adding two kinds of tags to the resources created by cont
32
32
33
33
Below are the cluster creation scenarios.
34
34
#### Creating a new cluster
35
-
- When resources will be created for new cluster in the cloud the tag will be attached. During deletion flow, will check for tag `powervs.cluster.x-k8s.io/cluster-uuid: UUID` and delete the resources. If a resource is created successfully but tag attachment fails, the controller will retry for a configured period. If retries are exhausted, a condition will be set with a descriptive message such as: "Failed to attach tag to newly created Workspace workspace-name. Please manually attach the tag or delete the cluster and recreate it in a different region."
35
+
- When resources will be created for new cluster in the cloud the tag will be attached. During deletion flow, will check for tag `powervs.cluster.x-k8s.io/cluster-uuid: UUID` and delete the resources.
36
+
##### Tag Attachment Scenarios
37
+
- Success Scenario
38
+
39
+
When the controller successfully attaches the tag `powervs.cluster.x-k8s.io/cluster-uuid: UUID` to a newly created resource, the cluster creation process proceeds normally and completes successfully.
40
+
- Deletion Behavior
41
+
42
+
During cluster deletion, the controller identifies resources with the matching tag `powervs.cluster.x-k8s.io/cluster-uuid: UUID` and deletes them, allowing the cluster to be deleted successfully.
43
+
44
+
- Failure Scenario
45
+
46
+
If a resource is created successfully but tag attachment fails then:
47
+
1. Retry Attempts: The controller retries attaching the tag multiple times over a configured period.
48
+
2. After Retries Fail: If all retries fail, the controller:
49
+
- Sets a warning condition on the cluster
50
+
- Adds an error message like: "Failed to attach tag to newly created Workspace <workspace-name>. Please manually attach the tag or delete the cluster and recreate it."
51
+
3. Allows the cluster creation to proceed and complete successfully despite the tag attachment failure.
52
+
- Deletion Behavior
53
+
54
+
When the user triggers deletion of a cluster where tag attachment previously failed, the controller will check the condition status. Based on this condition, the controller will determine whether to proceed with resource deletion.
55
+
56
+
36
57
#### Creating a new cluster with reusing pre-created resources
37
58
- When cluster is created using existing resources, no tag will be attached. We won't delete these resources, as these were not created by controller.
38
59
#### Creating a new cluster with reusing pre-created resources from old cluster.
0 commit comments