From 184bfb9b2e5c6c391ceb6e4f1736e9223be75f66 Mon Sep 17 00:00:00 2001 From: ericsyh Date: Fri, 12 Jul 2024 15:37:09 +0800 Subject: [PATCH 1/2] fix: the prom config when istio enabled Signed-off-by: ericsyh --- .../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 e4b32c0f..cb257781 100644 --- a/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml @@ -53,6 +53,10 @@ data: - {{ template "pulsar.namespace" . }} {{- end }} {{- if .Values.istio.enabled }} +{{- if .Values .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 @@ -61,6 +65,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 e4b32c0f..cb257781 100644 --- a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml @@ -53,6 +53,10 @@ data: - {{ template "pulsar.namespace" . }} {{- end }} {{- if .Values.istio.enabled }} +{{- if .Values .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 @@ -61,6 +65,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 }} From a2df0e20b492960a6752e96863d3995a9508c384 Mon Sep 17 00:00:00 2001 From: ericsyh Date: Fri, 12 Jul 2024 15:39:54 +0800 Subject: [PATCH 2/2] fix lint Signed-off-by: ericsyh --- .../templates/prometheus/prometheus-configmap.yaml | 2 +- .../sn-platform/templates/prometheus/prometheus-configmap.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml b/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml index cb257781..79aa35c5 100644 --- a/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform-slim/templates/prometheus/prometheus-configmap.yaml @@ -53,7 +53,7 @@ data: - {{ template "pulsar.namespace" . }} {{- end }} {{- if .Values.istio.enabled }} -{{- if .Values .Values.istio.migration }} +{{- if .Values.istio.migration }} scheme: http enable_http2: false {{- else }} diff --git a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml index cb257781..79aa35c5 100644 --- a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml @@ -53,7 +53,7 @@ data: - {{ template "pulsar.namespace" . }} {{- end }} {{- if .Values.istio.enabled }} -{{- if .Values .Values.istio.migration }} +{{- if .Values.istio.migration }} scheme: http enable_http2: false {{- else }}