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

Connect eoapi-k8s STAC FastAPI to External PostgreSQL Database #133

Open
3 tasks done
MathewNWSH opened this issue Aug 13, 2024 · 2 comments
Open
3 tasks done

Connect eoapi-k8s STAC FastAPI to External PostgreSQL Database #133

MathewNWSH opened this issue Aug 13, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MathewNWSH
Copy link

MathewNWSH commented Aug 13, 2024

Description

Hello everyone, I have recently returned to the topic of deploying pgstack and stac-fast API on Kubernetes (my deployment using Docker Compose can no longer handle the storage needs :).

And here is where I have a problem: many thanks for creating the cloud-native PostgreSQL operator, thanks to it eoapi-k8s is really an amazing tool for working with the cloud in every regard, but we have set up our own bare-metal server dedicated to the PostgreSQL database. The server has been configured for HA (master and synchronizing read-only slaves), so I would like to use this database. This means that, I would like to keep it on a different cluster. Can this be done? i.e., is it enough in the YAML to add:

db:
  settings:
    secrets:
      PGUSER: "username"
      POSTGRES_USER: "username"
      PGPASSWORD: "password"
      POSTGRES_PASSWORD: "password"
      PGHOST: "bare metal load balancer floating IP"

Thanks for the response and the developers' work on eoapi.

Labels

  • enhancement
  • discussion
  • help wanted
@MathewNWSH MathewNWSH added the enhancement New feature or request label Aug 13, 2024
@ranchodeluxe
Copy link
Contributor

@MathewNWSH: If you are using the old and deprecated db: config and not PGO and assuming your k8s cluster can talk to external networks then, yes, setting the host env vars should work this way. Let me know how that works

@ranchodeluxe
Copy link
Contributor

@MathewNWSH: If you are using the old and deprecated db: config and not PGO and assuming your k8s cluster can talk to external networks then, yes, setting the host env vars should work this way. Let me know how that works

That said PGO should actually support you doing this too (including specifying your own usernames/passwords and hosts) but you'd have to dig through their charts to figure out how to do that. That's probably what I'd recommend doing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants