Files
chart/library/ix-dev/charts/nextcloud/templates/postgres-secret.yaml
Stavros Kois 91261f378f Move nextcloud to ix-dev (#1050)
* move nextcloud to ix-dev

* fix probe and update lock

* indent
2023-03-24 23:27:53 +02:00

23 lines
742 B
YAML

{{- $secretName := "db-details" }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
data:
{{/*
Lookup for the user shouldn't be needed in normal circumstances
But there was a typo before that resulted to a db-user with weird
characters. So to keep that user for existing installations we retrieve
it from the existing secret.
*/}}
{{ with (lookup "v1" "Secret" .Release.Namespace $secretName)}}
db-user: {{ index .data "db-user" }}
{{ else }}
db-user: {{ (include "postgres.DatabaseName" .Values ) | b64enc }}
{{ end }}
{{ with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
db-password: {{ index .data "db-password" }}
{{ else }}
db-password: {{ randAlphaNum 15 | b64enc }}
{{ end }}