From e3a1488768d2a9fd7c5487018992dc83e7efc330 Mon Sep 17 00:00:00 2001 From: matthieu-delisle <94405658+matthieu-delisle@users.noreply.github.com> Date: Mon, 29 Apr 2024 07:23:19 -0400 Subject: [PATCH] kubernetes: Messenger with FrankenPHP (#1939) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(kubernetes) : Adding instruction for the messenger queue with FrankenPHP image The readinessProbe and livenessProbe suggested in the documentation failed because the /bin/ps wasn't installed on the Docker Image. * Update deployment/kubernetes.md Co-authored-by: Kévin Dunglas * Update kubernetes.md * Update kubernetes.md * lint --------- Co-authored-by: Kévin Dunglas --- deployment/kubernetes.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/deployment/kubernetes.md b/deployment/kubernetes.md index b72316304f0..fb8255f77d4 100644 --- a/deployment/kubernetes.md +++ b/deployment/kubernetes.md @@ -225,10 +225,31 @@ commandArgs: ['messenger:consume', 'async', '--memory-limit=100M'] The `readinessProbe` and the `livenessProble` can not use the default `docker-healthcheck` but should test if the command is running. +First, make sure to install the `/bin/ps` binary, otherwise the `readinessProbe` and `livenessProbe` will fail: + + + +```patch +# api/Dockerfile + +RUN apt-get update && apt-get install --no-install-recommends -y \ ++ procps \ +# ... +``` + + + +Then, update the probes: + ```yaml readinessProbe: exec: command: ["/bin/sh", "-c", "/bin/ps -ef | grep messenger:consume | grep -v grep"] initialDelaySeconds: 120 periodSeconds: 3 +livenessProbe: + exec: + command: ["/bin/sh", "-c", "/bin/ps -ef | grep messenger:consume | grep -v grep"] + initialDelaySeconds: 120 + periodSeconds: 3 ```