Add explicit annotation for Prometheus port to scrape

* Without the prometheus.io/port annotation, Prometheus
service discovery can scrape other Prometheus ports that
may be available.
* For example, Prometheus sidecars (not included) may
be scraped and that may be unintended
This commit is contained in:
Dalton Hubble 2019-10-20 16:05:09 -07:00
parent de90cb9246
commit 33d4c2fd68

View File

@ -5,6 +5,7 @@ metadata:
namespace: monitoring
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '9090'
spec:
type: ClusterIP
selector: