This is an automated email from the ASF dual-hosted git repository.
LinkinStars pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/answer.git
The following commit(s) were added to refs/heads/dev by this push:
new ab236f2d fix(helm): keep install port aligned with service port
ab236f2d is described below
commit ab236f2d6a272c5dc6de313b83086e6392e089e3
Author: Herrtian <[email protected]>
AuthorDate: Fri May 1 17:19:43 2026 +0200
fix(helm): keep install port aligned with service port
Signed-off-by: Tian Teng <[email protected]>
---
charts/templates/deployment.yaml | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml
index e71aa836..f1b9d186 100644
--- a/charts/templates/deployment.yaml
+++ b/charts/templates/deployment.yaml
@@ -64,8 +64,23 @@ spec:
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
- {{- if .Values.env }}
+ {{- $envNames := list }}
+ {{- range .Values.env }}
+ {{- $envNames = append $envNames .name }}
+ {{- end }}
env:
+ {{- if not (has "INSTALL_PORT" $envNames) }}
+ - name: INSTALL_PORT
+ value: {{ .Values.service.port | quote }}
+ {{- end }}
+ {{- if not (has "SITE_ADDR" $envNames) }}
+ - name: SITE_ADDR
+ value: {{ printf "0.0.0.0:%v" .Values.service.port | quote }}
+ {{- end }}
+ {{- if not (has "SWAGGER_ADDRESS_PORT" $envNames) }}
+ - name: SWAGGER_ADDRESS_PORT
+ value: {{ printf ":%v" .Values.service.port | quote }}
+ {{- end }}
{{- range .Values.env }}
- name: {{ .name }}
{{- if .value | quote }}
@@ -76,7 +91,6 @@ spec:
{{- toYaml .valueFrom | nindent 16 }}
{{- end }}
{{- end }}
- {{- end }}
volumeMounts:
- name: data
mountPath: "/data"
@@ -102,4 +116,4 @@ spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
- {{- end }}
\ No newline at end of file
+ {{- end }}