Thomas
01/26/2022, 4:24 PMpostgresql:
parameters:
DATABASE_SERVICE_NAME: postgresql-service
POSTGRESQL_DATABASE: somepgdatabase
POSTGRESQL_PASSWORD: test
POSTGRESQL_USER: test
this creates secrets with those keys:
database-name
database-password
database-user
For the subchart of dagster I have this:
dagster:
postgresql:
# set postgresql.enabled to be false to disable deploy of a PostgreSQL database and use an
# existing external PostgreSQL database
enabled: false
# Used by init container to check that db is running. (Even if enabled:false)
image:
registry: "registry.default.svc:5000"
repository: "repo/postgresql"
tag: "latest"
pullPolicy: IfNotPresent
# set this PostgreSQL hostname when using an external PostgreSQL database
postgresqlHost: "postgresql"
postgresqlUsername: test
# Note when changing this password (e.g. in test) that credentials will
# persist as long as the PVCs do -- see:
# <https://github.com/helm/charts/issues/12836#issuecomment-524552358>
postgresqlPassword: test
postgresqlDatabase: somepgdatabase
# set postgresql parameter keywords for the connection string.
# see: <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS>
postgresqlParams: {}
service:
port: 5432
and finally:
global:
postgresqlSecretName: "postrgresql-secret-name"
which seems to define configmap which points to the dagster secrets
https://github.com/dagster-io/dagster/blob/e26db9e21f64e265c74f60b61a67ea154e125959/helm/dagster/templates/helpers/_helpers.tpl#L184
What I want if possible is that from a single secrets it is mapped to both env in subcharts. is it possible ?# Whether to generate a secret resource for the PostgreSQL password. Useful if
# global.postgresqlSecretName is managed outside of this helm chart.
generatePostgresqlPasswordSecret: true
rex
01/26/2022, 7:09 PMglobal:
postgresqlSecretName: "database-password"
generatePostgresqlPasswordSecret: false
Thomas
01/26/2022, 7:27 PMpostgresql-password
and is not a variable.
See line 58:
https://artifacthub.io/packages/helm/dagster/dagster?modal=template&template=deployment-daemon.yaml
So I can change the secret name but I need to add another key (duplicated) in this secret to access the value.
Like done with:
https://artifacthub.io/packages/helm/dagster/dagster?modal=template&template=secret-postgres.yaml
Maybe I can ask for an enhancement ?rex
01/26/2022, 7:34 PMdatabase-password
, I thought it was the name of your secret. Yes you’re correct - it’s currently hard coded to read from the postgresql-password
key of whatever secret you pass to the helm chartThomas
01/26/2022, 7:40 PM