Skip to content

Commit

Permalink
kubernetes: Messenger with FrankenPHP (#1939)
Browse files Browse the repository at this point in the history
* 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 <kevin@dunglas.fr>

* Update kubernetes.md

* Update kubernetes.md

* lint

---------

Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
  • Loading branch information
matthieu-delisle and dunglas committed Apr 29, 2024
1 parent c957aa9 commit e3a1488
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions deployment/kubernetes.md
Expand Up @@ -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:

<!-- markdownlint-disable no-hard-tabs -->

```patch
# api/Dockerfile

RUN apt-get update && apt-get install --no-install-recommends -y \
+ procps \
# ...
```

<!-- markdownlint-enable no-hard-tabs -->

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
```

0 comments on commit e3a1488

Please sign in to comment.