Skip to content

docs(kubernetes): add example for messenger deployment #1425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions deployment/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,33 @@ We noticed that some tiller RBAC trouble occurred. You can usually resolve it by

Please, see the [related issue](https://github.com/kubernetes/helm/issues/3130) for further details / information.
You can also take a look at the [related documentation](https://github.com/kubernetes/helm/blob/master/docs/rbac.md)

## Symfony Messenger

Running Pods with the Messenger Component to consume queues requires additions to the Helm chart.

Start by creating a new template for the queue-worker-deployment. The `deployment.yaml` can be used as template, the caddy container and all unused ENV variables should be removed.

Add the following lines under `containers` to overwrite the command.

command:
{{ range .Values.queue_worker.command }}
- {{ . | quote }}
{{ end }}
args:
{{ range .Values.queue_worker.commandArgs }}
- {{ . | quote }}
{{ end }}

Here is an example on how to use it from your `values.yaml`:

command: ['bin/console']
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.

readinessProbe:
exec:
command: ["/bin/sh", "-c", "/bin/ps -ef | grep messenger:consume | grep -v grep"]
initialDelaySeconds: 120
periodSeconds: 3