Skip to content

Commit f0ceb86

Browse files
Parthiba-Hazrasnprajwal
authored andcommitted
docs: Add documentation for orphan retention policy
Signed-off-by: Parthiba-Hazra <[email protected]>
1 parent 76ea1c8 commit f0ceb86

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/retention_policy.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ spec:
2727
checkpointDirectory: /var/lib/kubelet/checkpoints
2828
applyPoliciesImmediately: false
2929
globalPolicy:
30+
retainOrphan: true
3031
maxCheckpointsPerNamespace: 50
3132
maxCheckpointsPerPod: 30
3233
maxCheckpointsPerContainer: 10
@@ -35,6 +36,7 @@ spec:
3536
# - namespace: <namespace>
3637
# pod: <pod_name>
3738
# container: <container_name>
39+
# retainOrphan: false # Set to false will delete all orphan checkpoints
3840
# maxCheckpoints: 5
3941
# maxCheckpointSize: 6 # Maximum size of a single checkpoint in MB
4042
# maxTotalSize: 20 # Maximum total size of checkpoints for the container in MB
@@ -46,7 +48,7 @@ spec:
4648
# maxTotalSize: 50 # Maximum total size of checkpoints for the pod in MB
4749
# namespacePolicies:
4850
# - namespace: <namespace>
49-
# maxCheckpoints: 15`
51+
# maxCheckpoints: 15`
5052
```
5153
A sample configuration file is available [here](/config/samples/_v1_checkpointrestoreoperator.yaml).
5254

@@ -55,6 +57,7 @@ A sample configuration file is available [here](/config/samples/_v1_checkpointre
5557
- `checkpointDirectory`: Specifies the directory where checkpoints are stored.
5658
- `applyPoliciesImmediately`: If set to `true`, the policies are applied immediately. If `false` (default value), they are applied after new checkpoint creation.
5759
- `globalPolicy`: Defines global checkpoint retention limits.
60+
- `retainOrphan`: If set to `true` (default), orphan checkpoints (checkpoints whose associated resources have been deleted) will be retained. If set to `false`, orphan checkpoints will be automatically deleted. This is particularly useful for transient checkpoints used to recover from errors by replacing 'container restart' with 'container restore'.
5861
- `maxCheckpointsPerNamespace`: Maximum number of checkpoints per namespace.
5962
- `maxCheckpointsPerPod`: Maximum number of checkpoints per pod.
6063
- `maxCheckpointsPerContainer`: Maximum number of checkpoints per container.
@@ -66,17 +69,20 @@ A sample configuration file is available [here](/config/samples/_v1_checkpointre
6669
- `namespace`: Namespace of the container.
6770
- `pod`: Pod name of the container.
6871
- `container`: Container name.
72+
- `retainOrphan`: If set to `true` (default), orphan checkpoints for this container will be retained. If set to `false`, orphan checkpoints will be deleted.
6973
- `maxCheckpoints`: Maximum number of checkpoints for the container.
7074
- `maxCheckpointSize`: Maximum size of a single checkpoint in MB.
7175
- `maxTotalSize`: Maximum total size of checkpoints for the container in MB.
7276
- `podPolicies` (optional): Specific retention policies for pods.
7377
- `namespace`: Namespace of the pod.
7478
- `pod`: Pod name.
79+
- `retainOrphan`: If set to `true` (default), orphan checkpoints for this pod will be retained. If set to `false`, orphan checkpoints will be deleted.
7580
- `maxCheckpoints`: Maximum number of checkpoints for the pod.
7681
- `maxCheckpointSize`: Maximum size of a single checkpoint in MB.
7782
- `maxTotalSize`: Maximum total size of checkpoints for the pod in MB.
7883
- `namespacePolicies` (optional): Specific retention policies for namespaces.
7984
- `namespace`: Namespace name.
85+
- `retainOrphan`: If set to `true` (default), orphan checkpoints for this namespace will be retained. If set to `false`, orphan checkpoints will be deleted.
8086
- `maxCheckpoints`: Maximum number of checkpoints for the namespace.
8187
- `maxCheckpointSize`: Maximum size of a single checkpoint in MB.
8288
- `maxTotalSize`: Maximum total size of checkpoints for the namespace in MB.

0 commit comments

Comments
 (0)