Skip to content
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

chore: Use run-docker script for task processor #173

Merged
merged 7 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
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
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
Loading