From 6af4537802d05a7dfb9f4d0e97a668b8d1997fef Mon Sep 17 00:00:00 2001 From: sepauli Date: Tue, 18 Jun 2024 18:27:05 +0200 Subject: [PATCH] fix container for ipv6 Signed-off-by: sepauli --- tinkerbell/stack/templates/nginx.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tinkerbell/stack/templates/nginx.yaml b/tinkerbell/stack/templates/nginx.yaml index cb25f957..e9b2316c 100644 --- a/tinkerbell/stack/templates/nginx.yaml +++ b/tinkerbell/stack/templates/nginx.yaml @@ -48,8 +48,9 @@ spec: command: ["/bin/bash", "-xeuc"] args: - | - POD_NAMESERVER=$(awk '/nameserver/ {print $2}' /etc/resolv.conf) \ - envsubst '$POD_NAMESERVER' \ + export POD_NAMESERVER=$(awk '/nameserver/ {print $2}' /etc/resolv.conf); + [[ $POD_NAMESERVER == *.* ]] || POD_NAMESERVER="[$POD_NAMESERVER]"; + envsubst '$POD_NAMESERVER' \ /etc/nginx/nginx.conf exec nginx -g 'daemon off;'