fix: use scratch variable for port binding in static template

This commit is contained in:
ZhenYi 2026-04-15 10:42:53 +08:00
parent 9776c923c0
commit 9112cb2dff

View File

@ -2,6 +2,7 @@
{{- $fullName := include "gitdata.fullname" . -}}
{{- $ns := include "gitdata.namespace" . -}}
{{- $svc := .Values.static -}}
{{- $port := printf "0.0.0.0:%d" $svc.service.port | quote -}}
---
apiVersion: apps/v1
@ -37,7 +38,7 @@ spec:
- name: STATIC_ROOT
value: /data
- name: STATIC_BIND
value: {{ printf "0.0.0.0:%v" $svc.service.port }}
value: {{ $port }}
- name: STATIC_CORS
value: {{ $svc.cors | default "true" | quote }}
{{- if $svc.logLevel }}