Enable DBs separately

Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
This commit is contained in:
Michel Hollands
2023-06-30 12:36:46 +01:00
parent ad187b1ba2
commit ed0ab9852a
9 changed files with 70 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
{{ if .Values.local.enabled }}
{{- if .Values.local.logs.enabled }}
---
apiVersion: v1
kind: ConfigMap

View File

@@ -1,4 +1,4 @@
{{ if .Values.local.enabled }}
{{- if .Values.local.logs.enabled }}
---
apiVersion: v1
kind: ConfigMap

View File

@@ -1,4 +1,4 @@
{{ if .Values.local.enabled }}
{{- if .Values.local.logs.enabled }}
---
apiVersion: v1
kind: ConfigMap

View File

@@ -1,4 +1,4 @@
{{ if .Values.local.enabled }}
{{- if or (or .Values.local.logs.enabled .Values.local.metrics.enabled) .Values.local.traces.enabled }}
---
apiVersion: v1
kind: ConfigMap
@@ -20,6 +20,7 @@ data:
datasources:
# <string, required> Sets the name you use to refer to
# the data source in panels and queries.
{{- if .Values.local.logs.enabled }}
- name: Loki
# <string, required> Sets the data source type.
type: loki
@@ -39,6 +40,8 @@ data:
# <bool> Allows users to edit data sources from the
# Grafana UI.
editable: true
{{- end }}
{{- if .Values.local.metrics.enabled }}
- name: Mimir
# <string, required> Sets the data source type.
type: prometheus
@@ -58,6 +61,8 @@ data:
# <bool> Allows users to edit data sources from the
# Grafana UI.
editable: true
{{- end }}
{{- if .Values.local.traces.enabled }}
- name: Tempo
# <string, required> Sets the data source type.
type: tempo
@@ -77,4 +82,5 @@ data:
# <bool> Allows users to edit data sources from the
# Grafana UI.
editable: true
{{- end }}
{{- end }}

View File

@@ -1,4 +1,4 @@
{{ if .Values.local.enabled }}
{{- if or (or .Values.local.logs.enabled .Values.local.metrics.enabled) .Values.local.traces.enabled }}
---
apiVersion: v1
kind: PersistentVolumeClaim
@@ -63,30 +63,34 @@ spec:
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-pv
- mountPath: /etc/grafana/provisioning/datasources
name: loki-datasources-provisioning
{{- if .Values.local.logs.enabled }}
- mountPath: /etc/grafana/provisioning/dashboards
name: loki-dashboards-provisioning
- mountPath: /var/lib/grafana/dashboards/loki-1
name: loki-dashboards-1
- mountPath: /var/lib/grafana/dashboards/loki-2
name: loki-dashboards-2
- mountPath: /etc/grafana/provisioning/dashboards
name: loki-dashboards-provisioning
- mountPath: /etc/grafana/provisioning/datasources
name: loki-datasources-provisioning
{{- end }}
volumes:
- name: grafana-pv
persistentVolumeClaim:
claimName: grafana-pvc
- name: loki-dashboards-provisioning
configMap:
name: loki-dashboards-provisioning
- name: loki-datasources-provisioning
configMap:
name: loki-datasources-provisioning
{{- if .Values.local.logs.enabled }}
- name: loki-dashboards-provisioning
configMap:
name: loki-dashboards-provisioning
- name: loki-dashboards-1
configMap:
name: loki-dashboards-1
- name: loki-dashboards-2
configMap:
name: loki-dashboards-2
{{- end }}
---
apiVersion: v1