Skip to content

Commit

Permalink
[bitnami/rabbitmq] Fix high CPU usage while idle (bitnami#16082)
Browse files Browse the repository at this point in the history
Use REST APIs for liveness/readiness probes, instead of spawning
expensive erlang processes.

Reapply of bitnami#11117 and bitnami#11180.

Fixes bitnami#11116.

Signed-off-by: Orgad Shaneh <[email protected]>
(cherry picked from commit 73966c6)

Signed-off-by: Juan José Martos <[email protected]>
Co-authored-by: Juan José Martos <[email protected]>
  • Loading branch information
2 people authored and Yaytay committed May 5, 2023
1 parent cb82b5b commit 29a3f24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bitnami/rabbitmq/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ name: rabbitmq
sources:
- https://github.com/bitnami/containers/tree/main/bitnami/rabbitmq
- https://www.rabbitmq.com
version: 11.14.3
version: 11.14.4
12 changes: 10 additions & 2 deletions bitnami/rabbitmq/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,19 +287,27 @@ 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 }}
{{- else if .Values.readinessProbe.enabled }}
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 }}
Expand Down

0 comments on commit 29a3f24

Please sign in to comment.