75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
{{/* Make sure all variables are set properly */}}
|
|
{{- include "common.setup" . }}
|
|
|
|
{{/* Render configmap for authelia */}}
|
|
{{- include "authelia.configmap" . }}
|
|
|
|
{{/* Render secrets for authelia */}}
|
|
{{- include "authelia.secrets" . }}
|
|
|
|
{{/* Append the general configMap volume to the volumes */}}
|
|
{{- define "authelia.configmapVolume" -}}
|
|
enabled: "true"
|
|
mountPath: " /configuration.yaml"
|
|
readOnly: true
|
|
subPath: configuration.yaml
|
|
type: "custom"
|
|
volumeSpec:
|
|
configMap:
|
|
name: authelia-configfile
|
|
items:
|
|
- key: configuration.yaml
|
|
path: configuration.yaml
|
|
{{- end -}}
|
|
|
|
{{/* Append the general secret volumes to the volumes */}}
|
|
{{- define "authelia.secretVolumes" -}}
|
|
enabled: "true"
|
|
mountPath: "/secrets"
|
|
readOnly: true
|
|
type: "custom"
|
|
volumeSpec:
|
|
secret:
|
|
secretName: authelia-secrets
|
|
items:
|
|
- key: "JWT_TOKEN"
|
|
path: JWT_TOKEN
|
|
- key: "SESSION_ENCRYPTION_KEY"
|
|
path: SESSION_ENCRYPTION_KEY
|
|
- key: "ENCRYPTION_KEY"
|
|
path: ENCRYPTION_KEY
|
|
- key: "STORAGE_PASSWORD"
|
|
path: STORAGE_PASSWORD
|
|
{{- if .Values.authentication_backend.ldap.enabled }}
|
|
- key: "LDAP_PASSWORD"
|
|
path: LDAP_PASSWORD
|
|
{{- end }}
|
|
{{- if .Values.notifier.smtp.enabled }}
|
|
- key: "SMTP_PASSWORD"
|
|
path: SMTP_PASSWORD
|
|
{{- end }}
|
|
- key: "REDIS_PASSWORD"
|
|
path: REDIS_PASSWORD
|
|
{{- if .Values.redisProvider.high_availability.enabled}}
|
|
- key: "REDIS_SENTINEL_PASSWORD"
|
|
path: REDIS_SENTINEL_PASSWORD
|
|
{{- end }}
|
|
{{- if .Values.duo_api.enabled }}
|
|
- key: "DUO_API_KEY"
|
|
path: DUO_API_KEY
|
|
{{- end }}
|
|
{{- if .Values.identity_providers.oidc.enabled }}
|
|
- key: "OIDC_PRIVATE_KEY"
|
|
path: OIDC_PRIVATE_KEY
|
|
- key: "OIDC_HMAC_SECRET"
|
|
path: OIDC_HMAC_SECRET
|
|
{{- end }}
|
|
{{- end -}}
|
|
|
|
{{- $_ := set .Values.persistence "authelia-configfile" (include "authelia.configmapVolume" . | fromYaml) -}}
|
|
{{- $_ := set .Values.persistence "authelia-secrets" (include "authelia.secretVolumes" . | fromYaml) -}}
|
|
|
|
|
|
{{/* Render the templates */}}
|
|
{{ include "common.postSetup" . }}
|