From e413370b04107ad44402a2998c8d09a279adba8c Mon Sep 17 00:00:00 2001 From: Robert Juzak Date: Sun, 5 May 2024 13:26:22 +0200 Subject: [PATCH] close #71 --- charts/kimai2/Chart.yaml | 2 +- charts/kimai2/templates/_helpers.tpl | 11 +++++++++++ charts/kimai2/templates/deployment.yaml | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/charts/kimai2/Chart.yaml b/charts/kimai2/Chart.yaml index 301df8e..22aeca4 100644 --- a/charts/kimai2/Chart.yaml +++ b/charts/kimai2/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kimai2 description: A Helm chart for Kubernetes type: application -version: 4.0.3 +version: 4.1.0 appVersion: "apache-2.16.1-prod" dependencies: diff --git a/charts/kimai2/templates/_helpers.tpl b/charts/kimai2/templates/_helpers.tpl index 09f3ec7..0a812b7 100644 --- a/charts/kimai2/templates/_helpers.tpl +++ b/charts/kimai2/templates/_helpers.tpl @@ -52,6 +52,17 @@ Return the kimai Secret Name {{- end -}} {{- end -}} +{{/* +Return the Kimai configuration secret +*/}} +{{- define "kimai.configSecretName" -}} +{{- if .Values.configurationFromSecret.secretName -}} + {{- printf "%s" (tpl .Values.configurationFromSecret.secretName $) -}} +{{- else -}} + {{- printf "%s-config" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} + {{/* Return the Database Hostname */}} diff --git a/charts/kimai2/templates/deployment.yaml b/charts/kimai2/templates/deployment.yaml index 231a8ba..b29f9c6 100644 --- a/charts/kimai2/templates/deployment.yaml +++ b/charts/kimai2/templates/deployment.yaml @@ -212,7 +212,7 @@ spec: {{- if .Values.configurationFromSecret.enabled}} - name: config secret: - secretName: {{ printf "%s-config" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} + secretName: {{ include "kimai.configSecretName" . }} {{- end }} - name: kimai-data {{- if .Values.persistence.enabled }}