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

36 lines
1.5 KiB
YAML
Raw 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 }}
2024-03-11 19:20:43 +00:00
{{- with $.Values.server.secretLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $.Values.server.secretAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
2022-07-07 20:11:50 +00:00
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 }}