charts
charts copied to clipboard
CronJob failing at MySQL connection
Chart Name
bookstack
Chart Version
0.17.2
Bug Description
Hello,
Enabled CronJob failing with the same configuration of environment variables as Deployment.
values.yaml
image:
tag: "version-v24.05.4"
shelfPermissionsCron:
enabled: true
env:
APP_URL: "REDACTED"
DB_HOST: "REDACTED"
DB_USER: "admin"
DB_PASS: "REDACTED"
DB_DATABASE: "bookstack"
AUTH_METHOD: "ldap"
LDAP_SERVER: "REDACTED"
LDAP_BASE_DN: "REDACTED"
LDAP_DN: "REDACTED"
LDAP_PASS: "REDACTED"
LDAP_USER_FILTER: "REDACTED"
LDAP_EMAIL_ATTRIBUTE: "mail"
LDAP_USER_TO_GROUPS: true
LDAP_REMOVE_FROM_GROUPS: false
APP_VIEWS_BOOKS: "list"
APP_VIEWS_BOOKSHELVES: "list"
persistence:
config:
enabled: true
retain: true
storageClass: "gp3-retain"
size: 1Gi
Relevant log output
Illuminate\Database\QueryException
SQLSTATE[HY000] [1045] Access denied for user 'forge'@'10.100.0.35' (using password: YES) (Connection: mysql, SQL: select `id` from `bookshelves` where `bookshelves`.`deleted_at` is null)
at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
825▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
826▕ );
827▕ }
828▕
➜ 829▕ throw new QueryException(
830▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
831▕ );
832▕ }
833▕ }
+19 vendor frames
20 /app/www/app/Console/Commands/CopyShelfPermissionsCommand.php:54
Illuminate\Database\Eloquent\Builder::get()
+12 vendor frames
@adrianwnuk The CronJob should contain all envs that the Deployment gets, so I wonder what's different here. If you run kubectl get cronjob NAME -o yaml, do you see the envs you'd expect?
I am not sure if I misunderstand the Answer here. But apparently on startup the MariaDB needs too long to start, so the pod throws an error like seen above. Killing the pod after MariaDB is initialized will make it work. Not ideal though