Skip to content

Allow setting metastore credentials via environment variables #1337

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

Open
Gerrit-K opened this issue Apr 8, 2025 · 1 comment
Open

Allow setting metastore credentials via environment variables #1337

Gerrit-K opened this issue Apr 8, 2025 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Gerrit-K
Copy link
Contributor

Gerrit-K commented Apr 8, 2025

Is your feature request related to a problem? Please describe.

tl;dr: it would be useful if credentials/configuration for the persistent metastore could be set via environment variables

When running Polaris with a persistent metastore (e.g. PostgreSQL) in a production-like environment, it can be cumbersome to provide configuration details (like credentials and hostname) because they need to be embedded in raw in the persistence.xml file. In production environments, especially in the Kubernetes ecosystem, it is not uncommon to manage this configuration externally (e.g. credentials generated and managed by an operator), in which case the format of these configuration pieces often doesn't match the required persistence.xml format. This means that these components cannot be wired together using IaC, but rather some things need to be manually copied after deploying the metastore and embedded into a persistence.xml.

Describe the solution you'd like

I would be very useful if the connection details could be provided via environment variables - at least the URL, username and password. Ideally, this could be a generic solution, where the persistence.xml file could contain bash-style placeholders like ${VAR}, which would then be replaced by environment variables at runtime when loading the xml file.

Describe alternatives you've considered

As a hacky workaround, we're currently injecting initContainers that mount the persistence.xml file, replace placeholders by environment variables and write the result into a new file that is then mounted by the Polaris container.

Additional context

No response

@Gerrit-K Gerrit-K added the enhancement New feature or request label Apr 8, 2025
@dimas-b
Copy link
Contributor

dimas-b commented Apr 8, 2025

There's a new JDBC-based persistence impl. in progress, which should be able to leverage Quarkus configuration (many input options, including env. vars), I hope.

Early PR: #1287

@flyrain flyrain added the good first issue Good for newcomers label Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants