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

.Values.*.*DbUrls should be incorporated into chaingraph-secrets #54

Open
bitjson opened this issue Jan 26, 2023 · 0 comments
Open

.Values.*.*DbUrls should be incorporated into chaingraph-secrets #54

bitjson opened this issue Jan 26, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@bitjson
Copy link
Member

bitjson commented Jan 26, 2023

Instead of just dropping the values of .Values.hasura.overrideDbUrl, .Values.hasura.metadataDbUrl, and .Values.postgres.externalDbUrl directly into environment variables, those environment variables should be set from the chaingraph-secrets object like postgresConnectionString. This ensures that other systems never unintentionally leak the connection information. (Secrets don't get automatically logged or displayed in many places, simple environment variables do.)

E.g. see difference in treatment here:

name: hasura
env:
- name: HASURA_GRAPHQL_DATABASE_URL
{{ if .Values.hasura.overrideDbUrl }}
value: {{ .Values.hasura.overrideDbUrl }}
{{ else if .Values.postgres.externalDbUrl }}
value: {{ .Values.postgres.externalDbUrl }}
{{ else }}
valueFrom:
secretKeyRef:
name: chaingraph-secrets
key: postgresConnectionString
{{ end }}
- name: HASURA_GRAPHQL_METADATA_DATABASE_URL
{{ if .Values.hasura.metadataDbUrl }}
value: {{ .Values.hasura.metadataDbUrl }}
{{ else if .Values.hasura.overrideDbUrl }}
value: {{ .Values.hasura.overrideDbUrl }}
{{ else if .Values.postgres.externalDbUrl }}
value: {{ .Values.postgres.externalDbUrl }}
{{ else }}
valueFrom:
secretKeyRef:
name: chaingraph-secrets
key: postgresConnectionString
{{ end }}
- name: HASURA_GRAPHQL_ADMIN_SECRET
{{ if .Values.hasura.adminSecretKey }}
value: {{ .Values.hasura.adminSecretKey }}
{{ else }}
valueFrom:
secretKeyRef:
name: chaingraph-secrets
key: adminSecretKey
{{ end }}

And the chart documentation will also need to be updated to better explain how to add/modify those values.

@bitjson bitjson added the good first issue Good for newcomers label Jan 26, 2023
@bitjson bitjson changed the title .Values.hasura.overrideDbUrl, .Values.hasura.metadataDbUrl, and .Values.postgres.externalDbUrl should be incorporated into chaingraph-secrets .Values.*.*DbUrls should be incorporated into chaingraph-secrets Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant