From d33dcdfa66eb3cdcc26bdbc99ccc8525b0203816 Mon Sep 17 00:00:00 2001 From: Roberto Santalla Date: Sat, 3 Sep 2022 18:19:02 +0200 Subject: [PATCH] helm: handle empty persistence.config values --- charts/scrutiny/charts/web/templates/deployment.yaml | 6 +++++- charts/scrutiny/charts/web/values.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/scrutiny/charts/web/templates/deployment.yaml b/charts/scrutiny/charts/web/templates/deployment.yaml index 4ab6875..33f1cd4 100644 --- a/charts/scrutiny/charts/web/templates/deployment.yaml +++ b/charts/scrutiny/charts/web/templates/deployment.yaml @@ -54,11 +54,15 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: + {{- with .Values.persistence.config }} - mountPath: /opt/scrutiny/config name: config + {{- end }} volumes: + {{- with .Values.persistence.config }} - name: config - {{- .Values.persistence.config | toYaml | nindent 10 }} + {{- . | toYaml | nindent 10 }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/scrutiny/charts/web/values.yaml b/charts/scrutiny/charts/web/values.yaml index fd92d4b..26a04b0 100644 --- a/charts/scrutiny/charts/web/values.yaml +++ b/charts/scrutiny/charts/web/values.yaml @@ -6,7 +6,7 @@ env: SCRUTINY_WEB_INFLUXDB_HOST: scrutiny-influxdb2 persistence: - config: + config: {} # Volume spec, without `name`. #emptyDir: {}