Skip to content

Commit add0d9f

Browse files
committed
add resourceCleanup featureGate introduction
Signed-off-by: Zhiwei Yin <[email protected]>
1 parent aab6cc7 commit add0d9f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

content/en/docs/getting-started/installation/register-a-cluster.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,33 @@ Check the klusterlet is removed from the managed cluster.
316316
kubectl get klusterlet --context ${CTX_MANAGED_CLUSTER}
317317
error: the server doesn't have a resource type "klusterlet
318318
```
319+
320+
### ResourceCleanup FeatureGate
321+
322+
The `ResourceCleanup` featureGate for cluster registration on the Hub cluster enables automatic cleanup of managedClusterAddons and manifestWorks within the cluster namespace after cluster unjoining.
323+
324+
**Version Compatibility:**
325+
- The `ResourceCleanup` featureGate was introdueced in OCM v0.13.0, and was **disabled by default** in OCM v0.16.0 and earlier versions. To activate it, need to modify the clusterManager CR configuration:
326+
```yaml
327+
registrationConfiguration:
328+
featureGates:
329+
- feature: ResourceCleanup
330+
mode: Enable
331+
```
332+
333+
- Starting with OCM v0.17.0, the `ResourceCleanup` featureGate has been upgraded from Alpha to Beta status and is **enabled by default**.
334+
335+
**Deletion Sequence:**
336+
1. managedClusterAddons are deleted first.
337+
2. manifestWorks are removed subsequently after there is no managedClusterAddon.
338+
3. Custom ordering can be defined using the `open-cluster-management.io/cleanup-priority` annotation:
339+
- Priority values range 0-100 (lower values execute first).
340+
341+
**Disabling the Feature:**
342+
To deactivate this functionality, update the clusterManager CR on the hub cluster:
343+
```yaml
344+
registrationConfiguration:
345+
featureGates:
346+
- feature: ResourceCleanup
347+
mode: Disable
348+
```

0 commit comments

Comments
 (0)