From 1d27f0dbf6481665506f3acf622753c3eef1e258 Mon Sep 17 00:00:00 2001 From: Samiat Date: Fri, 10 Jul 2026 08:46:47 +0100 Subject: [PATCH] Fix-Helm-UTF8-env --- helm/defectdojo/Chart.yaml | 2 +- helm/defectdojo/templates/configmap.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/helm/defectdojo/Chart.yaml b/helm/defectdojo/Chart.yaml index e51ceb314ee..2804ed130d3 100644 --- a/helm/defectdojo/Chart.yaml +++ b/helm/defectdojo/Chart.yaml @@ -34,4 +34,4 @@ dependencies: # description: Critical bug annotations: artifacthub.io/prerelease: "true" - artifacthub.io/changes: "- kind: changed\n description: chore(deps)_ update valkey _ tag from 0.22.1 to v0.23.0 (_/defect_/chart.yaml)\n" + artifacthub.io/changes: "- kind: changed\n description: chore(deps)_ update valkey _ tag from 0.22.1 to v0.23.0 (_/defect_/chart.yaml)\n- kind: fixed\n description: Set UTF-8 locale defaults for Helm chart containers\n" diff --git a/helm/defectdojo/templates/configmap.yaml b/helm/defectdojo/templates/configmap.yaml index 8f1d510a1a4..4ef9905b6d9 100644 --- a/helm/defectdojo/templates/configmap.yaml +++ b/helm/defectdojo/templates/configmap.yaml @@ -56,9 +56,12 @@ data: DD_DJANGO_METRICS_ENABLED: '{{ .Values.monitoring.enabled }}' NGINX_METRICS_ENABLED: '{{ .Values.monitoring.enabled }}' METRICS_HTTP_AUTH_USER: {{ .Values.monitoring.user | default "monitoring" }} + PYTHONUTF8: {{ ternary (index .Values.extraConfigs "PYTHONUTF8") "1" (hasKey .Values.extraConfigs "PYTHONUTF8") | quote }} + LANG: {{ ternary (index .Values.extraConfigs "LANG") "C.UTF-8" (hasKey .Values.extraConfigs "LANG") | quote }} + LC_ALL: {{ ternary (index .Values.extraConfigs "LC_ALL") "C.UTF-8" (hasKey .Values.extraConfigs "LC_ALL") | quote }} {{- if .Values.django.uwsgi.certificates.enabled }} REQUESTS_CA_BUNDLE: {{ .Values.django.uwsgi.certificates.certMountPath }}{{ .Values.django.uwsgi.certificates.certFileName }} {{- end }} -{{- with .Values.extraConfigs }} +{{- with omit .Values.extraConfigs "PYTHONUTF8" "LANG" "LC_ALL" }} {{- toYaml . | nindent 2 }} {{- end }}