🔧(helm) allow specific env var for the backend and celery deploy

We want the possibility to configure specific environment variables on
backend and celery deployment. Most of them are common but in the case
of the newly added settings DB_PSYCOPG_POOL_MIN_SIZE we want to
configure ot only on the backend deployment, not on the celery or with a
different value.
This commit is contained in:
Manuel Raynaud
2026-03-12 09:52:29 +01:00
parent ba93bcf20b
commit bcb50a5fce
6 changed files with 48 additions and 7 deletions
+1
View File
@@ -27,6 +27,7 @@ and this project adheres to
- 🐛(backend) manage race condition when creating sandbox document #1971
- 🐛(frontend) fix flickering left panel #1989
- ♿️(frontend) improve doc tree keyboard navigation #1981
- 🔧(helm) allow specific env var for the backend and celery deploy
## [v4.7.0] - 2026-03-09
@@ -74,6 +74,12 @@ backend:
Y_PROVIDER_API_BASE_URL: http://impress-docs-y-provider:443/api/
Y_PROVIDER_API_KEY: my-secret
CACHES_KEY_PREFIX: "{{ now | unixEpoch }}"
django:
envVars:
WEB_CONCURRENCY: 1
DB_PSYCOPG_POOL_MIN_SIZE: 10
migrate:
command:
- "/bin/sh"
+20
View File
@@ -90,6 +90,26 @@ impress env vars
{{- include "impress.env.transformDict" $workerScope.envVars -}}
{{- end }}
{{/*
impress backend django env vars - combines common backend.envVars with backend.django.envVars
*/}}
{{- define "impress.backend.django.env" -}}
{{- $topLevelScope := index . 0 -}}
{{- $workerScope := index . 1 -}}
{{- include "impress.env.transformDict" $workerScope.envVars -}}
{{- include "impress.env.transformDict" (($workerScope.django | default dict).envVars | default dict) -}}
{{- end }}
{{/*
impress celery env vars - combines common backend.envVars with backend.celery.envVars
*/}}
{{- define "impress.backend.celery.env" -}}
{{- $topLevelScope := index . 0 -}}
{{- $workerScope := index . 1 -}}
{{- include "impress.env.transformDict" $workerScope.envVars -}}
{{- include "impress.env.transformDict" ($workerScope.celery.envVars | default dict) -}}
{{- end }}
{{/*
Common labels
@@ -1,4 +1,4 @@
{{- $envVars := include "impress.common.env" (list . .Values.backend) -}}
{{- $envVars := include "impress.backend.django.env" (list . .Values.backend) -}}
{{- $fullName := include "impress.backend.fullname" . -}}
{{- $component := "backend" -}}
apiVersion: apps/v1
@@ -53,9 +53,10 @@ spec:
env:
{{- $envVars | indent 12 }}
{{- end }}
{{- if .Values.backend.envFrom }}
{{- $envFrom := concat (.Values.backend.envFrom | default list) ((.Values.backend.django | default dict).envFrom | default list) }}
{{- if $envFrom }}
envFrom:
{{- toYaml .Values.backend.envFrom | nindent 12 }}
{{- toYaml $envFrom | nindent 12 }}
{{- end }}
{{- with .Values.backend.securityContext }}
securityContext:
@@ -1,4 +1,4 @@
{{- $envVars := include "impress.common.env" (list . .Values.backend) -}}
{{- $envVars := include "impress.backend.celery.env" (list . .Values.backend) -}}
{{- $fullName := include "impress.celery.worker.fullname" . -}}
{{- $component := "celery-worker" -}}
apiVersion: apps/v1
@@ -53,9 +53,10 @@ spec:
env:
{{- $envVars | indent 12 }}
{{- end }}
{{- if .Values.backend.envFrom }}
{{- $envFrom := concat (.Values.backend.envFrom | default list) (.Values.backend.celery.envFrom | default list) }}
{{- if $envFrom }}
envFrom:
{{- toYaml .Values.backend.envFrom | nindent 12 }}
{{- toYaml $envFrom | nindent 12 }}
{{- end }}
{{- with .Values.backend.securityContext }}
securityContext:
+13 -1
View File
@@ -243,7 +243,7 @@ backend:
envVars:
<<: *commonEnvVars
## @skip backend.envFrom List of environment variables taken from Secrets or configMaps
## @skip backend.envFrom List of environment variables taken from Secrets or configMaps, common to backend and celery worker
envFrom: []
# envFrom:
# - secret:
@@ -251,6 +251,13 @@ backend:
# - configMapRef:
# name: my-environment-variables
## @extra backend.django.envVars Backend web deployment specific environment variables (not shared with celery worker)
## @skip backend.django.envVars
## @skip backend.django.envFrom List of environment variables taken from Secrets or configMaps, specific to the backend web deployment
django:
envVars: {}
envFrom: []
## @param backend.podAnnotations Annotations to add to the backend Pod
podAnnotations: {}
@@ -396,6 +403,9 @@ backend:
## @param backend.celery.probes.readiness.exec.command Override the celery container readiness probe command
## @param backend.celery.probes.readiness.initialDelaySeconds Initial delay for the celery container readiness probe
## @param backend.celery.probes.readiness.timeoutSeconds Timeout for the celery container readiness probe
## @extra backend.celery.envVars Celery worker specific environment variables (not shared with the backend web deployment)
## @skip backend.celery.envVars
## @skip backend.celery.envFrom List of environment variables taken from Secrets or configMaps, specific to celery worker
celery:
replicas: 1
command: []
@@ -410,6 +420,8 @@ backend:
"-n",
"impress@%h",
]
envVars: {}
envFrom: []
resources: {}
probes:
liveness: