From b142308617f56ed145b2c3480451e46e4cebaa8e Mon Sep 17 00:00:00 2001 From: iamabhishek-dubey Date: Mon, 10 Oct 2022 16:13:19 +0530 Subject: [PATCH] Added prometheus service annotation Signed-off-by: iamabhishek-dubey --- k8sutils/labels.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/k8sutils/labels.go b/k8sutils/labels.go index 8af0b08e9..e0316df12 100644 --- a/k8sutils/labels.go +++ b/k8sutils/labels.go @@ -78,6 +78,8 @@ func generateServiceAnots(stsMeta metav1.ObjectMeta) map[string]string { anots := map[string]string{ "redis.opstreelabs.in": "true", "redis.opstreelabs.instance": stsMeta.GetName(), + "prometheus.io/scrape": "true", + "prometheus.io/port": "9121", } for k, v := range stsMeta.GetAnnotations() { anots[k] = v