charts
charts copied to clipboard
Transferring data from configmap to secret kubernetes
Good afternoon Is it possible to transfer sensitive data from configmap to secret kubernetes? For example: Database connection data
@dmyar21 could you give an example of which config you mean and how you are currently setting it? then I'd be able to answer if and how it might be possible
Hi @philicious I want to move the configmap trino-catalog to secret kybernetes as it contains information about connecting to the database I did this by creating a separate secret.yaml and changing volume and volume mount s in deployment.yaml. That's how I got the result I wanted.
Hi @philicious
Suggestion to implement this: https://github.com/trinodb/charts/pull/111
Hello @dmyar21 and @luismacosta
Maybe this could be useful: You can set secrets in environment variables in Trino and then reference them in the catalog configuration (or any configuration) like so:
example-postgres-db.properties: |-
connector.name=postgresql
connection-url=jdbc:postgresql://${ENV:DB_HOST}:${ENV:DB_PORT}/${ENV:DB_DATABASE}
connection-user=${ENV:DB_USERNAME}
connection-password=${ENV:DB_PASSWORD}
user-credential-name=user
password-credential-name=password
You can mount the environment variables (DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD) from secrets, and your catalog configuration can stay on a configmap since it does not contain any secret values.