Skip to content

Commit 8762dfa

Browse files
black-dragon74mergify[bot]
authored andcommitted
update docs for disabling key rotation
Signed-off-by: Niraj Yadav <[email protected]>
1 parent a180ad8 commit 8762dfa

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/encryptionkeyrotation.md

+26
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,29 @@ itself by adding the `csiaddons.openshift.io/state: "unmanaged"` annotation.
157157
CSI Addons will not perform any further modifications on the `EncryptionKeyRotationCronJob` with the `unmanaged` state.
158158

159159
To have a custom schedule the user can then modify the `schedule` field of the `EncryptionKeyRotationCronJob` spec.
160+
161+
## Disabling Key Rotation
162+
163+
### Disabling Key Rotation for a Specific PersistentVolumeClaim
164+
165+
To disable key rotation for a specific PersistentVolumeClaim (PVC), edit the `EncryptionKeyRotationCronJob` custom resource (CR) associated with that PVC. Follow these steps:
166+
167+
1. **Identify the `EncryptionKeyRotationCronJob` CR**: Run the following command to retrieve the name of the `EncryptionKeyRotationCronJob` CR associated with the PVC:
168+
169+
```bash
170+
kubectl get encryptionkeyrotationcronjob -o jsonpath='{range .items[?(@.spec.jobTemplate.spec.target.persistentVolumeClaim=="<PVC_NAME>")]}{.metadata.name}{"\n"}{end}'
171+
```
172+
173+
Replace `<PVC_NAME>` with the name of your PVC.
174+
175+
2. **Edit the `EncryptionKeyRotationCronJob` CR**: Use the following settings in the CR to disable key rotation for this specific PVC:
176+
- Update the `csiaddons.openshift.io/state` annotation from `"managed"` to `"unmanaged"`.
177+
- Add `suspend: true` under the `spec` field.
178+
179+
These changes will disable key rotation for the specified PVC.
180+
181+
### Disabling Key Rotation for All PersistentVolumeClaims in a StorageClass
182+
183+
To disable key rotation for all PVCs in a particular StorageClass, annotate the StorageClass with `keyrotation.csiaddons.openshift.io/enable: "false"`.
184+
185+
This action will disable key rotation across all PVCs in that StorageClass and remove any existing `EncryptionKeyRotationCronJob` CRs for PVCs within it.

0 commit comments

Comments
 (0)