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

add honorLabels setting #216

Merged
merged 1 commit into from
Oct 19, 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
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.4.1
version: 2.5.0
appVersion: 0.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
{{- include "kyvernoplugin.selectorLabels" . | nindent 8 }}
endpoints:
- port: rest
honorLabels: {{ .Values.kyverno.serviceMonitor.honorLabels }}
relabelings:
- action: labeldrop
regex: pod|service|container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
{{- include "policyreporter.selectorLabels" . | nindent 8 }}
endpoints:
- port: http
honorLabels: {{ .Values.serviceMonitor.honorLabels }}
relabelings:
- action: labeldrop
regex: pod|service|container
Expand Down
4 changes: 4 additions & 0 deletions charts/policy-reporter/charts/monitoring/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins:
annotations: {}

serviceMonitor:
# HonorLabels chooses the metrics labels on collisions with target labels
honorLabels: false
# allow to override the namespace for serviceMonitor
namespace:
# labels to match the serviceMonitorSelector of the Prometheus Resource
Expand All @@ -16,6 +18,8 @@ serviceMonitor:

kyverno:
serviceMonitor:
# HonorLabels chooses the metrics labels on collisions with target labels
honorLabels: false
# see serviceMonitor.relabelings
relabelings: []
# see serviceMonitor.relabelings
Expand Down