Skip to content

Commit

Permalink
chore: Use run-docker script for task processor (#173)
Browse files Browse the repository at this point in the history
* Use run-docker script for task processor

* Bump version

* bump version

* bump version

* bump version
  • Loading branch information
matthewelwell authored Feb 12, 2024
1 parent d05e20a commit 8bd648e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion charts/flagsmith/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: flagsmith
description: Flagsmith
type: application
version: 0.24.0
version: 0.24.1
appVersion: 2.99.0
dependencies:
- name: postgresql
Expand Down
18 changes: 16 additions & 2 deletions charts/flagsmith/templates/_task_processor_environment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{{ include (print $.Template.BasePath "/_api_environment.yaml") . }}
- name: "RUN_BY_PROCESSOR"
value: "1"
{{- if .Values.taskProcessor.sleepIntervalMs }}
- name: TASK_PROCESSOR_SLEEP_INTERVAL
value: {{ .Values.taskProcessor.sleepIntervalMs | quote }}
{{- end }}
{{- if .Values.taskProcessor.numThreads }}
- name: TASK_PROCESSOR_NUM_THREADS
value: {{ .Values.taskProcessor.numThreads | quote }}
{{- end }}
{{- if .Values.taskProcessor.gracePeriodMs }}
- name: TASK_PROCESSOR_GRACE_PERIOD_MS
value: {{ .Values.taskProcessor.gracePeriodMs | quote }}
{{- end }}
{{- if .Values.taskProcessor.queuePopSize }}
- name: TASK_PROCESSOR_QUEUE_POP_SIZE
value: {{ .Values.taskProcessor.queuePopSize | quote }}
{{- end }}
21 changes: 2 additions & 19 deletions charts/flagsmith/templates/deployment-task-processor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,9 @@ spec:
image: {{ .Values.taskProcessor.image.repository | default .Values.api.image.repository }}:{{ .Values.taskProcessor.image.tag | default .Values.api.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.taskProcessor.image.imagePullPolicy | default .Values.api.image.imagePullPolicy }}
command:
- python
- manage.py
- ./scripts/run-docker.sh
args:
- runprocessor
{{- with .Values.taskProcessor.sleepIntervalMs }}
- --sleepintervalms
- {{ . | quote }}
{{- end }}
{{- with .Values.taskProcessor.numThreads }}
- --numthreads
- {{ . | quote }}
{{- end }}
{{- with .Values.taskProcessor.gracePeriodMs }}
- --graceperiodms
- {{ . | quote }}
{{- end }}
{{- with .Values.taskProcessor.queuePopSize }}
- --queuepopsize
- {{ . | quote }}
{{- end }}
- run-task-processor
env: {{ include (print $.Template.BasePath "/_task_processor_environment.yaml") . | nindent 8 }}
livenessProbe:
failureThreshold: {{ .Values.taskProcessor.livenessProbe.failureThreshold }}
Expand Down

0 comments on commit 8bd648e

Please sign in to comment.