[Feature][devlake] mysql connection config from environment variables
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Use case
running the devlake part (not config-ui, not grafana) we need to ingest the value of DB_URL (either from .env file or as environment variable) in order to set up the mysql connection sadly this contains the full connection string
DB_URL=mysql://username:password@databasehost:3306/database?charset=utf8mb4&parseTime=True&loc=UTC
see https://github.com/apache/incubator-devlake/blob/main/env.example#L26
Usually (like for grafana and opendora) the connection is set up via DB_HOSTNAME, DB_USER, DB_PASSWORD, DB_NAME as environment variables that make us able to put DB_PASSWORD into an encrypted vault. With the given solution above we need to create the connection string and store all data in a vault. Additionally it needs to be recreated on password reset.
Description
I suggest to use DB_HOSTNAME, DB_USER, DB_PASSWORD, DB_NAME for the database connection setup instead of DB_URL. This makes us able to store DB_PASSWORD in an encrypted vault and rotate only that vault/value on password rotation.
Related issues
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
I started something in this PR #8127 :)
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.