Skip to content

Commit

Permalink
docs: Add documentation for disabling ReclaimSpace
Browse files Browse the repository at this point in the history
This patch updates the documentation with the
steps to disable reclaim space operations.

Signed-off-by: Niraj Yadav <[email protected]>
  • Loading branch information
black-dragon74 committed Nov 7, 2024
1 parent ed2c2a5 commit 4b82cb3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/reclaimspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,23 @@ itself by adding the `csiaddons.openshift.io/state: "unmanaged"` annotation.
CSI Addons will not perform any further modifications on the `ReclaimSpaceCronJob` with the `unmanaged` state.

To have a custom schedule the user can then modify the `schedule` field of the `ReclaimSpaceCronJob` spec.

## Disabling Reclaim Space

### Disabling Reclaim Space for a Specific PersistentVolumeClaim

To disable reclaim space for a specific PersistentVolumeClaim (PVC), follow these steps to modify the associated `ReclaimSpaceCronJob` CR:

1. **Identify the `ReclaimSpaceCronJob` CR**: Run the following command to retrieve the name of the `ReclaimSpaceCronJob` CR associated with the PVC:

```bash
kubectl get reclaimspacecronjobs -o jsonpath='{range .items[?(@.spec.jobTemplate.spec.target.persistentVolumeClaim=="<PVC_NAME>")]}{.metadata.name}{"\n"}{end}'
```

Replace `<PVC_NAME>` with the name of your PVC.

2. **Edit the `ReclaimSpaceCronJob` CR**: Apply the following to disable the reclaim space:
- Update the `csiaddons.openshift.io/state` annotation from `"managed"` to `"unmanaged"`.
- Add `suspend: true` under the `spec` field.

These changes will disable reclaim space for the specified PVC.

0 comments on commit 4b82cb3

Please sign in to comment.