Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion chart/templates/grafana-db-user-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@ spec:
value: {{ ternary (include "tobs.dburi.port" . ) ($grafana.timescale.database.port | quote ) ($isDBURI) }}
- name: PGUSER
value: {{ ternary (include "tobs.dburi.user" . ) ($grafana.timescale.adminUser ) ($isDBURI) }}
{{ if $isDBURI }}
- name: PGPASSWORD
value: {{ ternary (include "tobs.dburi.password" . ) ( .Values.promscale.connection.password ) ($isDBURI) }}
value: {{ include "tobs.dburi.password" . }}
{{ else }}
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: {{ tpl $grafana.timescale.adminPassSecret $ }}
key: PROMSCALE_DB_PASSWORD
{{ end }}
- name: PGHOST
value: {{ ternary (include "tobs.dburi.hostwithoutport" . ) ( tpl $grafana.timescale.database.host $ ) ($isDBURI) }}
command: [ 'psql', '-d', {{ ternary (include "tobs.dburi.dbname" . ) ($grafana.timescale.database.dbName ) ($isDBURI) }}, '-f', '/add-users.sql' ]
Expand Down
3 changes: 3 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ promscale:

# selector used to provision your own Secret containing connection details
# Use this option with caution

# if you are adding a conn string here do not forget
# to add the same for kube-prometheus.grafana.timescale.adminPassSecret
connectionSecretName: ""

## Note:
Expand Down