Skip to content

Commit

Permalink
feat: parameterise grafana's annotations and labels (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aris Boutselis committed May 19, 2023
1 parent c58f8b4 commit 6d8056e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions chart/operator/templates/grafana-k8sgpt-dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{{ if .Values.grafanaDashboard -}}
{{ if .Values.grafanaDashboard.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
annotations:
{{ .Values.grafanaDashboard.folder.annotation }}: {{ .Values.grafanaDashboard.folder.name }}
labels:
grafana_dashboard: "1"
{{ .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
Expand Down
9 changes: 8 additions & 1 deletion chart/operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
serviceMonitor:
enabled: false
additionalLabels: {}
grafanaDashboard: false
grafanaDashboard:
enabled: false
folder:
annotation: grafana_folder
name: ai
label:
key: grafana_dashboard
value: "1"
controllerManager:
kubeRbacProxy:
containerSecurityContext:
Expand Down

0 comments on commit 6d8056e

Please sign in to comment.