RabbitMQ: Add liveness probe to check ampq port open

This PS adds a check that the ampq port is open.

Change-Id: I79c298f50c67f4b7293e6767fc9c10a66aa7dcf8
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2019-08-28 13:22:22 -05:00
parent 49c8c744ac
commit c5428a9429
2 changed files with 5 additions and 0 deletions

View File

@ -21,5 +21,6 @@ set -e
if [ -f /tmp/rabbit-disable-liveness-probe ]; then
exit 0
else
timeout 5 bash -c "true &>/dev/null </dev/tcp/${MY_POD_IP}/${PORT_AMPQ}"
exec rabbitmqctl status
fi

View File

@ -171,6 +171,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RABBITMQ_USE_LONGNAME
value: "true"
- name: RABBITMQ_NODENAME