From ff7fb92c19ae9ed2b3c543cfa4af44b57279de60 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 30 Mar 2024 14:43:13 -0600 Subject: [PATCH] create tempalte name for passFile --- charts/matrix-hookshot/Chart.yaml | 2 +- charts/matrix-hookshot/templates/_helpers.tpl | 11 +++++++++++ charts/matrix-hookshot/templates/deployment.yaml | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/charts/matrix-hookshot/Chart.yaml b/charts/matrix-hookshot/Chart.yaml index ec2ca9d..d829d83 100644 --- a/charts/matrix-hookshot/Chart.yaml +++ b/charts/matrix-hookshot/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: matrix-hookshot -version: 0.0.6 +version: 0.0.7 description: Chart for Matrix Hookshot keywords: - matrix diff --git a/charts/matrix-hookshot/templates/_helpers.tpl b/charts/matrix-hookshot/templates/_helpers.tpl index f1d3017..524523e 100644 --- a/charts/matrix-hookshot/templates/_helpers.tpl +++ b/charts/matrix-hookshot/templates/_helpers.tpl @@ -30,3 +30,14 @@ Helper for passkey secret name {{- printf "matrix-hookshot-passkey-secret" }} {{- end }} {{- end }} + +{{/* +Helper for passkey file name +*/}} +{{- define "hookshot.passFile" -}} +{{- if .Values.hookshot.config.passFile }} +{{- printf "%s" .Values.hookshot.config.passFile -}} +{{- else }} +{{- printf "passkey.pem" }} +{{- end }} +{{- end }} diff --git a/charts/matrix-hookshot/templates/deployment.yaml b/charts/matrix-hookshot/templates/deployment.yaml index de50912..b0126a4 100644 --- a/charts/matrix-hookshot/templates/deployment.yaml +++ b/charts/matrix-hookshot/templates/deployment.yaml @@ -61,8 +61,8 @@ spec: subPath: registration.yml readOnly: true - name: passkey - mountPath: "/data/{{ .Values.hookshot.config.passFile }}" - subPath: "{{ .Values.hookshot.config.passFile }}" + mountPath: "/data/{{ template "hookshot.passFile" . }}" + subPath: {{ template "hookshot.passFile" . }} readOnly: true volumes: - name: config