From fff6a7b177cc3f38f0040d813ef3096aa9f10f92 Mon Sep 17 00:00:00 2001 From: Ilia Lazebnik Date: Mon, 26 Feb 2024 23:36:49 +0200 Subject: [PATCH] [kube-prometheus-stack] allow setting reloader scheme for svc monitor (#4230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jan-Otto Kröpke --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/alertmanager/servicemonitor.yaml | 7 ++++++- .../templates/prometheus/servicemonitor.yaml | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 2e80e6de3fb7..bb87305c97da 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 56.10.0 +version: 56.11.0 appVersion: v0.71.2 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/alertmanager/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/alertmanager/servicemonitor.yaml index 99387cabb128..f2d924f8bf2d 100644 --- a/charts/kube-prometheus-stack/templates/alertmanager/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/alertmanager/servicemonitor.yaml @@ -52,7 +52,12 @@ spec: {{- if .Values.alertmanager.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.alertmanager.serviceMonitor.proxyUrl}} {{- end }} - scheme: http + {{- if .Values.alertmanager.serviceMonitor.scheme }} + scheme: {{ .Values.alertmanager.serviceMonitor.scheme }} + {{- end }} + {{- if .Values.alertmanager.serviceMonitor.tlsConfig }} + tlsConfig: {{- toYaml .Values.alertmanager.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} path: "/metrics" {{- if .Values.alertmanager.serviceMonitor.metricRelabelings }} metricRelabelings: {{- tpl (toYaml .Values.alertmanager.serviceMonitor.metricRelabelings | nindent 6) . }} diff --git a/charts/kube-prometheus-stack/templates/prometheus/servicemonitor.yaml b/charts/kube-prometheus-stack/templates/prometheus/servicemonitor.yaml index e05f6c111c12..31cbc90b2229 100644 --- a/charts/kube-prometheus-stack/templates/prometheus/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus/servicemonitor.yaml @@ -45,7 +45,12 @@ spec: {{- if .Values.prometheus.serviceMonitor.interval }} interval: {{ .Values.prometheus.serviceMonitor.interval }} {{- end }} - scheme: http + {{- if .Values.prometheus.serviceMonitor.scheme }} + scheme: {{ .Values.prometheus.serviceMonitor.scheme }} + {{- end }} + {{- if .Values.prometheus.serviceMonitor.tlsConfig }} + tlsConfig: {{- toYaml .Values.prometheus.serviceMonitor.tlsConfig | nindent 6 }} + {{- end }} path: "/metrics" {{- if .Values.prometheus.serviceMonitor.metricRelabelings }} metricRelabelings: {{- tpl (toYaml .Values.prometheus.serviceMonitor.metricRelabelings | nindent 6) . }}