emissary-ingress / emissary

open source Kubernetes-native API gateway for microservices built on the Envoy Proxy
https://www.getambassador.io
Apache License 2.0
4.33k stars 682 forks source link

Add support to create custom relabelling config for `serviceMonitor` #5510

Open raghavtan opened 7 months ago

raghavtan commented 7 months ago

Please describe your use case / problem. I want to be able to use custom relabelling for all prometheus metrics exported by emissary. Since we use the upstream chart and just customise it using the values.yaml

Describe the solution you'd like Update to the helm-chart templates: Extra variable metrics.serviceMonitor.relabelings and templating toggle in the serviceMonitor template This will allow us to add extra labels to prometheus metrics exposed by addition to scrape_config for the job

Describe alternatives you've considered Using mutating web-hook to update the serviceMonitor spec after deployment but since we use argocd reconciler it is reverted by argocd which can also be ignored. But this is too wide of a workaround for support to add custom config for serviceMonitor

Additional context Add any other context about the feature request here.