Implement configurable ServiceMonitor namespace
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do?
Makes the namespace where ServiceMonitor resource should be installed configurable.
Why was this MR needed?
In many Kubernetes deployments ServiceMonitor resource should be deployed in the namespace where Prometheus lives (i.e. monitoring).
What's the best way to test this MR?
Not sure... It's a minor change and affects only generated ServiceMonitor manifest, so testing the resulting manifest in both cases (when metrics.serviceMonitor.namespace is set and unset) should be good enough.
What are the relevant issue numbers?
close #568 (closed)