From 9095c303b1807088c8a37ace18b5cf9e34466ae3 Mon Sep 17 00:00:00 2001 From: cialloo Date: Thu, 2 Oct 2025 14:39:37 +0800 Subject: [PATCH] Use envsubst to substitute environment variables in namespace.yaml before applying with kubectl --- script/cd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/cd.sh b/script/cd.sh index bda8e9f..ec0fd63 100644 --- a/script/cd.sh +++ b/script/cd.sh @@ -129,7 +129,7 @@ deploy_application() { # Create namespace if it doesn't exist echo "Creating namespace..." - kubectl apply -f script/k8s/namespace.yaml + envsubst < script/k8s/namespace.yaml | kubectl apply -f - echo "" # Create registry secret for pulling images