{{ 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 }}