From ab48bc29a001df92b09de6106a1d0119e6b70c9f Mon Sep 17 00:00:00 2001 From: grzesuav Date: Fri, 23 Aug 2024 23:03:12 +0200 Subject: [PATCH] fix: Parameterize prometheus scrape annotation Signed-off-by: grzesuav --- charts/node-agent/templates/daemonset.yaml | 2 +- charts/node-agent/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/node-agent/templates/daemonset.yaml b/charts/node-agent/templates/daemonset.yaml index e2a426b..53efb94 100644 --- a/charts/node-agent/templates/daemonset.yaml +++ b/charts/node-agent/templates/daemonset.yaml @@ -14,7 +14,7 @@ spec: {{- include "node-agent.selectorLabels" . | nindent 8 }} app: coroot-node-agent annotations: - prometheus.io/scrape: 'true' + prometheus.io/scrape: '{{ .Values.scrape | default true}}' prometheus.io/port: '{{ .Values.port }}' {{- if .Values.podAnnotations }} {{- toYaml .Values.podAnnotations | nindent 8 }} diff --git a/charts/node-agent/values.yaml b/charts/node-agent/values.yaml index 1142894..4f29c4c 100644 --- a/charts/node-agent/values.yaml +++ b/charts/node-agent/values.yaml @@ -20,6 +20,7 @@ resources: memory: "1Gi" port: 80 +scrape: "true" env: []