Skip to content

Commit

Permalink
Merge pull request #267 from akash4sh/main
Browse files Browse the repository at this point in the history
feat: Add external database support
  • Loading branch information
akash4sh authored May 27, 2024
2 parents c8be04c + 2b58fdb commit f1161c9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
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.6
version: 1.0.7
dependencies:
- name: postgresql
condition: postgresql.enabled
Expand Down
4 changes: 2 additions & 2 deletions charts/grafana/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ containers:
- name: config
mountPath: "/etc/grafana/grafana.ini"
subPath: grafana.ini
{{- if .Values.postgresql.enabled }}
{{- if .Values.database.enabled }}
- name: {{ .Values.database.secretMount.name }}
mountPath: {{ .Values.database.secretMount.mountPath }}
readOnly: {{ .Values.database.secretMount.readOnly }}
Expand Down Expand Up @@ -630,7 +630,7 @@ volumes:
name: {{ tpl $name $root }}
{{- end }}
{{- end }}
{{- if .Values.postgresql.enabled }}
{{- if .Values.database.enabled }}
- name: {{ .Values.database.secretMount.name }}
secret:
secretName: {{ .Values.database.secretMount.secretName }}
Expand Down
4 changes: 2 additions & 2 deletions charts/grafana/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ data:
plugins: {{ join "," .Values.plugins }}
{{- end }}
grafana.ini: |
{{- if .Values.postgresql.enabled }}
{{- if .Values.database.enabled }}
[database]
enabled = {{ .Values.postgresql.enabled }}
enabled = {{ .Values.database.enabled }}
type = {{ .Values.database.type }}
host = {{ .Values.database.host }}
name = {{ .Values.database.name }}
Expand Down
1 change: 1 addition & 0 deletions charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ postgresql:
enabled: false

database:
enabled: false
type: postgres
host: grafana-postgresql:5432
name: postgres
Expand Down
2 changes: 1 addition & 1 deletion charts/postgresql/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ maintainers:
name: postgresql
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
version: 1.0.2
version: 1.0.3
2 changes: 1 addition & 1 deletion charts/postgresql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ metrics:
serviceMonitor:
## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using Prometheus Operator
##
enabled: true
enabled: false
## @param metrics.serviceMonitor.namespace Namespace for the ServiceMonitor Resource (defaults to the Release Namespace)
##
namespace: ""
Expand Down

0 comments on commit f1161c9

Please sign in to comment.