Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize Grafana annotation and label #105

Merged
merged 2 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.dashboard.label }}: "1"
app.kubernetes.io/component: configmap
app.kubernetes.io/created-by: k8sgpt-operator
app.kubernetes.io/part-of: k8sgpt-operator
Expand Down
10 changes: 9 additions & 1 deletion chart/operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
serviceMonitor:
enabled: false
additionalLabels: {}
grafanaDashboard: false

grafanaDashboard:
enabled: false
folder:
annotation: grafana_folder
name: ai
dashboard:
label: grafana_dashboard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there ever a time this wouldn't be set grafana_dashboard ? Isn't that the default grafana searches for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


controllerManager:
kubeRbacProxy:
containerSecurityContext:
Expand Down