From 5f3bc759234042cf388191b0c1dd06756fa66931 Mon Sep 17 00:00:00 2001 From: Parthiba-Hazra Date: Wed, 31 Jul 2024 21:55:12 +0530 Subject: [PATCH] docs: Add documentation for storage/size based retention policy Signed-off-by: Parthiba-Hazra --- docs/retention_policy.md | 50 +++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/docs/retention_policy.md b/docs/retention_policy.md index b69422e8..e2975804 100644 --- a/docs/retention_policy.md +++ b/docs/retention_policy.md @@ -36,10 +36,14 @@ spec: # pod: # container: # maxCheckpoints: 5 + # maxCheckpointSize: 6 # Maximum size of a single checkpoint in MB + # maxTotalSize: 20 # Maximum total size of checkpoints for the container in MB # podPolicies: # - namespace: # pod: # maxCheckpoints: 10 + # maxCheckpointSize: 8 # Maximum size of a single checkpoint in MB + # maxTotalSize: 50 # Maximum total size of checkpoints for the pod in MB # namespacePolicies: # - namespace: # maxCheckpoints: 15` @@ -48,24 +52,34 @@ A sample configuration file is available [here](/config/samples/_v1_checkpointre ## Understanding Policy Fields -- `checkpointDirectory`: Specifies the directory where checkpoints are stored. -- `applyPoliciesImmediately`: If set to `true`, the policies are applied immediately. If `false` (default value), they are applied after new checkpoint creation. -- `globalPolicy`: Defines global checkpoint retention limits. - - `maxCheckpointsPerNamespace`: Maximum number of checkpoints per namespace. - - `maxCheckpointsPerPod`: Maximum number of checkpoints per pod. - - `maxCheckpointsPerContainer`: Maximum number of checkpoints per container. -- `containerPolicies` (optional): Specific retention policies for containers. - - `namespace`: Namespace of the container. - - `pod`: Pod name of the container. - - `container`: Container name. - - `maxCheckpoints`: Maximum number of checkpoints for the container. -- `podPolicies` (optional): Specific retention policies for pods. - - `namespace`: Namespace of the pod. - - `pod`: Pod name. - - `maxCheckpoints`: Maximum number of checkpoints for the pod. -- `namespacePolicies` (optional): Specific retention policies for namespaces. - - `namespace`: Namespace name. - - `maxCheckpoints`: Maximum number of checkpoints for the namespace. +- **`checkpointDirectory`**: Specifies the directory where checkpoints are stored. +- **`applyPoliciesImmediately`**: If set to `true`, the policies are applied immediately. If `false` (default value), they are applied after new checkpoint creation. +- **`globalPolicy`**: Defines global checkpoint retention limits. + - **`maxCheckpointsPerNamespace`**: Maximum number of checkpoints per namespace. + - **`maxCheckpointsPerPod`**: Maximum number of checkpoints per pod. + - **`maxCheckpointsPerContainer`**: Maximum number of checkpoints per container. + - **`maxCheckpointSize`**: Maximum size of a single checkpoint in MB. + - **`maxTotalSizePerNamespace`**: Maximum total size of checkpoints per namespace in MB. + - **`maxTotalSizePerPod`**: Maximum total size of checkpoints per pod in MB. + - **`maxTotalSizePerContainer`**: Maximum total size of checkpoints per container in MB. +- **`containerPolicies`** (optional): Specific retention policies for containers. + - **`namespace`**: Namespace of the container. + - **`pod`**: Pod name of the container. + - **`container`**: Container name. + - **`maxCheckpoints`**: Maximum number of checkpoints for the container. + - **`maxCheckpointSize`**: Maximum size of a single checkpoint in MB. + - **`maxTotalSize`**: Maximum total size of checkpoints for the container in MB. +- **`podPolicies`** (optional): Specific retention policies for pods. + - **`namespace`**: Namespace of the pod. + - **`pod`**: Pod name. + - **`maxCheckpoints`**: Maximum number of checkpoints for the pod. + - **`maxCheckpointSize`**: Maximum size of a single checkpoint in MB. + - **`maxTotalSize`**: Maximum total size of checkpoints for the pod in MB. +- **`namespacePolicies`** (optional): Specific retention policies for namespaces. + - **`namespace`**: Namespace name. + - **`maxCheckpoints`**: Maximum number of checkpoints for the namespace. + - **`maxCheckpointSize`**: Maximum size of a single checkpoint in MB. + - **`maxTotalSize`**: Maximum total size of checkpoints for the namespace in MB. ## Policy Hierarchy and Application