From 43e20258457e56fa6dc9b00686f54ef284e52ded Mon Sep 17 00:00:00 2001 From: Eric Shen Date: Fri, 12 Jul 2024 21:40:06 +0800 Subject: [PATCH] fix: the prom config when istio migration (#1180) * fix: the prom config when istio enabled Signed-off-by: ericsyh * fix lint Signed-off-by: ericsyh --------- Signed-off-by: ericsyh (cherry picked from commit eddd814e35c30d935227d79e81c53c064295ad53) --- .../templates/prometheus/prometheus-configmap.yaml | 5 +++++ .../templates/prometheus/prometheus-configmap.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml b/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml index 48086dac..ede07846 100644 --- a/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml @@ -68,6 +68,10 @@ data: - {{ template "pulsar.namespace" . }} {{- end }} {{- if .Values.istio.enabled }} +{{- if .Values.istio.migration }} + scheme: http + enable_http2: false +{{- else }} scheme: https # Disable http2 for Prometheus issue: https://github.com/prometheus/prometheus/issues/10213 enable_http2: false @@ -76,6 +80,7 @@ data: cert_file: /etc/prom-certs/cert-chain.pem key_file: /etc/prom-certs/key.pem insecure_skip_verify: true +{{- end }} {{- end }} relabel_configs: {{- if .Values.istio.enabled }} diff --git a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml index 13ac16a7..c183d295 100644 --- a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml @@ -64,6 +64,10 @@ data: - {{ template "pulsar.namespace" . }} {{- end }} {{- if .Values.istio.enabled }} +{{- if .Values.istio.migration }} + scheme: http + enable_http2: false +{{- else }} scheme: https # Disable http2 for Prometheus issue: https://github.com/prometheus/prometheus/issues/10213 enable_http2: false @@ -72,6 +76,7 @@ data: cert_file: /etc/prom-certs/cert-chain.pem key_file: /etc/prom-certs/key.pem insecure_skip_verify: true +{{- end }} {{- end }} relabel_configs: {{- if .Values.istio.enabled }}