From 1ec50ca53dae7deaaa6c6b5a0c1c5cbfad400f4a Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Thu, 14 Nov 2024 14:20:59 +0100 Subject: [PATCH] feat(common): add monthly and yearly retentions to volsync defaults Also tweaks retentions a tad Signed-off-by: Kjeld Schouten --- .../common/templates/class/volsync/_replicationSource.tpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/library/common/templates/class/volsync/_replicationSource.tpl b/charts/library/common/templates/class/volsync/_replicationSource.tpl index ded5e86ebaa2..133bb52f9d05 100644 --- a/charts/library/common/templates/class/volsync/_replicationSource.tpl +++ b/charts/library/common/templates/class/volsync/_replicationSource.tpl @@ -22,9 +22,9 @@ objectData: {{- $schedule = $volsyncData.src.trigger.schedule -}} {{- end }} - {{- $retain := dict "hourly" 24 "daily" 7 "weekly" 5 -}} + {{- $retain := dict "hourly" 6 "daily" 5 "weekly" 4 "monthly" 3 "yearly" 1 -}} {{- if $volsyncData.src.retain -}} - {{- $items := list "hourly" "daily" "weekly" -}} + {{- $items := list "hourly" "daily" "weekly" "monthly" "yearly" -}} {{- range $item := $items -}} {{- with get $volsyncData.src.retain $item -}} {{- $_ := set $retain $item . -}} @@ -60,6 +60,8 @@ spec: hourly: {{ $retain.hourly }} daily: {{ $retain.daily }} weekly: {{ $retain.weekly }} + monthly: {{ $retain.monthly }} + yearly: {{ $retain.yearly }} {{- include "tc.v1.common.lib.volsync.storage" (dict "rootCtx" $rootCtx "objectData" $objectData "volsyncData" $volsyncData "target" "src") | trim | nindent 4 }} {{- include "tc.v1.common.lib.volsync.cache" (dict "rootCtx" $rootCtx "objectData" $objectData "volsyncData" $volsyncData "target" "src") | trim | nindent 4 }} {{- include "tc.v1.common.lib.volsync.moversecuritycontext" (dict "rootCtx" $rootCtx "objectData" $objectData "volsyncData" $volsyncData "target" "src") | trim | nindent 4 }}