From 438121ae4cab971c3e813794cf1a4acec4becd03 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Thu, 8 Oct 2020 11:17:06 -0300 Subject: [PATCH] Allow changing Zeo Pack keep_days setting --- charts/portalmodelo/v0.5.0/questions.yaml | 8 ++++++++ charts/portalmodelo/v0.5.0/templates/zeopack-cronjob.yaml | 2 +- charts/portalmodelo/v0.5.0/values.yaml | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/portalmodelo/v0.5.0/questions.yaml b/charts/portalmodelo/v0.5.0/questions.yaml index 2e4740d..47ce042 100644 --- a/charts/portalmodelo/v0.5.0/questions.yaml +++ b/charts/portalmodelo/v0.5.0/questions.yaml @@ -115,4 +115,12 @@ questions: label: "ZEO Pack Cron" required: false group: Avançado + +- variable: instance.zeopack.keepDays + default: 7 + type: int + description: "Dias de operações a manter após o Pack do ZODB" + label: "ZEO Pack Keep Days" + required: false + group: Avançado diff --git a/charts/portalmodelo/v0.5.0/templates/zeopack-cronjob.yaml b/charts/portalmodelo/v0.5.0/templates/zeopack-cronjob.yaml index e5ac366..1756da3 100644 --- a/charts/portalmodelo/v0.5.0/templates/zeopack-cronjob.yaml +++ b/charts/portalmodelo/v0.5.0/templates/zeopack-cronjob.yaml @@ -29,7 +29,7 @@ spec: - "/bin/bash" - "-c" args: - - "python /docker-initialize.py && /plone/instance/bin/zeopack" + - "python /docker-initialize.py && /plone/instance/bin/zeopack -D {{ .Values.instance.zeopack.keepDays }}" env: - name: ZEO_ADDRESS value: {{ template "portalmodelo.fullname" . }}-zeoserver:8100 diff --git a/charts/portalmodelo/v0.5.0/values.yaml b/charts/portalmodelo/v0.5.0/values.yaml index 4cbed26..c883f2d 100644 --- a/charts/portalmodelo/v0.5.0/values.yaml +++ b/charts/portalmodelo/v0.5.0/values.yaml @@ -36,6 +36,7 @@ instance: zeopack: enabled: true schedule: "0 1 * * SUN" # Every Sunday at 1AM + keepDays: 7 podAnnotations: {}