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

allow to override namespace for serviceMonitor, and use new value for… #57

Merged
merged 1 commit into from
Aug 20, 2021
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: 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