From 16cfa36fda753ff96e137512820534868794c4f8 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 26 Nov 2024 21:49:49 +0100 Subject: [PATCH] fix(podMonitor,serviceMonitor): enable http2 by default --- .../prometheus-postgres-exporter/serviceMonitorHTTP.yaml | 2 +- unittests/podMonitors/podMonitorHTTP.yaml | 6 +++--- unittests/serviceMonitors/serviceMonitorHTTP.yaml | 6 +++--- values.yaml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/prometheus-postgres-exporter/serviceMonitorHTTP.yaml b/templates/prometheus-postgres-exporter/serviceMonitorHTTP.yaml index e213e44..3d17727 100644 --- a/templates/prometheus-postgres-exporter/serviceMonitorHTTP.yaml +++ b/templates/prometheus-postgres-exporter/serviceMonitorHTTP.yaml @@ -25,7 +25,7 @@ spec: {{- toYaml . | nindent 6 }} {{- end }} scrapeTimeout: {{ required "The scrape timeout of the serviceMonitor is not defined!" .Values.prometheus.metrics.serviceMonitor.scrapeTimeout }} - scheme: {{ required "The scheme of the serviceMonitor is not defined!" .Values.prometheus.metrics.serviceMonitor.scheme}} + scheme: {{ required "The scheme of the serviceMonitor is not defined!" .Values.prometheus.metrics.serviceMonitor.scheme }} targetPort: {{ required "The port of the service is not defined!" .Values.services.http.port }} {{- with .Values.prometheus.metrics.serviceMonitor.tlsConfig }} tlsConfig: diff --git a/unittests/podMonitors/podMonitorHTTP.yaml b/unittests/podMonitors/podMonitorHTTP.yaml index 7ed6423..61a1d08 100644 --- a/unittests/podMonitors/podMonitorHTTP.yaml +++ b/unittests/podMonitors/podMonitorHTTP.yaml @@ -58,7 +58,7 @@ tests: helm.sh/chart: prometheus-postgres-exporter-0.1.0 - equal: path: spec.podMetricsEndpoints[0].enableHttp2 - value: false + value: true - equal: path: spec.podMetricsEndpoints[0].followRedirects value: false @@ -119,7 +119,7 @@ tests: set: prometheus.metrics.enabled: true prometheus.metrics.podMonitor.enabled: true - prometheus.metrics.podMonitor.enableHttp2: true + prometheus.metrics.podMonitor.enableHttp2: false prometheus.metrics.podMonitor.followRedirects: true prometheus.metrics.podMonitor.honorLabels: true prometheus.metrics.podMonitor.interval: "180s" @@ -137,7 +137,7 @@ tests: count: 1 - equal: path: spec.podMetricsEndpoints[0].enableHttp2 - value: true + value: false - equal: path: spec.podMetricsEndpoints[0].followRedirects value: true diff --git a/unittests/serviceMonitors/serviceMonitorHTTP.yaml b/unittests/serviceMonitors/serviceMonitorHTTP.yaml index 3bb42ae..a26c566 100644 --- a/unittests/serviceMonitors/serviceMonitorHTTP.yaml +++ b/unittests/serviceMonitors/serviceMonitorHTTP.yaml @@ -59,7 +59,7 @@ tests: helm.sh/chart: prometheus-postgres-exporter-0.1.0 - equal: path: spec.endpoints[0].enableHttp2 - value: false + value: true - equal: path: spec.endpoints[0].followRedirects value: false @@ -121,7 +121,7 @@ tests: set: prometheus.metrics.enabled: true prometheus.metrics.serviceMonitor.enabled: true - prometheus.metrics.serviceMonitor.enableHttp2: true + prometheus.metrics.serviceMonitor.enableHttp2: false prometheus.metrics.serviceMonitor.followRedirects: true prometheus.metrics.serviceMonitor.honorLabels: true prometheus.metrics.serviceMonitor.interval: "180s" @@ -139,7 +139,7 @@ tests: count: 1 - equal: path: spec.endpoints[0].enableHttp2 - value: true + value: false - equal: path: spec.endpoints[0].followRedirects value: true diff --git a/values.yaml b/values.yaml index 0c8ea2e..b33463a 100644 --- a/values.yaml +++ b/values.yaml @@ -313,7 +313,7 @@ prometheus: podMonitor: enabled: false annotations: {} - enableHttp2: false + enableHttp2: true followRedirects: false honorLabels: false labels: {} @@ -341,7 +341,7 @@ prometheus: enabled: false annotations: {} labels: {} - enableHttp2: false + enableHttp2: true followRedirects: false honorLabels: false interval: "60s"