-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathgrafana-k8sgpt-dashboard.yaml
39 lines (39 loc) · 1.42 KB
/
grafana-k8sgpt-dashboard.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{{ if .Values.grafanaDashboard.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
annotations:
{{ .Values.grafanaDashboard.folder.annotation }}: {{ .Values.grafanaDashboard.folder.name }}
labels:
{{ .Values.grafanaDashboard.label.key }}: {{ .Values.grafanaDashboard.label.value | quote }}
app.kubernetes.io/component: configmap
app.kubernetes.io/created-by: k8sgpt-operator
app.kubernetes.io/part-of: k8sgpt-operator
{{- include "chart.labels" . | nindent 4 }}
name: k8sgpt-overview
namespace: {{ .Values.grafanaDashboard.namespace | default (include "k8sgpt-operator.namespace" .) }}
data:
k8sgpt-overview.json: |
{{ .Files.Get "dashboards/k8sgpt-overview.json" | indent 4}}
---
{{ if .Values.grafanaDashboard.grafanaOperator.enabled -}}
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
labels:
app.kubernetes.io/component: grafana-dashboard
app.kubernetes.io/created-by: k8sgpt-operator
app.kubernetes.io/part-of: k8sgpt-operator
{{- include "chart.labels" . | nindent 4 }}
name: k8sgpt-overview
namespace: {{ .Values.grafanaDashboard.namespace | default (include "k8sgpt-operator.namespace" .) }}
spec:
folder: {{ .Values.grafanaDashboard.folder.name }}
instanceSelector:
matchLabels:
{{- toYaml $.Values.grafanaDashboard.grafanaOperator.matchLabels | nindent 6 }}
configMapRef:
name: k8sgpt-overview
key: k8sgpt-overview.json
{{ end -}}
{{ end -}}