authelia Mon 05 May 2025 04:32:17 PM EDT

This commit is contained in:
ari committed 2025-05-05 16:32:17 -04:00
1 parent 68ebb31675
commit 17c4b88113
3 files changed
+12 -31

No files matched your search

@@ -1,17 +0,0 @@
{{ 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 }}
+6 -8
View File
@@ -1,12 +1,10 @@
{{ $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: Secret
# metadata:
# name: authelia-files
# stringData:
---
apiVersion: v1
kind: ConfigMap
+6 -6
View File
@@ -35,10 +35,10 @@ 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 }}"
@@ -55,8 +55,8 @@ spec:
- mountPath: /config/configuration.yml
subPath: configuration.yml
name: config-yaml
- mountPath: /config/assets/
name: files
# - mountPath: /config/assets/
# name: files
command: ["sh"]
args:
- "/config/assets/start_up.sh"