grafana: Use declarative data sources

This commit is contained in:
Lauri Võsandi 2024-08-20 12:14:42 +03:00
parent 666d900128
commit ede08c205b

View File

@ -22,6 +22,22 @@ spec:
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata:
name: grafana-datasources
data:
prometheus.yaml: |
apiVersion: 1
prune: true
datasources:
- name: Prometheus
type: prometheus
orgId: 1
url: http://prometheus-operated.monitoring.svc.cluster.local:9090
version: 1
editable: false
---
apiVersion: v1
kind: ConfigMap
metadata: metadata:
name: grafana-config name: grafana-config
data: data:
@ -152,10 +168,15 @@ spec:
name: grafana-data name: grafana-data
- mountPath: /etc/grafana - mountPath: /etc/grafana
name: grafana-config name: grafana-config
- mountPath: /etc/grafana/provisioning/datasources
name: grafana-datasources
volumes: volumes:
- name: grafana-config - name: grafana-config
configMap: configMap:
name: grafana-config name: grafana-config
- name: grafana-datasources
configMap:
name: grafana-datasources
volumeClaimTemplates: volumeClaimTemplates:
- metadata: - metadata:
name: grafana-data name: grafana-data