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

Add ability to use existing postgres server with infisical-standalone helm chart. Fixes #1765 #1766

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mpsOxygen
Copy link

@mpsOxygen mpsOxygen commented Apr 30, 2024

Description 📣

This adds the option to use a existing Postgres instance with the infisical-standalone helm chart. It uses an existing secret to get the database connection URI.

Fixes: #1765

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Tests 🛠️

I set the values and run helm template .


Razvan Valceanu added 3 commits April 30, 2024 14:47
…re to get connection URI

Signed-off-by: Razvan Valceanu <razvan.valceanu@metaminds.com>
Signed-off-by: Razvan Valceanu <razvan.valceanu@metaminds.com>
Signed-off-by: Razvan Valceanu <razvan.valceanu@metaminds.com>
@mpsOxygen
Copy link
Author

While waiting for this to be approved I also tested this in my production environment. Works as intended.

@maidul98
Copy link
Collaborator

maidul98 commented May 2, 2024

Hey @mpsOxygen, you should already be able to do this when you disable the in cluster Postgres and set your own postgres connection URL via DB_CONNECTION_URI. An example is shown in step 4 here https://infisical.com/docs/self-hosting/deployment-options/kubernetes-helm. Is this helpful?

https://github.com/Infisical/infisical/blob/main/helm-charts/infisical-standalone-postgres/templates/infisical.yaml#L67

@mpsOxygen
Copy link
Author

mpsOxygen commented May 2, 2024

Hello @maidul98,

I know about kubeSecretRef: "infisical-secrets", but I now realize I did not explain my use case correctly.

I use an operator to take care of postgres. When it spins up a postgres cluster for me, it creates a secret with all needed information (db name, user, pass, uri, etc). The password for example is randomly generated each time a cluster is spun up. Or it maybe even changes. The operator takes care of everything and puts it in a secret it creates and manages. All I need from my apps is to say: get your DB_CONNECTION_URI from the secret the operator created. So while I know about the secret that gives infisical it's ENVs, using it would mean to manually update it every time something changes. This patch fixes my problem because I just tell infisical the name of the secret the postgres operator uses to keep postgres connection info.

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

Successfully merging this pull request may close these issues.

Ability to use preexisting postgres server with infisical-standalone helm chart
2 participants