docker-mailserver-helm icon indicating copy to clipboard operation
docker-mailserver-helm copied to clipboard

Prometheus ServiceMonitor

Open emouawad opened this issue 2 years ago • 4 comments

The chart is adding label to ServiceMonitor release: [release-name] there is no way to add an additional label.

My kube-prometheus-stack setup requires a label on the ServiceMonitor release: kube-prom-stack

Would it be possible for the chart to add an additionalLabels: feature ?

emouawad avatar Mar 04 '24 15:03 emouawad

Sure. Can you create a PR?

cfis avatar Mar 04 '24 20:03 cfis

i am afraid currently my skillset doesn't include yet templating with helm

emouawad avatar Mar 04 '24 20:03 emouawad

Hi, please don't get me wrong - i really appreciate the effort and time you guys put in helping the dev community.

but this PR doesn't solve the previously described issue: the issue is on the ServiceMonitor not on the Deployment. While this could help somebody else it doesn't solve the requirement for kube-prometheus-stack multi release installs: to differentiate multiple prometheus installs running on the same cluster. The differentiation is done on the label release: exactly as follows: A) release: kube-prom-stack B) release: kube-prom-stack2

Bitnami charts and others enable usually on the ServiceMonitor an additionalLabels property Example: https://artifacthub.io/packages/helm/bitnami/redis?modal=template&template=servicemonitor.yaml - Line 13 https://artifacthub.io/packages/helm/bitnami/redis?modal=values&path=metrics.serviceMonitor.additionalLabels

emouawad avatar Mar 08 '24 07:03 emouawad

Yeah ok, reopening. Just need to do the same thing for service monitor.

cfis avatar Mar 08 '24 23:03 cfis

Ok - see https://github.com/docker-mailserver/docker-mailserver-helm/pull/110. Hopefully that does the trick.

cfis avatar May 04 '24 20:05 cfis