Skip to content

Commit

Permalink
Merge 245758e into bfa1db1
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie authored Dec 6, 2023
2 parents bfa1db1 + 245758e commit e7cc5d0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 15 additions & 1 deletion charts/posthog/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{- if .Values.worker.enabled -}}
{{- range .Values.worker.workers }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "posthog.fullname" . }}-worker
name: {{ template "posthog.fullname" . }}-{{ template ".name" }}-worker
labels: {{- include "_snippet-metadata-labels-common" . | nindent 4 }}
annotations: {{- include "_snippet-metadata-annotations-common" . | nindent 4 }}
spec:
Expand Down Expand Up @@ -124,6 +125,18 @@ spec:
{{- include "snippet.postgresql-env" . | nindent 8 }}
{{- include "snippet.clickhouse-env" . | nindent 8 }}
{{- include "snippet.email-env" . | nindent 8 }}
{{- if .queues }}
- name: CELERY_WORKER_QUEUES
value: "{{ .queues | join ',' }}"
{{- end }}
{{- if .concurrency }}
- name: CELERY_WORKER_CONCURRENCY
value: "{{ .concurrency }}"
{{- end }}
{{- if .pool }}
- name: CELERY_WORKER_POOL
value: "{{ .pool }}"
{{- end }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
Expand All @@ -139,3 +152,4 @@ spec:
{{- include "_snippet-initContainers-wait-for-service-dependencies" . | indent 8 }}
{{- include "_snippet-initContainers-wait-for-migrations" . | indent 8 }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/posthog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ worker:
# -- Count of worker pods to run. This setting is ignored if `worker.hpa.enabled` is set to `true`.
replicacount: 1

workers:
- name: default

hpa:
# -- Whether to create a HorizontalPodAutoscaler for the worker stack.
enabled: false
Expand Down

0 comments on commit e7cc5d0

Please sign in to comment.