Skip to content

Commit

Permalink
Merge pull request #57 from Issif/main
Browse files Browse the repository at this point in the history
allow to override namespace for serviceMonitor, and use new value for…
  • Loading branch information
Frank Jogeleit authored Aug 20, 2021
2 parents c1b5dd5 + faeac45 commit f29e868
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
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: 1.4.0
version: 1.4.1
- name: ui
repository: ""
version: 1.8.4
- name: kyvernoPlugin
repository: ""
version: 0.5.2
digest: sha256:685d62ebe8f290e74785bf444a072aa839087822aabeb8e91caa4816915bafe5
generated: "2021-08-09T20:16:57.768228+02:00"
digest: sha256:fa7e3ab9c7747b4d64dc2a42927e4f67ae8bf3d71e66a51700c6a7fff29bb644
generated: "2021-08-20T10:14:19.664564+02:00"
2 changes: 1 addition & 1 deletion charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- name: monitoring
condition: monitoring.enabled
repository: ""
version: "1.4.0"
version: "1.4.1"
- name: ui
condition: ui.enabled
repository: ""
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: 1.4.0
version: 1.4.1
appVersion: 0.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "monitoring.fullname" . }}-clusterpolicy-details-dashboard
namespace: {{ .Values.namespace }}
namespace: {{ .Values.grafana.namespace }}
annotations:
{{ .Values.grafana.folder.annotation }}: {{ .Values.grafana.folder.name }}
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "monitoring.fullname" . }}-overview-dashboard
namespace: {{ .Values.namespace }}
namespace: {{ .Values.grafana.namespace }}
annotations:
{{ .Values.grafana.folder.annotation }}: {{ .Values.grafana.folder.name }}
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "monitoring.fullname" . }}-policy-details-dashboard
namespace: {{ .Values.namespace }}
namespace: {{ .Values.grafana.namespace }}
annotations:
{{ .Values.grafana.folder.annotation }}: {{ .Values.grafana.folder.name }}
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "monitoring.fullname" . }}
{{ if .Values.namespace }}
namespace: {{ .Values.namespace }}
{{ end }}
labels:
{{- include "monitoring.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}
Expand Down
5 changes: 4 additions & 1 deletion charts/policy-reporter/charts/monitoring/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace: cattle-dashboards
# allow to override the namespace for serviceMonitor
namespace:

plugins:
kyverno: false
Expand All @@ -8,6 +9,8 @@ serviceMonitor:
labels: {}

grafana:
# namespace for configMap of grafana dashboards
namespace: cattle-dashboards
dashboards:
# Label to find dashboards using the k8s sidecar
label: grafana_dashboard
Expand Down

0 comments on commit f29e868

Please sign in to comment.