mathworks-ref-arch / matlab-production-server-on-kubernetes

MATLAB Production Server on Kubernetes
Other
18 stars 9 forks source link

Added ServiceMonitor to facilitate Prometheus target discovery #9

Closed esteinerMW closed 1 year ago

esteinerMW commented 1 year ago

Create ServiceMonitor conditionally if enabled in values.yaml and CRD is available (installed). Tie ServiceMonitor to Prometheus deployment via configurable label-selection in values.yaml Updated values.yaml inline comments and aligned indentation of inner template yaml file.

Tested the following Prometheus scenarios:

NBonfattiMW commented 1 year ago

I believe we need to disable the prometheus annotations when the servicemonitor is present. I know we didn't get any scraping in our test cluster without the servicemonitor, but it seems there could be situations where having both would result in double scraping:

https://gitlab.com/gitlab-org/charts/gitlab-runner/-/issues/361 https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2601