From 3580eeddfd8a957c3cb2d4181d6a764c3e287bf8 Mon Sep 17 00:00:00 2001 From: nikhil bhat Date: Thu, 2 Nov 2023 18:25:15 +0530 Subject: [PATCH] Add support for enabling/disabling http2 on servicemonitor for kube state metrics Signed-off-by: nikhil bhat --- charts/kube-state-metrics/Chart.yaml | 2 +- charts/kube-state-metrics/templates/servicemonitor.yaml | 6 ++++++ charts/kube-state-metrics/values.yaml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/kube-state-metrics/Chart.yaml b/charts/kube-state-metrics/Chart.yaml index 9e2ceb26837c..60a9975b7fd4 100644 --- a/charts/kube-state-metrics/Chart.yaml +++ b/charts/kube-state-metrics/Chart.yaml @@ -7,7 +7,7 @@ keywords: - prometheus - kubernetes type: application -version: 5.14.0 +version: 5.15.0 appVersion: 2.10.0 home: https://github.com/kubernetes/kube-state-metrics/ sources: diff --git a/charts/kube-state-metrics/templates/servicemonitor.yaml b/charts/kube-state-metrics/templates/servicemonitor.yaml index 79a07a6555c7..0a5b851eca9d 100644 --- a/charts/kube-state-metrics/templates/servicemonitor.yaml +++ b/charts/kube-state-metrics/templates/servicemonitor.yaml @@ -49,6 +49,9 @@ spec: {{- if .Values.prometheus.monitor.proxyUrl }} proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}} {{- end }} + {{- if .Values.prometheus.monitor.enableHttp2 }} + enableHttp2: {{ .Values.prometheus.monitor.enableHttp2}} + {{- end }} {{- if .Values.prometheus.monitor.honorLabels }} honorLabels: true {{- end }} @@ -85,6 +88,9 @@ spec: {{- if .Values.prometheus.monitor.proxyUrl }} proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}} {{- end }} + {{- if .Values.prometheus.monitor.enableHttp2 }} + enableHttp2: {{ .Values.prometheus.monitor.enableHttp2}} + {{- end }} {{- if .Values.prometheus.monitor.honorLabels }} honorLabels: true {{- end }} diff --git a/charts/kube-state-metrics/values.yaml b/charts/kube-state-metrics/values.yaml index 0821a7709e56..ee6e1a9f7a74 100644 --- a/charts/kube-state-metrics/values.yaml +++ b/charts/kube-state-metrics/values.yaml @@ -175,6 +175,8 @@ prometheus: labelValueLengthLimit: 0 scrapeTimeout: "" proxyUrl: "" + ## Whether to enable HTTP2 for servicemonitor + # enableHttp2: false selectorOverride: {} honorLabels: false metricRelabelings: []