Skip to content

docs: Add documentation for disabling ReclaimSpace#701

Merged
mergify[bot] merged 1 commit into
csi-addons:mainfrom
black-dragon74:doc-disable-rs
Nov 18, 2024
Merged

docs: Add documentation for disabling ReclaimSpace#701
mergify[bot] merged 1 commit into
csi-addons:mainfrom
black-dragon74:doc-disable-rs

Conversation

@black-dragon74

Copy link
Copy Markdown
Member

This patch updates the documentation with the
steps to disable reclaim space operations.

@black-dragon74

Copy link
Copy Markdown
Member Author

cc: @Madhu-1 @iPraveenParihar

Comment thread docs/reclaimspace.md Outdated

### Disabling Reclaim Space for a Specific PersistentVolumeClaim

To disable reclaim space for a specific PersistentVolumeClaim (PVC), edit the `ReclaimSpaceCronJob` custom resource (CR) associated with that PVC. Follow these steps:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To disable reclaim space for a specific PersistentVolumeClaim (PVC), edit the `ReclaimSpaceCronJob` custom resource (CR) associated with that PVC. Follow these steps:
To disable reclaim space for a specific PersistentVolumeClaim (PVC), follow these steps to modify the associated `ReclaimSpaceCronJob` CR:

Comment thread docs/reclaimspace.md Outdated

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

2. **Edit the `ReclaimSpaceCronJob` CR**: Use the following settings in the CR to disable reclaim space for this specific PVC:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. **Edit the `ReclaimSpaceCronJob` CR**: Use the following settings in the CR to disable reclaim space for this specific PVC:
2. **Edit the `ReclaimSpaceCronJob` CR**: apply the following to disable the reclaim space:

Comment thread docs/reclaimspace.md
Replace `<PVC_NAME>` with the name of your PVC.

2. **Edit the `ReclaimSpaceCronJob` CR**: Use the following settings in the CR to disable reclaim space for this specific PVC:
- Update the `csiaddons.openshift.io/state` annotation from `"managed"` to `"unmanaged"`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be good if we add example for kubectl annotate and kubectl patch command

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I did not go with that is because

  • The annotation would be present on the CR already.
  • User needs to just to kubectl edit and can do both the required changes simultaneously.

Lesser the commands, the better it is, WDYT?

@nixpanic nixpanic Nov 11, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubectl edit is not something that can be automated easily. I prefer to give the kubectl annotate and kubectl patch commands as examples, in addition to the description you have now.
Fewer commands is nice, but you should also expect that automated tools deploy apps and configure extra things like disabling reclaim space for its PVC(s).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide the command to annotate the CR as mentioned above

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment thread docs/reclaimspace.md

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please provide `kubectl patch command as well for this one

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

This patch updates the documentation with the
steps to disable reclaim space operations.

Signed-off-by: Niraj Yadav <niryadav@redhat.com>
@mergify mergify Bot merged commit 15cf548 into csi-addons:main Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants