-
Notifications
You must be signed in to change notification settings - Fork 81
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
[Chart] Policy Reporter ServiceMonitor Missing Namespace Selector #283
Comments
Hey, thanks for reporting. I will have a look on it |
@fjogeleit How would one apply this to kyverno plugin's service monitor? |
@L1ghtman2k there is a dedicated value for the plugin service monitor within the monitoring subchart |
Oh, i see, I was looking for something in the values.yaml that contains "plugin". Makes sense now, thanks! |
The template here allows you to specify a different namespace for the service monitor.
policy-reporter/charts/policy-reporter/charts/monitoring/templates/servicemonitor.yaml
Line 5 in bc7d8fb
The
monitoring.smNamespace
helper allows you to specify a namespace other than the.Release.Namespace
or.Values.global.namespace
policy-reporter/charts/policy-reporter/charts/monitoring/templates/_helpers.tpl
Lines 61 to 69 in bc7d8fb
The problem being that if you do specify a different namespace than the release namespace, the service monitor will be missing a
namespaceSelector
in the spec that's a requirement if the serviceMonitor isn't in the same namespace as the service/endpointpolicy-reporter/charts/policy-reporter/charts/monitoring/templates/servicemonitor.yaml
Lines 15 to 34 in bc7d8fb
This issue prevents prometheus from scraping the metrics endpoint
The text was updated successfully, but these errors were encountered: