diff --git a/src/main/helm/templates/_helpers.tpl b/src/main/helm/templates/_helpers.tpl index 435ffac96d724c9343abceb3c43d4b5c01ee5c5b..f26ef7d196d81c38a15e617f0d96ee23137099be 100644 --- a/src/main/helm/templates/_helpers.tpl +++ b/src/main/helm/templates/_helpers.tpl @@ -125,7 +125,7 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- define "app.bayernidAbsenderName" -}} -{{- quote (required "ozgcloud.bayernid.absender.name must be set if ozgcloud.bayernid is enabled" (((.Values.ozgcloud).bayernid).absender).name) -}} +{{- quote (required "ozgcloud.bayernid.absender.name must be set if ozgcloud.bayernid is enabled" (((.Values.ozgcloud).bayernid).absender).name) -}} {{- end -}} {{- define "app.bayernidAbsenderMandant" -}} @@ -166,4 +166,12 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- define "app.getZufiManagerAddress" -}} {{- required "zufiManager.address must be set" (.Values.zufiManager).address -}} +{{- end -}} + +{{- define "app.getKeyStorePath" -}} +{{- printf "/workspace/keystore/xta-keystore.p12" -}} +{{- end -}} + +{{- define "app.getTrustStorePath" -}} +{{- printf "/workspace/truststore/xta-truststore.jks" -}} {{- end -}} \ No newline at end of file diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index fb28dae664ed1ef538640f6d65c9ac9902324b6c..840fdb9d0428184df7b612e26cf22cd4b5e00019 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -284,7 +284,7 @@ spec: - name: ozgcloud_xta_clientIdentifiers value: '{{ ((.Values.ozgcloud).xta).clientIdentifiers | toJson }}' - name: ozgcloud_xta_keystore_file - value: "file:/workspace/keystore/xta-keystore.p12" + value: {{ printf "file:%s" (include "app.getKeyStorePath" .) }} - name: ozgcloud_xta_keystore_type valueFrom: secretKeyRef: @@ -299,7 +299,7 @@ spec: optional: false {{- if ((.Values.ozgcloud).xta).truststore }} - name: ozgcloud_xta_truststore_file - value: "file:/workspace/truststore/xta-truststore.jks" + value: {{ printf "file:%s" (include "app.getTrustStorePath" .) }} - name: ozgcloud_xta_truststore_type valueFrom: secretKeyRef: @@ -419,13 +419,13 @@ spec: readOnly: true {{- if ((.Values.ozgcloud).xta).keystore }} - name: xta-keystore - mountPath: "/workspace/keystore/xta-keystore.p12" + mountPath: {{ include "app.getKeyStorePath" . }} subPath: file readOnly: true {{- end }} {{- if ((.Values.ozgcloud).xta).truststore }} - name: xta-truststore - mountPath: "/workspace/truststore/xta-truststore.jks" + mountPath: {{ include "app.getTrustStorePath" . }} subPath: file readOnly: true {{- end }}