oecis-charts/charts/vaultwarden/templates/secrets.yaml
2023-08-27 15:38:50 +02:00

19 lines
651 B
YAML

{{ if not (and (hasKey .Values.smtp "existingSecret") (hasKey .Values.adminToken "existingSecret")) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "vaultwarden.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: vaultwarden
type: Opaque
data:
{{- if not (hasKey .Values.smtp "existingSecret") }}
SMTP_PASSWORD: {{ .Values.smtp.password.value | b64enc | quote }}
SMTP_USERNAME: {{ .Values.smtp.username.value | b64enc | quote }}
{{- end }}
{{- if not (hasKey .Values.adminToken "existingSecret") }}
ADMIN_TOKEN: {{ .Values.adminToken.value | b64enc | quote }}
{{- end }}
{{ end }}