Skip to content

Method to pass credentials in catalogs #311

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

Closed
hongbo-miao opened this issue Mar 11, 2025 · 2 comments
Closed

Method to pass credentials in catalogs #311

hongbo-miao opened this issue Mar 11, 2025 · 2 comments

Comments

@hongbo-miao
Copy link
Contributor

hongbo-miao commented Mar 11, 2025

Currently https://github.com/trinodb/charts/tree/c1bacab5b15a8ece6186a40ddd676f725b20a93b/charts/trino

does not document how to pass credentials such as

catalogs:
  my_db: |
    connector.name=postgresql
    connection-url=jdbc:postgresql://production-hm-postgres.xxxxxxxxxxxx.us-west-2.rds.amazonaws.com:5432/iot_db
    connection-user=xxx
    connection-password=xxx

It would be great to clarify how to pass credentials, thanks! ☺️

@nineinchnick
Copy link
Member

Would you like to give it a shot and open a PR? We should add a comment with an example and reference https://trino.io/docs/current/security/secrets.html

@hongbo-miao
Copy link
Contributor Author

hongbo-miao commented Mar 12, 2025

Thanks for the link, @nineinchnick !

Assume I have HM_POSTGRES_USER and HM_POSTGRES_PASSWORD in a Kubernetes secret called hm-trino-secret.

I succeed by

envFrom:
  - secretRef:
      name: hm-trino-secret
catalogs:
  postgresql: |
    connector.name=postgresql
    connection-url=jdbc:postgresql://production-hm-postgres.xxxxxxxxxxxx.us-west-2.rds.amazonaws.com:5432/iot_db
    connection-user=${ENV:HM_POSTGRES_USER}
    connection-password=${ENV:HM_POSTGRES_PASSWORD}

I posted full deployment code at https://github.com/hongbo-miao/hongbomiao.com/pull/24997/files

Hope it can people save some time in future! ☺️

@hongbo-miao hongbo-miao changed the title Please document how to pass credentials Method to pass credentials in catalogs Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants