From 86bf8218cdebb1d96807ca16ee1723911ac13986 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 17 Apr 2023 12:26:13 +0300 Subject: [PATCH] [bitnami/rabbitmq] Fix high CPU usage while idle Use REST APIs for liveness/readiness probes, instead of spawning expensive erlang processes. Reapply of #11117 and #11180. Fixes #11116. Signed-off-by: Orgad Shaneh (cherry picked from commit 73966c67ff6d3386721cf1f42a6493f961c56792) --- bitnami/rabbitmq/Chart.yaml | 2 +- bitnami/rabbitmq/templates/statefulset.yaml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bitnami/rabbitmq/Chart.yaml b/bitnami/rabbitmq/Chart.yaml index 9901d23a10aa5f..c2c19f739ad060 100644 --- a/bitnami/rabbitmq/Chart.yaml +++ b/bitnami/rabbitmq/Chart.yaml @@ -23,4 +23,4 @@ name: rabbitmq sources: - https://github.com/bitnami/containers/tree/main/bitnami/rabbitmq - https://www.rabbitmq.com -version: 11.14.0 +version: 11.14.1 diff --git a/bitnami/rabbitmq/templates/statefulset.yaml b/bitnami/rabbitmq/templates/statefulset.yaml index 6905c708974a77..8b0564a1ac05ec 100644 --- a/bitnami/rabbitmq/templates/statefulset.yaml +++ b/bitnami/rabbitmq/templates/statefulset.yaml @@ -287,9 +287,13 @@ spec: livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }} exec: command: - - /bin/bash + - sh - -ec + {{- if .Values.loadDefinition.enabled }} - rabbitmq-diagnostics -q ping + {{- else }} + - curl -f --user {{ .Values.auth.username }}:$RABBITMQ_PASSWORD 127.0.0.1:{{ .Values.containerPorts.manager }}/api/health/checks/virtual-hosts + {{- end }} {{- end }} {{- if .Values.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }} @@ -297,9 +301,13 @@ spec: readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }} exec: command: - - /bin/bash + - sh - -ec + {{- if .Values.loadDefinition.enabled }} - rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms + {{- else }} + - curl -f --user {{ .Values.auth.username }}:$RABBITMQ_PASSWORD 127.0.0.1:{{ .Values.containerPorts.manager }}/api/health/checks/local-alarms + {{- end }} {{- end }} {{- if .Values.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}