From 12b9566634cbad14f246bffc9e459ac4f4045361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Sun, 30 Mar 2025 00:18:26 +0100 Subject: [PATCH] update grafana --- deploy/grafana/grafana-deploy.yaml | 6 ++++++ deploy/grafana/prometheus-ds.yaml | 23 +++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/deploy/grafana/grafana-deploy.yaml b/deploy/grafana/grafana-deploy.yaml index 72dd756..5cf8012 100644 --- a/deploy/grafana/grafana-deploy.yaml +++ b/deploy/grafana/grafana-deploy.yaml @@ -51,7 +51,13 @@ spec: volumeMounts: - mountPath: /var/lib/grafana name: grafana-pv + - name: grafana-datasources + mountPath: /etc/grafana/provisioning/datasources/datasources.yaml + subPath: datasources.yaml volumes: - name: grafana-pv persistentVolumeClaim: claimName: grafana-pvc + - name: grafana-datasources + configMap: + name: grafana-datasources diff --git a/deploy/grafana/prometheus-ds.yaml b/deploy/grafana/prometheus-ds.yaml index a24f384..d692d38 100644 --- a/deploy/grafana/prometheus-ds.yaml +++ b/deploy/grafana/prometheus-ds.yaml @@ -1,8 +1,15 @@ -apiVersion: 1 -datasources: - - name: Prometheus - type: prometheus - access: proxy - url: http://prometheus-k8s.monitoring:9090 - isDefault: true - editable: false +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-datasources + namespace: grafana +data: + datasources.yaml: | + apiVersion: 1 + datasources: + - name: Prometheus + type: prometheus + access: proxy + url: http://prometheus-k8s.monitoring:9090 + isDefault: true + editable: false