mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-04 18:46:27 +00:00
29 lines
1.3 KiB
YAML
29 lines
1.3 KiB
YAML
{{- 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 }}
|