Files
k8s-at-home-charts/charts/stable/bitwardenrs/templates/configmap.yaml
2021-03-18 13:11:24 +01:00

50 lines
1.6 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "bitwardenrs.fullname" . }}
labels:
{{- include "bitwardenrs.labels" . | nindent 4 }}
data:
SIGNUPS_ALLOWED: {{ .Values.bitwardenrs.signupsAllowed | quote }}
{{- if .Values.bitwardenrs.domain }}
DOMAIN: {{ .Values.bitwardenrs.domain | quote }}
{{- end }}
WEBSOCKET_ENABLED: {{ .Values.bitwardenrs.websockets.enabled | quote }}
{{- if and .Values.bitwardenrs.admin.enabled .Values.bitwardenrs.admin.disableAdminToken }}
DISABLE_ADMIN_TOKEN: "true"
{{- end }}
{{- with .Values.bitwardenrs.smtp }}
{{- if .enabled }}
SMTP_HOST: {{ required "SMTP host is required to enable SMTP" .host | quote }}
SMTP_FROM: {{ required "SMTP sender address ('from') is required to enable SMTP" .from | quote }}
{{- if .fromName }}
SMTP_FROM_NAME: {{ .fromName | quote }}
{{- end }}
{{- if .ssl }}
SMTP_SSL: {{ .ssl | quote }}
{{- end }}
{{- if .port }}
SMTP_PORT: {{ .port | quote }}
{{- end }}
{{- if and (not .existingSecret.enabled) .user }}
SMTP_USERNAME: {{ .user | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.bitwardenrs.yubico }}
{{- if .enabled }}
{{- if .server }}
YUBICO_SERVER: {{ .server | quote }}
{{- end }}
{{- if and (not .existingSecret.enabled) .clientId }}
YUBICO_CLIENT_ID: {{ .clientId | quote }}
{{- end }}
{{- if and (not .existingSecret.enabled) .secretKey }}
YUBICO_SECRET_KEY: {{ .secretKey | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- include "bitwardenrs.externalDatabaseConfigMap" . | nindent 2 }}
{{- if .Values.env }}
{{- toYaml .Values.env | nindent 2 }}
{{- end }}