dex
dex copied to clipboard
Dex doesn't retry when database not available during start
Preflight Checklist
- [X] I agree to follow the Code of Conduct that this project adheres to.
- [X] I have searched the issue tracker for an issue that matches the one I want to file, without success.
- [X] I am not looking for support or already pursued the available support channels without success.
Version
2.32.0
Storage Type
Postgres
Installation Type
Binary, Custom container image
Expected Behavior
Dex should retry database connections instead failing to start if database not available. In container world its difficult to align pods startup sequence in distributed environment.
Actual Behavior
Dex failed to start if unable to connect with Postgres during start time. It error out with message "failed to initialize storage:"
Steps To Reproduce
- configure postgres connector with Dex.
- start Dex without bringing databases first.
- Dex will fail to start with error "failed to initialize storage:"
Additional Information
We have applications deployed over K3S, Dex is one of the pod having Postgres database connector. It seems to be mandatory have database available for Dex to start as it try to connect with Postgres and error out. It doesn't have logic to retry connection when failed.
Configuration
No response
Logs
failed to initialize storage: