Skip to content

Commit d6b83ad

Browse files
Separate task processor image from API (#130)
* separate task processor image from API * Default to api image tag for backwards compat * Re-add imagePullSecrets * Improve conditional logic * Add more detailed comment * null all taskProcessor values by default * Remove redundant parentheses
1 parent 924283b commit d6b83ad

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

charts/flagsmith/templates/deployment-task-processor.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ spec:
4444
{{- if .Values.taskProcessor.schedulerName }}
4545
schedulerName: "{{ .Values.taskProcessor.schedulerName }}"
4646
{{- end }}
47-
{{- if .Values.api.image.imagePullSecrets }}
47+
{{- if .Values.taskProcessor.image.imagePullSecrets }}
48+
imagePullSecrets:
49+
{{ toYaml .Values.taskProcessor.image.imagePullSecrets | indent 8 }}
50+
{{- else if .Values.api.image.imagePullSecrets }}
4851
imagePullSecrets:
4952
{{ toYaml .Values.api.image.imagePullSecrets | indent 8 }}
5053
{{- end }}
@@ -56,8 +59,8 @@ spec:
5659
{{- toYaml $securityContext | nindent 8 }}
5760
containers:
5861
- name: {{ .Chart.Name }}-task-processor
59-
image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default (printf "%s" .Chart.AppVersion) }}
60-
imagePullPolicy: {{ .Values.api.image.imagePullPolicy }}
62+
image: {{ .Values.taskProcessor.image.repository | default .Values.api.image.repository }}:{{ .Values.taskProcessor.image.tag | default .Values.api.image.tag | default .Chart.AppVersion }}
63+
imagePullPolicy: {{ .Values.taskProcessor.image.imagePullPolicy | default .Values.api.image.imagePullPolicy }}
6164
command:
6265
- python
6366
- manage.py

charts/flagsmith/values.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,15 @@ frontend:
118118

119119
# See https://docs.flagsmith.com/deployment/task-processor
120120
taskProcessor:
121+
image:
122+
# all values here default to those in .Values.api.image if not configured
123+
# this is to simplify the logic for those using flagsmith-api image
124+
# and to maintain backwards compatibility.
125+
repository: null
126+
tag: null
127+
imagePullPolicy: null
128+
imagePullSecrets: null
129+
121130
enabled: false
122131
replicacount: 1
123132
sleepIntervalMs: null

0 commit comments

Comments
 (0)