Files
charts/test/nextcloud/2.3.2/templates/postgres-secret.yaml
T
2020-12-08 19:40:50 +05:00

13 lines
412 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: db-details
data:
{{- if .Release.IsInstall }}
db-password: {{ randAlphaNum 15 | b64enc | quote }}
{{ else }}
# `index` function is necessary because the property name contains a dash.
# Otherwise (...).data.db_password would have worked too.
db-password: {{ index (lookup "v1" "Secret" .Release.Namespace "db-details").data "db-password" }}
{{ end }}