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/encryptionkeyrotation.md
+26
Original file line number
Diff line number
Diff line change
@@ -157,3 +157,29 @@ itself by adding the `csiaddons.openshift.io/state: "unmanaged"` annotation.
157
157
CSI Addons will not perform any further modifications on the `EncryptionKeyRotationCronJob` with the `unmanaged` state.
158
158
159
159
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