From 33d4c2fd68e770c8492a225606742ff76b1e7d97 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sun, 20 Oct 2019 16:05:09 -0700 Subject: [PATCH] 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 --- addons/prometheus/service.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/prometheus/service.yaml b/addons/prometheus/service.yaml index 50014e25..c1b9eecf 100644 --- a/addons/prometheus/service.yaml +++ b/addons/prometheus/service.yaml @@ -5,6 +5,7 @@ metadata: namespace: monitoring annotations: prometheus.io/scrape: 'true' + prometheus.io/port: '9090' spec: type: ClusterIP selector: