apiVersion: v1
kind: ConfigMap
metadata:
  name: datasources
data:
  datasources.yaml: |
    apiVersion: 1 
    datasources:
      - name: Prometheus
        type: prometheus
        typeName: Prometheus
        typeLogoUrl: public/app/plugins/datasource/prometheus/img/prometheus_logo.svg
        access: proxy
        url: {{ .Values.env.prometheusUrl }}
        uid: af6b44aa-0703-4979-825c-c1afba946534
        user: ''
        database: ''
        basicAuth: false
        isDefault: false
        jsonData:
          httpMethod: POST
          prometheusType: Prometheus
          prometheusVersion: 2.40.1
        readOnly: false 
---

apiVersion: v1
kind: ConfigMap
metadata:
  name: default
data:
  default.yaml: |
    apiVersion: 1
    providers:
      - name: Default # A uniquely identifiable name for the provider
        orgId: 1
        folder: "" # The folder where to place the dashboards
        folderUid: ""
        type: file
        disableDeletion: false
        allowUiUpdates: true
        options:
          path: /var/lib/grafana/dashboards

---

apiVersion: v1
kind: ConfigMap
metadata:
  name: kubernetes-dashboard
data:
  kubernetes-dashboard.json: |
{{ .Files.Get "kubernetes-dashboard.json" | indent 4 }}