Add configurable probes to rabbitmq

Currently rabbitmq probes are hardcoded with no ability to
customize via values.

Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: Ibbe84e68542296f3279c2e59986b9835fe301089
This commit is contained in:
Ruslan Aliev 2024-05-01 18:35:01 -05:00
parent 93aec7e807
commit 5c1709d5bd
4 changed files with 34 additions and 14 deletions

View File

@ -12,9 +12,9 @@
--- ---
apiVersion: v1 apiVersion: v1
appVersion: v3.9.0 appVersion: v3.12.0
description: OpenStack-Helm RabbitMQ description: OpenStack-Helm RabbitMQ
name: rabbitmq name: rabbitmq
version: 0.1.34 version: 0.1.35
home: https://github.com/rabbitmq/rabbitmq-server home: https://github.com/rabbitmq/rabbitmq-server
... ...

View File

@ -18,6 +18,17 @@ limitations under the License.
{{- $_ := set . "deployment_name" .Release.Name }} {{- $_ := set . "deployment_name" .Release.Name }}
{{- end }} {{- end }}
{{- define "rabbitmqReadinessProbeTemplate" }}
exec:
command:
- /tmp/rabbitmq-readiness.sh
{{- end }}
{{- define "rabbitmqLivenessProbeTemplate" }}
exec:
command:
- /tmp/rabbitmq-liveness.sh
{{- end }}
{{/* {{/*
(aostapenko) rounds cpu limit in any permissible format to integer value (min 1) (aostapenko) rounds cpu limit in any permissible format to integer value (min 1)
"100m" -> 1 "100m" -> 1
@ -237,18 +248,8 @@ spec:
- name: RABBITMQ_FEATURE_FLAGS - name: RABBITMQ_FEATURE_FLAGS
value: "{{ .Values.conf.feature_flags }}" value: "{{ .Values.conf.feature_flags }}"
{{- end }} {{- end }}
readinessProbe: {{ dict "envAll" $envAll "component" "rabbitmq" "container" "rabbitmq" "type" "readiness" "probeTemplate" (include "rabbitmqReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
initialDelaySeconds: 10 {{ dict "envAll" $envAll "component" "rabbitmq" "container" "rabbitmq" "type" "liveness" "probeTemplate" (include "rabbitmqLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
timeoutSeconds: 10
exec:
command:
- /tmp/rabbitmq-readiness.sh
livenessProbe:
initialDelaySeconds: 60
timeoutSeconds: 10
exec:
command:
- /tmp/rabbitmq-liveness.sh
lifecycle: lifecycle:
preStop: preStop:
exec: exec:

View File

@ -68,6 +68,24 @@ pod:
initialDelaySeconds: 120 initialDelaySeconds: 120
periodSeconds: 90 periodSeconds: 90
timeoutSeconds: 5 timeoutSeconds: 5
rabbitmq:
rabbitmq:
readiness:
enabled: true
params:
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
liveness:
enabled: true
params:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 5
security_context: security_context:
exporter: exporter:
pod: pod:

View File

@ -34,4 +34,5 @@ rabbitmq:
- 0.1.32 Enable addition of default consumer prefetch count - 0.1.32 Enable addition of default consumer prefetch count
- 0.1.33 Bump RabbitMQ image version to 3.13.0 - 0.1.33 Bump RabbitMQ image version to 3.13.0
- 0.1.34 Add 2024.1 overrides - 0.1.34 Add 2024.1 overrides
- 0.1.35 Add configurable probes to rabbitmq container
... ...