1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-15 17:50:58 +00:00

Merge pull request #322 from giantswarm/make-servicemonitor-configurable

Make inverval and scrapeTimeout configurable on ServiceMonitors
This commit is contained in:
Frank Jogeleit 2023-06-23 15:00:09 +02:00 committed by GitHub
commit d024613852
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 1 deletions

View file

@ -24,6 +24,12 @@ spec:
endpoints:
- port: rest
honorLabels: {{ .Values.kyverno.serviceMonitor.honorLabels }}
{{- if .Values.kyverno.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.kyverno.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.kyverno.serviceMonitor.interval }}
interval: {{ .Values.kyverno.serviceMonitor.interval }}
{{- end }}
relabelings:
- action: labeldrop
regex: pod|service|container

View file

@ -23,6 +23,12 @@ spec:
endpoints:
- port: http
honorLabels: {{ .Values.serviceMonitor.honorLabels }}
{{- if .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
relabelings:
- action: labeldrop
regex: pod|service|container

View file

@ -20,7 +20,11 @@ serviceMonitor:
metricRelabelings: []
# optional namespaceSelector
namespaceSelector: {}
# optional scrapeTimeout
scrapeTimeout:
# optional scrape interval
interval:
kyverno:
serviceMonitor:
# HonorLabels chooses the metrics labels on collisions with target labels
@ -31,6 +35,10 @@ kyverno:
metricRelabelings: []
# optional namespaceSelector
namespaceSelector: {}
# optional scrapeTimeout
scrapeTimeout:
# optional scrape interval
interval:
grafana:
# namespace for configMap of grafana dashboards