mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-12-04 07:42:28 -08:00
25 lines
820 B
YAML
25 lines
820 B
YAML
{{- /*
|
|
Copyright 2025 New Vector Ltd
|
|
Copyright 2025 Element Creations Ltd
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/ -}}
|
|
|
|
{{- with $.Values.postgres -}}
|
|
{{- if (include "element-io.postgres.enabled" (dict "root" $)) }}
|
|
{{- if or .adminPassword.value (include "element-io.postgres.anyEssPasswordHasValue" (dict "root" $ "context" .)) }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
labels:
|
|
{{- include "element-io.postgres.labels" (dict "root" $ "context" .) | nindent 4 }}
|
|
name: {{ include "element-io.postgres.secret-name" (dict "root" $ "context" (dict "isHook" true)) }}
|
|
namespace: {{ $.Release.Namespace }}
|
|
annotations:
|
|
"helm.sh/hook": pre-install,pre-upgrade
|
|
"helm.sh/hook-weight": "-5"
|
|
{{- include "element-io.postgres.secret-data" (dict "root" $ "context" .) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|