|
|
#!/bin/bash
|
|
|
export PATH=/root/local/bin:$PATH
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q suplus-front
|
|
|
if [ "$?" == "1" ];then
|
|
|
kubectl create -f /tmp/suplus-front.yaml --record
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q suplus-front
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "suplus-front service install success!"
|
|
|
else
|
|
|
echo "suplus-front service install fail!"
|
|
|
fi
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q suplus-front
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "suplus-front deployment install success!"
|
|
|
else
|
...
|
...
|
@@ -17,24 +17,24 @@ if [ "$?" == "1" ];then |
|
|
fi
|
|
|
else
|
|
|
kubectl delete -f /tmp/suplus-front.yaml
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q suplus-front
|
|
|
while [ "$?" == "0" ]
|
|
|
do
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q suplus-front
|
|
|
done
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q suplus-front
|
|
|
while [ "$?" == "0" ]
|
|
|
do
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q suplus-front
|
|
|
done
|
|
|
kubectl create -f /tmp/suplus-front.yaml --record
|
|
|
kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q suplus-front
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "suplus-front service update success!"
|
|
|
else
|
|
|
echo "suplus-front service update fail!"
|
|
|
fi
|
|
|
kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q suplus-front
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "suplus-front deployment update success!"
|
|
|
else
|
...
|
...
|
|