Skip to content

Commit e340d3f

Browse files
BeyerJCJan Christoph Beyer
and
Jan Christoph Beyer
authored
docs(kubernetes): add example for messenger deployment (#1425)
Co-authored-by: Jan Christoph Beyer <jbe@plusnet.de>
1 parent 79aa552 commit e340d3f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

deployment/kubernetes.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,33 @@ We noticed that some tiller RBAC trouble occurred. You can usually resolve it by
9696

9797
Please, see the [related issue](https://github.com/kubernetes/helm/issues/3130) for further details / information.
9898
You can also take a look at the [related documentation](https://github.com/kubernetes/helm/blob/master/docs/rbac.md)
99+
100+
## Symfony Messenger
101+
102+
Running Pods with the Messenger Component to consume queues requires additions to the Helm chart.
103+
104+
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.
105+
106+
Add the following lines under `containers` to overwrite the command.
107+
108+
command:
109+
{{ range .Values.queue_worker.command }}
110+
- {{ . | quote }}
111+
{{ end }}
112+
args:
113+
{{ range .Values.queue_worker.commandArgs }}
114+
- {{ . | quote }}
115+
{{ end }}
116+
117+
Here is an example on how to use it from your `values.yaml`:
118+
119+
command: ['bin/console']
120+
commandArgs: ['messenger:consume', 'async', '--memory-limit=100M']
121+
122+
The `readinessProbe` and the `livenessProble` can not use the default `docker-healthcheck` but should test if the command is running.
123+
124+
readinessProbe:
125+
exec:
126+
command: ["/bin/sh", "-c", "/bin/ps -ef | grep messenger:consume | grep -v grep"]
127+
initialDelaySeconds: 120
128+
periodSeconds: 3

0 commit comments

Comments
 (0)