peridot/infrastructure/dev-helm/temporal/templates/server-secret.yaml

29 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2022-07-07 20:11:50 +00:00
{{- if $.Values.server.enabled }}
{{- range $store := (list "default" "visibility") }}
{{- $storeConfig := index $.Values.server.config.persistence $store }}
{{- $driverConfig := index $storeConfig (include "temporal.persistence.driver" (list $ $store)) }}
{{- $secretName := include "temporal.componentname" (list $ (printf "%s-store" $store)) }}
{{- if and (not $driverConfig.existingSecret) (eq (include "temporal.persistence.secretName" (list $ $store)) $secretName) }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
labels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
helm.sh/chart: {{ include "temporal.chart" $ }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | replace "+" "_" }}
app.kubernetes.io/part-of: {{ $.Chart.Name }}
type: Opaque
data:
{{- if eq (include "temporal.persistence.driver" (list $ $store)) "cassandra" }}
password: {{ $storeConfig.cassandra.password | b64enc | quote }}
{{- else if eq (include "temporal.persistence.driver" (list $ $store)) "sql" }}
password: {{ include "temporal.persistence.sql.password" (list $ $store) | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}