chartrepo
chartrepo copied to clipboard
Using default values.local.yaml results in crash-loop
I'm using the supplied values.local.yaml
file to start testing Authelia but installation with this seems to result in a crash-loop. Here's the error log.
time="2021-07-23T19:01:45Z" level=warning msg="No access control rules have been defined so the default policy two_factor will be applied to all requests"
time="2021-07-23T19:01:45Z" level=info msg="Logging severity set to info"
time="2021-07-23T19:01:45Z" level=info msg="Storage schema upgrade to v1 completed"
time="2021-07-23T19:01:45Z" level=error msg="Unable to find database file: /config/users_database.yml" stack="github.com/authelia/authelia/cmd/authelia/main.go:92 startServer\ngithub.com/authelia/authelia/cmd/authelia/main.go:145 main.func1\ngithub.com/spf13/[email protected]/command.go:856 (*Command).execute\ngithub.com/spf13/[email protected]/command.go:960 (*Command).ExecuteC\ngithub.com/spf13/[email protected]/command.go:897 main\ngithub.com/authelia/authelia/cmd/authelia/main.go:163 main\nruntime/proc.go:225 main\nruntime/asm_amd64.s:1371 goexit"
time="2021-07-23T19:01:45Z" level=error msg="Generating database file: /config/users_database.yml" stack="github.com/authelia/authelia/cmd/authelia/main.go:92 startServer\ngithub.com/authelia/authelia/cmd/authelia/main.go:145 main.func1\ngithub.com/spf13/[email protected]/command.go:856 (*Command).execute\ngithub.com/spf13/[email protected]/command.go:960 (*Command).ExecuteC\ngithub.com/spf13/[email protected]/command.go:897 main\ngithub.com/authelia/authelia/cmd/authelia/main.go:163 main\nruntime/proc.go:225 main\nruntime/asm_amd64.s:1371 goexit"
time="2021-07-23T19:01:45Z" level=error msg="Generated database at: /config/users_database.yml" stack="github.com/authelia/authelia/cmd/authelia/main.go:92 startServer\ngithub.com/authelia/authelia/cmd/authelia/main.go:145 main.func1\ngithub.com/spf13/[email protected]/command.go:856 (*Command).execute\ngithub.com/spf13/[email protected]/command.go:960 (*Command).ExecuteC\ngithub.com/spf13/[email protected]/command.go:897 main\ngithub.com/authelia/authelia/cmd/authelia/main.go:163 main\nruntime/proc.go:225 main\nruntime/asm_amd64.s:1371 goexit"
Looks like the users_database.yml file isn't deployed with the container image directly. I ran into the same problem with chart v0.4.19. You can grab the example from the main authelia repo here, and convert it to a kube secret to mount to the container, or store it on a persistent volume and mount that.
Yeah you're correct @jimsantora. I can add that to the guide. The issue is we have to decide between setting up a temporary init container to create the file due to the hashes, or wait for SQL backed auth.
For reference, here's the (very bare-bones) values override file that worked for me after creating the secret:
pod:
kind: StatefulSet
extraVolumeMounts:
- name: users-database
mountPath: "/config/users"
readOnly: true
extraVolumes:
- name: users-database
secret:
secretName: authelia-users
items:
- key: users_database.yml
path: users_database.yml
configMap:
authentication_backend:
ldap:
enabled: false
file:
enabled: true
password:
algorithm: sha512
iterations: 100000
path: /config/users/users_database.yml
session:
redis:
enabled: false
storage:
local:
enabled: true
postgres:
enabled: false
notifier:
filesystem:
enabled: true
smtp:
enabled: false
identity_providers:
oidc:
enabled: false
This is very helpful @jimsantora do you mind posting the secret yaml as well please?