From 5f322e6b9bcc3de9ed2dceea915103df8796bec5 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 15 Sep 2022 19:38:28 +0200 Subject: [PATCH] chore(helm): cleaning tmp storage every 72 hrs, keeping 2d data Signed-off-by: rjshrjndrn --- .../openreplay/charts/utilities/templates/efs-cron.yaml | 2 +- scripts/helmcharts/openreplay/charts/utilities/values.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml index 233025bf2..f4f3ea409 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml @@ -26,7 +26,7 @@ spec: set -x echo "Cleaning NFS strorage for data older than 7 days" storage=`du -sh /mnt/efs` - find /mnt/efs -type f -mtime +7 -delete + find /mnt/efs -type f -mtime +{{.Values.efsCleaner.retention}} -delete echo "Storage before cleaning" echo ${storage} echo "Storage after cleaning" diff --git a/scripts/helmcharts/openreplay/charts/utilities/values.yaml b/scripts/helmcharts/openreplay/charts/utilities/values.yaml index 49838d774..90632b4c2 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/values.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/values.yaml @@ -9,6 +9,7 @@ efsCleaner: repository: "{{ .Values.global.openReplayContainerRegistry }}/alpine" pullPolicy: Always tag: 3.16.1 + retention: 2 pvc: # This can be either persistentVolumeClaim or hostPath. # In case of pvc, you'll have to provide the pvc name. @@ -81,5 +82,5 @@ fullnameOverride: "utilities-openreplay" # 5 3 * * 1 “At 03:05 on Monday.” # refer: https://crontab.guru/#5_3_*_*_1 -cron: "5 3 * * 1" +cron: "5 3 */3 * *"