authelia Sun 04 May 2025 03:41:40 PM EDT

This commit is contained in:
ari committed 2025-05-04 15:41:40 -04:00
1 parent ac04f73173
commit cd55736f2c
3 files changed
+53 -14

No files matched your search

@@ -0,0 +1,17 @@
{{ define "authelia.scripts.startUp" }}
#!/bin/sh
users_folder="{{ .authentication_backend.file.path }}"
initial_password=$(authelia crypto hash generate --password admin | sed 's/^Digest: //')
if [ ! -f ${users_folder} ]; then
echo "users:" >> $users_folder
echo " admin:" >> $users_folder
echo " disabled: false" >> $users_folder
echo " password: '$initial_password'" >> $users_folder
echo " groups:" >> $users_folder
echo " - admin" >> $users_folder
fi
{{ end }}
+9 -8
View File
@@ -1,11 +1,12 @@
# ---
# apiVersion: v1
# kind: Secret
# metadata:
# name: authelia-files
# data:
# logo.png: ".Files.Get "files/logo.png" | b64enc }}"
# favicon.ico: ".Files.Get "files/favico.svg" | b64enc }}"
{{ $config := tpl (.Values.authelia.configuration | toYaml) . }}
---
apiVersion: v1
kind: Secret
metadata:
name: authelia-files
stringData:
start_up.sh: |-
{{ include "authelia.scripts.startUp" ($config | fromYaml) | nindent 4 }}
---
apiVersion: v1
kind: ConfigMap
+27 -6
View File
@@ -35,10 +35,31 @@ spec:
configMap:
name: authelia-config
defaultMode: 0400
# - name: files
# secret:
# secretName: authelia-files
# defaultMode: 0400
- name: files
secret:
secretName: authelia-files
defaultMode: 0400
initContainers:
- name: setup-script
image: "{{ .Values.authelia.image }}"
envFrom:
- secretRef:
name: authelia-db-secrets
- secretRef:
name: authelia-redis-secrets
- secretRef:
name: authelia-secrets
volumeMounts:
- mountPath: "/config"
name: config-data
- mountPath: /config/configuration.yml
subPath: configuration.yml
name: config-yaml
- mountPath: /config/assets/
name: files
command: ["sh"]
args:
- "/config/assets/start_up.sh"
containers:
- name: authelia
image: "{{ .Values.authelia.image }}"
@@ -55,8 +76,8 @@ spec:
- mountPath: /config/configuration.yml
subPath: configuration.yml
name: config-yaml
# - mountPath: /config/assets/
# name: files
- mountPath: /config/assets/
name: files
resources:
requests:
memory: "1Gi"