Grafana helm chart deploys a pod with three containers: main one with grafana
and two sidecars datasources
and dashboard
. Only the main has has port defined. When kube-prometheus stumbles upon this it fails to scrape sidecars. So the question would be - would those sidecars hold any valuable metrics? I assume not and then would like to annotate them with [prometheus.io/scrape=false](http://prometheus.io/scrape=false)
, however the problem here would be that I see no way to annotate sidecars without impacting the main container.
The only way I see would be to add a servicemonitor to point directly to grafana
container and annotate all three containers not to be scraped directly.
Am I thinking right?
So just FYI this config worked for me (deploying via helm):
enabled: true
podAnnotations:
[prometheus.io/scrape](http://prometheus.io/scrape): "false"```