From 30dada66114d86632c001bc4dfa5669e26faf0b1 Mon Sep 17 00:00:00 2001 From: Nicolas <60761885+n1kofr@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:27:11 -0500 Subject: [PATCH] [kube-prometheus-stack] ConfigReloader ServiceMonitor HTTP scheme is not set correctly when HTTPS is enabled (#3815) * Update servicemonitor.yaml Set HTTP as default scheme (only HTTP is supported by ConfigReloader) Signed-off-by: Nicolas <60761885+n1kofr@users.noreply.github.com> * Update servicemonitor.yaml Force HTTP for ConfigReloader scheme Signed-off-by: Nicolas <60761885+n1kofr@users.noreply.github.com> * Update Chart Version Signed-off-by: Nicolas <60761885+n1kofr@users.noreply.github.com> --------- Signed-off-by: Nicolas <60761885+n1kofr@users.noreply.github.com> --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/alertmanager/servicemonitor.yaml | 10 +--------- .../templates/prometheus/servicemonitor.yaml | 10 +--------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 6dfca8826924..a2e2f56fcd77 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -21,7 +21,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 51.9.0 +version: 51.9.1 appVersion: v0.68.0 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 564f70466fcf..99387cabb128 100644 --- a/charts/kube-prometheus-stack/templates/alertmanager/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/alertmanager/servicemonitor.yaml @@ -52,15 +52,7 @@ spec: {{- if .Values.alertmanager.serviceMonitor.proxyUrl }} proxyUrl: {{ .Values.alertmanager.serviceMonitor.proxyUrl}} {{- end }} - {{- if .Values.alertmanager.serviceMonitor.scheme }} - scheme: {{ .Values.alertmanager.serviceMonitor.scheme }} - {{- end }} - {{- if .Values.alertmanager.serviceMonitor.bearerTokenFile }} - bearerTokenFile: {{ .Values.alertmanager.serviceMonitor.bearerTokenFile }} - {{- end }} - {{- if .Values.alertmanager.serviceMonitor.tlsConfig }} - tlsConfig: {{- toYaml .Values.alertmanager.serviceMonitor.tlsConfig | nindent 6 }} - {{- end }} + scheme: http 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 e5d2389d9d9e..e05f6c111c12 100644 --- a/charts/kube-prometheus-stack/templates/prometheus/servicemonitor.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus/servicemonitor.yaml @@ -45,15 +45,7 @@ spec: {{- if .Values.prometheus.serviceMonitor.interval }} interval: {{ .Values.prometheus.serviceMonitor.interval }} {{- end }} - {{- 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 }} - {{- if .Values.prometheus.serviceMonitor.bearerTokenFile }} - bearerTokenFile: {{ .Values.prometheus.serviceMonitor.bearerTokenFile }} - {{- end }} + scheme: http path: "/metrics" {{- if .Values.prometheus.serviceMonitor.metricRelabelings }} metricRelabelings: {{- tpl (toYaml .Values.prometheus.serviceMonitor.metricRelabelings | nindent 6) . }}