mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
19 lines
531 B
YAML
19 lines
531 B
YAML
{{- $privateKey := default (genPrivateKey "ecdsa") .Values.global.secret.privateKey | b64enc | quote }}
|
|
|
|
{{- if not .Values.global.secret.privateKey }}
|
|
{{- $existingKey := (lookup "v1" "Secret" .Release.Namespace .Values.global.secret.secretName) }}
|
|
{{- if $existingKey }}
|
|
{{- $privateKey = index $existingKey.data "key" }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ .Values.global.secret.secretName }}
|
|
annotations:
|
|
"helm.sh/resource-policy": "keep"
|
|
type: Opaque
|
|
data:
|
|
key: {{ $privateKey }}
|