From e9ecbaedb4f0ed9e5e25c9db85bed2856ccf6f1f Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Mon, 3 Apr 2023 11:39:18 +0100 Subject: [PATCH 1/3] Bump version 0.17.0 --- charts/flagsmith/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/flagsmith/Chart.yaml b/charts/flagsmith/Chart.yaml index 000ca84..2d7e496 100644 --- a/charts/flagsmith/Chart.yaml +++ b/charts/flagsmith/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: flagsmith description: Flagsmith type: application -version: 0.16.2 +version: 0.17.0 appVersion: 2.42.1 dependencies: - name: postgresql From 924283b7fdce2270a6e13d564159adf46f860216 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Tue, 4 Apr 2023 14:59:53 +0100 Subject: [PATCH 2/3] add queuepopsize argument to task processor (#129) --- charts/flagsmith/templates/deployment-task-processor.yaml | 4 ++++ charts/flagsmith/values.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/charts/flagsmith/templates/deployment-task-processor.yaml b/charts/flagsmith/templates/deployment-task-processor.yaml index 0ee3058..21f4563 100644 --- a/charts/flagsmith/templates/deployment-task-processor.yaml +++ b/charts/flagsmith/templates/deployment-task-processor.yaml @@ -74,6 +74,10 @@ spec: {{- with .Values.taskProcessor.gracePeriodMs }} - --graceperiodms - {{ . | quote }} +{{- end }} +{{- with .Values.taskProcessor.queuePopSize }} + - --queuepopsize + - {{ . | quote }} {{- end }} env: {{ include (print $.Template.BasePath "/_api_environment.yaml") . | nindent 8 }} livenessProbe: diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index 817858e..57d664a 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -123,6 +123,7 @@ taskProcessor: sleepIntervalMs: null numThreads: null gracePeriodMs: null + queuePopSize: null livenessProbe: failureThreshold: 5 From d6b83adaac74a056161d5471746c3a9c2058f9aa Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Tue, 4 Apr 2023 15:14:15 +0100 Subject: [PATCH 3/3] 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 --- .../flagsmith/templates/deployment-task-processor.yaml | 9 ++++++--- charts/flagsmith/values.yaml | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/charts/flagsmith/templates/deployment-task-processor.yaml b/charts/flagsmith/templates/deployment-task-processor.yaml index 21f4563..306e3d6 100644 --- a/charts/flagsmith/templates/deployment-task-processor.yaml +++ b/charts/flagsmith/templates/deployment-task-processor.yaml @@ -44,7 +44,10 @@ spec: {{- if .Values.taskProcessor.schedulerName }} schedulerName: "{{ .Values.taskProcessor.schedulerName }}" {{- end }} - {{- if .Values.api.image.imagePullSecrets }} + {{- if .Values.taskProcessor.image.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.taskProcessor.image.imagePullSecrets | indent 8 }} + {{- else if .Values.api.image.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.api.image.imagePullSecrets | indent 8 }} {{- end }} @@ -56,8 +59,8 @@ spec: {{- toYaml $securityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-task-processor - image: {{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default (printf "%s" .Chart.AppVersion) }} - imagePullPolicy: {{ .Values.api.image.imagePullPolicy }} + 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 diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index 57d664a..1cd9b75 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -118,6 +118,15 @@ frontend: # See https://docs.flagsmith.com/deployment/task-processor taskProcessor: + image: + # all values here default to those in .Values.api.image if not configured + # this is to simplify the logic for those using flagsmith-api image + # and to maintain backwards compatibility. + repository: null + tag: null + imagePullPolicy: null + imagePullSecrets: null + enabled: false replicacount: 1 sleepIntervalMs: null