Skip to content

Commit

Permalink
fix: Fix string/comma problem in worker template (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie authored Jan 16, 2024
1 parent 1a65077 commit 193de31
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/posthog/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 30.37.0
version: 30.38.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
2 changes: 1 addition & 1 deletion charts/posthog/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ spec:
{{- include "snippet.email-env" $ | nindent 8 }}
{{- if .queues }}
- name: CELERY_WORKER_QUEUES
value: "{{ .queues | join ',' }}"
value: "{{ .queues | join "," }}"
{{- end }}
{{- if .concurrency }}
- name: CELERY_WORKER_CONCURRENCY
Expand Down
27 changes: 27 additions & 0 deletions charts/posthog/tests/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,30 @@ tests:
- equal:
path: spec.template.spec.imagePullSecrets
value: [name: secret]
- it: set consumer config correctly
template: templates/worker-deployment.yaml # TODO: remove once secrets.yaml will be fixed/removed
set:
cloud: local
worker.consumers:
- name: gevent
pool: gevent
concurrency: 50
queues:
- analytics_queries
- other
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: CELERY_WORKER_QUEUES
value: analytics_queries,other
- contains:
path: spec.template.spec.containers[0].env
content:
name: CELERY_WORKER_CONCURRENCY
value: "50"
- contains:
path: spec.template.spec.containers[0].env
content:
name: CELERY_WORKER_POOL
value: gevent

0 comments on commit 193de31

Please sign in to comment.