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 * *"