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

Read Postgres DB details from environment variables every time #88

Open
ameyp opened this issue Jul 6, 2022 · 1 comment
Open

Read Postgres DB details from environment variables every time #88

ameyp opened this issue Jul 6, 2022 · 1 comment

Comments

@ameyp
Copy link

ameyp commented Jul 6, 2022

I'd like it if the chart supported the following:

  • Pass postgres details (host, db name, username, password) as environment variables
  • Generate the app.ini using these details each time the pod boots up

My usecase for this is that I'd like to rotate the postgres database credentials regularly. I'm using hashicorp vault to generate dynamic credentials for the database role I'd like to use for gitea, and every time I request credentials from vault, I get a randomly-generated username and password. My plan is to request fresh credentials at a regular cadence, set environment variables for the pod, restart the gitea pod, and have it generate the app.ini using the environment variables. I'm also open to discussing a different approach if you have one in mind.

If this is something you'd find valuable, I'd be happy to create a pull request.

@ameyp ameyp changed the title Read Postgres DB details from a secret Read Postgres DB details from environment variables every time Jul 6, 2022
@ameyp
Copy link
Author

ameyp commented Jul 6, 2022

Another option is reading the details from an existing secret specified as a Chart value. The crucial part for my usecase is that the variables should be re-read each time the pod is started, not only at first run.

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

1 participant