Add local.enabled setting and make it work

Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
This commit is contained in:
Michel Hollands
2023-06-22 13:18:11 +01:00
parent e57e947019
commit 07f719152e
9 changed files with 80 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
{{ if .Values.local.enabled }}
---
apiVersion: v1
kind: ConfigMap
@@ -14,4 +15,5 @@ data:
"loki-mixin-recording-rules.json": |
{{ $.Files.Get "src/dashboards/loki-mixin-recording-rules.json" | fromJson | toJson }}
"loki-operational.json": |
{{ $.Files.Get "src/dashboards/loki-operational.json" | fromJson | toJson }}
{{ $.Files.Get "src/dashboards/loki-operational.json" | fromJson | toJson }}
{{- end }}

View File

@@ -1,3 +1,4 @@
{{ if .Values.local.enabled }}
---
apiVersion: v1
kind: ConfigMap
@@ -14,4 +15,5 @@ data:
"loki-writes-resources.json": |
{{ $.Files.Get "src/dashboards/loki-writes-resources.json" | fromJson | toJson }}
"loki-writes.json": |
{{ $.Files.Get "src/dashboards/loki-writes.json" | fromJson | toJson }}
{{ $.Files.Get "src/dashboards/loki-writes.json" | fromJson | toJson }}
{{- end }}

View File

@@ -1,3 +1,4 @@
{{ if .Values.local.enabled }}
---
apiVersion: v1
kind: ConfigMap
@@ -24,4 +25,5 @@ data:
options:
path: /var/lib/grafana/dashboards/loki-2
orgId: 1
type: file
type: file
{{- end }}

View File

@@ -1,3 +1,4 @@
{{ if .Values.local.enabled }}
---
apiVersion: v1
kind: ConfigMap
@@ -56,4 +57,5 @@ data:
isDefault:
# <bool> Allows users to edit data sources from the
# Grafana UI.
editable: true
editable: true
{{- end }}

View File

@@ -1,3 +1,4 @@
{{ if .Values.local.enabled }}
---
apiVersion: v1
kind: PersistentVolumeClaim
@@ -100,4 +101,5 @@ spec:
selector:
app: grafana
sessionAffinity: None
type: ClusterIP # Make this configurable
type: ClusterIP # Make this configurable
{{- end }}