Skip to content

Commit

Permalink
feat(common): add monthly and yearly retentions to volsync defaults
Browse files Browse the repository at this point in the history
Also tweaks retentions a tad

Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
  • Loading branch information
PrivatePuffin authored Nov 14, 2024
1 parent a27317a commit 1ec50ca
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 . -}}
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 1ec50ca

Please sign in to comment.