From a445bb96d03435d3d3fe2d706afb732212e27254 Mon Sep 17 00:00:00 2001 From: stubenhuang Date: Fri, 9 Aug 2024 17:31:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=93=9D=E9=B2=B87.2=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E6=94=B9=E5=8A=A8=20#10558?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helm-charts/core/ci/build_chart.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-charts/core/ci/build_chart.py b/helm-charts/core/ci/build_chart.py index 1bfdc77e328..ddb24e417cf 100755 --- a/helm-charts/core/ci/build_chart.py +++ b/helm-charts/core/ci/build_chart.py @@ -78,7 +78,7 @@ else: camelize_set.add(camelize_key) if line.replace(key, "").strip().endswith(":"): - line = line.replace(key, '{{ .Values.config.'+camelize_key+' | quote }}') + line = line.replace(key, '{{ .Values.config.'+camelize_key+' | default "" | quote }}') else: line = line.replace(key, '{{ .Values.config.'+camelize_key+' }}') new_file.write(line) @@ -106,7 +106,7 @@ gateway_config_file.write(env+": "+include_dict[camelize_key]+"\n") else: camelize_set.add(camelize_key) - gateway_config_file.write(env+": "+'{{ .Values.config.'+camelize_key+" | quote }}\n") + gateway_config_file.write(env+": "+'{{ .Values.config.'+camelize_key+' | default "" | quote }}\n') # 前端文件 for root, dirs, files in os.walk(frontend_path): for frontend_file in files: @@ -125,7 +125,7 @@ gateway_config_file.write(env+": "+include_dict[camelize_key]+"\n") else: camelize_set.add(camelize_key) - gateway_config_file.write(env+": "+'{{ .Values.config.'+camelize_key+" | quote }}\n") + gateway_config_file.write(env+": "+'{{ .Values.config.'+camelize_key+' | default "" | quote }}\n') gateway_config_file.write('NAMESPACE: {{ .Release.Namespace }}\n') gateway_config_file.write('CHART_NAME: {{ include "bkci.names.fullname" . }}\n') gateway_config_file.write('{{ end }}')