Skip to content

Commit

Permalink
Merge pull request #285 from akash4sh/main
Browse files Browse the repository at this point in the history
config: Add env for postgres username and password
  • Loading branch information
akash4sh authored Jun 19, 2024
2 parents f44cb94 + 14fff03 commit b6c6d43
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ name: grafana
sources:
- https://github.com/grafana/grafana
type: application
version: 1.0.7
version: 1.0.8
dependencies:
- name: postgresql
condition: postgresql.enabled
Expand Down
13 changes: 13 additions & 0 deletions charts/grafana/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,19 @@ containers:
key: {{ .Values.Clickhouse.existingSecret.passwordkey }}
{{- end }}
{{- end }}
{{- if .Values.postgresql.enabled }}
- name: POSTGRESQL_USERNAME
value: {{ .Values.postgresql.username }}
- name: POSTGRESQL_PASSWORD
{{- if not .Values.postgresql.existingSecret }}
value: {{ .Values.postgresql.password }}
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgresql.existingSecret.name }}
key: {{ .Values.postgresql.existingSecret.passwordkey }}
{{- end }}
{{- end }}
{{- if .Values.imageRenderer.enabled }}
- name: GF_RENDERING_SERVER_URL
value: http://{{ template "grafana.fullname" . }}-image-renderer.{{ template "grafana.namespace" . }}:{{ .Values.imageRenderer.service.port }}/render
Expand Down
8 changes: 8 additions & 0 deletions charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -929,3 +929,11 @@ Clickhouse:
# name: ""
# usernamekey: ""
# passwordkey: ""

postgresql:
enabled: false
username: ""
password: ""
existingSecret: {}
# name: ""
# passwordkey: ""

0 comments on commit b6c6d43

Please sign in to comment.