From b316244aa5d342138075ed966bdf5a06bad97aef Mon Sep 17 00:00:00 2001 From: Chris Loukas Date: Wed, 15 Sep 2021 13:30:57 +0200 Subject: [PATCH] Add scrapeTimeout in kubeStateMetrics [kube-prometheus-stack] (#1346) Signed-off-by: Chris Loukas --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/exporters/kube-state-metrics/serviceMonitor.yaml | 3 +++ charts/kube-prometheus-stack/values.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 61d57afa7977..7dc2a52050ab 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -18,7 +18,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 18.0.7 +version: 18.0.8 appVersion: 0.50.0 kubeVersion: ">=1.16.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/exporters/kube-state-metrics/serviceMonitor.yaml b/charts/kube-prometheus-stack/templates/exporters/kube-state-metrics/serviceMonitor.yaml index 0eb903f006f4..bcc62d81519f 100644 --- a/charts/kube-prometheus-stack/templates/exporters/kube-state-metrics/serviceMonitor.yaml +++ b/charts/kube-prometheus-stack/templates/exporters/kube-state-metrics/serviceMonitor.yaml @@ -14,6 +14,9 @@ spec: {{- if .Values.kubeStateMetrics.serviceMonitor.interval }} interval: {{ .Values.kubeStateMetrics.serviceMonitor.interval }} {{- end }} + {{- if .Values.kubeStateMetrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.kubeStateMetrics.serviceMonitor.scrapeTimeout }} + {{- end }} {{- if .Values.kubeStateMetrics.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.kubeStateMetrics.serviceMonitor.proxyUrl}} {{- end }} diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index 8631157c6d67..6dfc1bf142a1 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -1247,6 +1247,9 @@ kubeStateMetrics: ## Scrape interval. If not set, the Prometheus default scrape interval is used. ## interval: "" + ## Scrape Timeout. If not set, the Prometheus default scrape timeout is used. + ## + scrapeTimeout: "" ## proxyUrl: URL of a proxy that should be used for scraping. ## proxyUrl: ""