From fed01c723e952889df8b2c7078e07a0dbb48ccc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E6=A5=A0?= Date: Fri, 12 Apr 2024 18:51:43 +0800 Subject: [PATCH] use sed instead of envsubst --- Deploy.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Deploy.sh b/Deploy.sh index 0759445..7caf6cb 100644 --- a/Deploy.sh +++ b/Deploy.sh @@ -11,8 +11,12 @@ if [ -z "$image_tag" ]; then exit 1 fi if [ "$deployment" = "dev" ] || [ "$deployment" = "test" ] ; then - ingress_host=finance-dbt-doc.${deployment}.mujiannan.com + export ingress_host=finance-dbt-doc.${deployment}.mujiannan.com else - ingress_host=finance-dbt-doc.mujiannan.com + export ingress_host=finance-dbt-doc.mujiannan.com fi -envsubst < Deploy.yml | kubectl apply -f - \ No newline at end of file +sed -e "s/\${namespace}/${namespace}/g" Deploy.yml \ + -e "s/\${deployment}/${deployment}/g" \ + -e "s/\${image_tag}/${image_tag}/g" \ + -e "s/\${ingress_host}/${ingress_host}/g" \ + | kubectl apply -f - \ No newline at end of file