From 60ba93d80f517ddb262222dbabce4207bf73cfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCllner?= Date: Tue, 19 Sep 2023 15:23:25 +0200 Subject: [PATCH 1/4] [kube-prometheus-stack] remove default cpu and memory requests and limits from prometheus config reloader (#3812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Markus Müllner --- charts/kube-prometheus-stack/Chart.yaml | 2 +- charts/kube-prometheus-stack/values.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index b57ddcdddfdf..0d798928b608 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.0.3 +version: 51.1.0 appVersion: v0.68.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/values.yaml b/charts/kube-prometheus-stack/values.yaml index 611ce608bbc5..697ef599f8d1 100644 --- a/charts/kube-prometheus-stack/values.yaml +++ b/charts/kube-prometheus-stack/values.yaml @@ -2377,13 +2377,13 @@ prometheusOperator: enableProbe: false # resource config for prometheusConfigReloader - resources: - requests: - cpu: 200m - memory: 50Mi - limits: - cpu: 200m - memory: 50Mi + resources: {} + # requests: + # cpu: 200m + # memory: 50Mi + # limits: + # cpu: 200m + # memory: 50Mi ## Thanos side-car image when configured ## From 724e34b3accbe15e705814037a7bea691e29fa00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCllner?= Date: Tue, 19 Sep 2023 16:54:51 +0200 Subject: [PATCH 2/4] [kube-prometheus-stack] update prometheus operator deployment template (#3812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Markus Müllner --- .../prometheus-operator/deployment.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml index 1017a00bea5b..7e186369c650 100644 --- a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml @@ -91,10 +91,26 @@ spec: {{- else }} - --prometheus-config-reloader={{ $configReloaderRegistry }}/{{ .Values.prometheusOperator.prometheusConfigReloader.image.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloader.image.tag | default .Chart.AppVersion }} {{- end }} + {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.requests.cpu }} - --config-reloader-cpu-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.cpu }} + {{- else }} + - --config-reloader-cpu-request=0 + {{- end }} + {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.limits.cpu }} - --config-reloader-cpu-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.cpu }} + {{- else }} + - --config-reloader-cpu-limit=0 + {{- end }} + {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.requests.memory }} - --config-reloader-memory-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.memory }} + {{- else }} + - --config-reloader-memory-request=0 + {{- end }} + {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.limits.memory }} - --config-reloader-memory-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.memory }} + {{- else }} + - --config-reloader-memory-limit=0 + {{- end }} {{- if .Values.prometheusOperator.prometheusConfigReloader.enableProbe }} - --enable-config-reloader-probes=true {{- end }} From 04564920d3eff0b16c65ed0ccfaa64f207b07181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCllner?= Date: Wed, 20 Sep 2023 08:29:43 +0200 Subject: [PATCH 3/4] [kube-prometheus-stack] fix prometheus operator deployment template by wrapping nullable values (#3812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Markus Müllner --- .../templates/prometheus-operator/deployment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml index 7e186369c650..5d2d16ba58ad 100644 --- a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml @@ -91,22 +91,22 @@ spec: {{- else }} - --prometheus-config-reloader={{ $configReloaderRegistry }}/{{ .Values.prometheusOperator.prometheusConfigReloader.image.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloader.image.tag | default .Chart.AppVersion }} {{- end }} - {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.requests.cpu }} + {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).cpu) }} - --config-reloader-cpu-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.cpu }} {{- else }} - --config-reloader-cpu-request=0 {{- end }} - {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.limits.cpu }} + {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).cpu) }} - --config-reloader-cpu-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.cpu }} {{- else }} - --config-reloader-cpu-limit=0 {{- end }} - {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.requests.memory }} + {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).memory) }} - --config-reloader-memory-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.memory }} {{- else }} - --config-reloader-memory-request=0 {{- end }} - {{- if .Values.prometheusOperator.prometheusConfigReloader.resources.limits.memory }} + {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).memory) }} - --config-reloader-memory-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.memory }} {{- else }} - --config-reloader-memory-limit=0 From b2743859810fb3b6de84f2e05901ff19acbbedf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCllner?= Date: Thu, 21 Sep 2023 07:26:20 +0200 Subject: [PATCH 4/4] [kube-prometheus-stack] use default value instead of if in prometheus operator deployment template (#3812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Markus Müllner --- .../prometheus-operator/deployment.yaml | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml index 5d2d16ba58ad..67d0024d1428 100644 --- a/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus-operator/deployment.yaml @@ -91,26 +91,10 @@ spec: {{- else }} - --prometheus-config-reloader={{ $configReloaderRegistry }}/{{ .Values.prometheusOperator.prometheusConfigReloader.image.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloader.image.tag | default .Chart.AppVersion }} {{- end }} - {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).cpu) }} - - --config-reloader-cpu-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.cpu }} - {{- else }} - - --config-reloader-cpu-request=0 - {{- end }} - {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).cpu) }} - - --config-reloader-cpu-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.cpu }} - {{- else }} - - --config-reloader-cpu-limit=0 - {{- end }} - {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).memory) }} - - --config-reloader-memory-request={{ .Values.prometheusOperator.prometheusConfigReloader.resources.requests.memory }} - {{- else }} - - --config-reloader-memory-request=0 - {{- end }} - {{- if (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).memory) }} - - --config-reloader-memory-limit={{ .Values.prometheusOperator.prometheusConfigReloader.resources.limits.memory }} - {{- else }} - - --config-reloader-memory-limit=0 - {{- end }} + - --config-reloader-cpu-request={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).cpu) | default 0 }} + - --config-reloader-cpu-limit={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).cpu) | default 0 }} + - --config-reloader-memory-request={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).memory) | default 0 }} + - --config-reloader-memory-limit={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).memory) | default 0 }} {{- if .Values.prometheusOperator.prometheusConfigReloader.enableProbe }} - --enable-config-reloader-probes=true {{- end }}