When oathkeeper is deployed along with a charm requiring oathkeeper-info relation, it temporarily gets into error state before becoming active.
This happens because oathkeeper attempts to start the service when the config file is missing.
unit-oathkeeper-0: 14:01:33 ERROR unit.oathkeeper/0.juju-log oathkeeper-info:17: cannot perform the following tasks:
- Start service "oathkeeper" (cannot start service: exited quickly with code 1)
----- Logs from task 0 -----
2024-03-05T14:01:33Z INFO Service "oathkeeper" has never been started.
----- Logs from task 1 -----
2024-03-05T14:01:33Z INFO Most recent service output:
Thank you for using ORY Oathkeeper v0.40.6!
Take security seriously and subscribe to the ORY Security Newsletter. Stay on top of new patches and security insights.
>> Subscribe now: http://eepurl.com/di390P <<
time=2024-03-05T14:01:33Z level=fatal msg=Failed to initialize configuration audience=application error=map[message:no such file or directory] service_name=ORY Oathkeeper service_version=v0.40.6
2024-03-05T14:01:33Z ERROR cannot start service: exited quickly with code 1
-----
unit-oathkeeper-0: 14:01:35 ERROR juju.worker.uniter pebble poll failed for container "oathkeeper": failed to send pebble-ready event: terminated
Bug Description
When oathkeeper is deployed along with a charm requiring
oathkeeper-info
relation, it temporarily gets into error state before becoming active. This happens because oathkeeper attempts to start the service when the config file is missing.To Reproduce
juju deploy traefik-k8s --channel edge --trust juju deploy postgresql-k8s --channel stable --trust juju deploy kratos --channel edge --trust juju deploy hydra --channel edge --trust juju deploy oathkeeper --channel edge --trust juju relate kratos postgresql-k8s juju relate hydra postgresql-k8s juju relate traefik-k8s hydra:public-ingress juju deploy openfga-k8s --channel edge --trust juju relate openfga-k8s postgresql-k8s
juju deploy identity-platform-admin-ui --trust juju relate kratos identity-platform-admin-ui juju relate hydra identity-platform-admin-ui juju relate openfga-k8s identity-platform-admin-ui juju relate oathkeeper identity-platform-admin-ui
Environment
juju 3.1/stable microk8s 1.28-strict
Relevant log output
Additional context
No response