feat(helm): ui.listenIPv6 renders NGINX_LISTEN_IPV6 on the ui container

This commit is contained in:
namnt2307 2026-08-10 13:36:37 +07:00
parent 80ab87d4bf
commit 8e2afc0865
3 changed files with 42 additions and 0 deletions

View file

@ -53,6 +53,10 @@ spec:
- name: LITELLM_BACKEND_URL
value: {{ .Values.ui.backendUrl | quote }}
{{- end }}
{{- with .Values.ui.listenIPv6 }}
- name: NGINX_LISTEN_IPV6
value: {{ . | quote }}
{{- end }}
{{- with .Values.ui.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}

View file

@ -0,0 +1,33 @@
suite: test ui IPv6 listener toggle
templates:
- ui/deployment.yaml
values:
- ./values/required.yaml
tests:
- it: renders no NGINX_LISTEN_IPV6 env by default
asserts:
- notContains:
path: spec.template.spec.containers[0].env
any: true
content:
name: NGINX_LISTEN_IPV6
- it: renders NGINX_LISTEN_IPV6=auto when listenIPv6 is auto
set:
ui.listenIPv6: auto
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: NGINX_LISTEN_IPV6
value: auto
- it: renders NGINX_LISTEN_IPV6=true when listenIPv6 forces the listener on
set:
ui.listenIPv6: "true"
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: NGINX_LISTEN_IPV6
value: "true"

View file

@ -347,6 +347,11 @@ backend:
ui:
enabled: true
logLevel: INFO
# IPv6 listener for the ui nginx, rendered as NGINX_LISTEN_IPV6 on the
# container: "auto" listens on [::]:3000 when the pod has an IPv6 stack
# (dual-stack clusters), "true" forces it, "false"/empty keeps today's
# IPv4-only bind. Leave empty unless kubelet probes reach the pod over IPv6.
listenIPv6: ""
extraEnv: []
envConfigMaps: []
envSecrets: []