Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using default values.local.yaml results in crash-loop #88

Open
msnelling opened this issue Jul 23, 2021 · 4 comments
Open

Using default values.local.yaml results in crash-loop #88

msnelling opened this issue Jul 23, 2021 · 4 comments

Comments

@msnelling
Copy link

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"
@jimsantora
Copy link

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.

@james-d-elliott
Copy link
Member

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.

@jimsantora
Copy link

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

@fmubaidien
Copy link

This is very helpful @jimsantora do you mind posting the secret yaml as well please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants