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

Make grafana dashboard label value configurable #157

Merged
merged 4 commits into from
Jun 17, 2022
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: 3 additions & 3 deletions charts/policy-reporter/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dependencies:
- name: monitoring
repository: ""
version: 2.3.0
version: 2.3.1
- name: ui
repository: ""
version: 2.4.2
- name: kyvernoPlugin
repository: ""
version: 1.3.1
digest: sha256:f1686cfbc5de749d82c2020a8c546e70534e4d7cd154d74cf1380a5fc3dc91ee
generated: "2022-06-09T23:43:09.479977+02:00"
digest: sha256:2fcff214e5178f7c4cb22d0dce27b33a022bf9be46eeea22a4a81f0b2e4f1a4f
generated: "2022-06-17T10:58:52.909430821-04:00"
4 changes: 2 additions & 2 deletions charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord

type: application
version: 2.9.1
version: 2.9.2
appVersion: 2.6.1

icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
Expand All @@ -18,7 +18,7 @@ maintainers:
dependencies:
- name: monitoring
condition: monitoring.enabled
version: "2.3.0"
version: "2.3.1"
- name: ui
condition: ui.enabled
version: "2.4.2"
Expand Down
2 changes: 1 addition & 1 deletion charts/policy-reporter/charts/monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: monitoring
description: Policy Reporter Monitoring with predefined ServiceMonitor and Grafana Dashboards

type: application
version: 2.3.0
version: 2.3.1
appVersion: 0.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{ .Values.grafana.dashboards.label }}: "1"
{{ .Values.grafana.dashboards.label }}: {{ .Values.grafana.dashboards.value }}
{{- include "monitoring.labels" . | nindent 4 }}
data:
cluster-policy-reporter-details-dashboard.json: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{ .Values.grafana.dashboards.label }}: "1"
{{ .Values.grafana.dashboards.label }}: {{ .Values.grafana.dashboards.value }}
{{- with .Values.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{ .Values.grafana.dashboards.label }}: "1"
{{ .Values.grafana.dashboards.label }}: {{ .Values.grafana.dashboards.value }}
{{- with .Values.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
5 changes: 3 additions & 2 deletions charts/policy-reporter/charts/monitoring/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins:
annotations: {}

serviceMonitor:
# allow to override the namespace for serviceMonitor
# allow to override the namespace for serviceMonitor
namespace:
# labels to match the serviceMonitorSelector of the Prometheus Resource
labels: {}
Expand All @@ -26,9 +26,10 @@ grafana:
namespace:
dashboards:
# Enable the deployment of grafana dashboards
enabled: true
enabled: true
# Label to find dashboards using the k8s sidecar
label: grafana_dashboard
value: "1"
folder:
# Annotation to enable folder storage using the k8s sidecar
annotation: grafana_folder
Expand Down