2024-04-08 11:43:51 +08:00
|
|
|
if [ -z "$deployment" ]; then
|
|
|
|
echo "deployment is not set"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$namespace" ]; then
|
|
|
|
echo "namespace is not set"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -z "$image_tag" ]; then
|
|
|
|
echo "image_tag is not set"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ "$deployment" = "dev" ] || [ "$deployment" = "test" ] ; then
|
2024-04-12 18:51:43 +08:00
|
|
|
export ingress_host=finance-dbt-doc.${deployment}.mujiannan.com
|
2024-04-08 11:43:51 +08:00
|
|
|
else
|
2024-04-12 18:51:43 +08:00
|
|
|
export ingress_host=finance-dbt-doc.mujiannan.com
|
2024-04-08 11:43:51 +08:00
|
|
|
fi
|
2024-04-12 18:51:43 +08:00
|
|
|
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 -
|