|
|
#!/bin/bash
|
|
|
export PATH=/root/local/bin:$PATH
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q partner
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q mmmgodevp
|
|
|
if [ "$?" == "1" ];then
|
|
|
kubectl create -f /tmp/prd/partner/partner.yaml --record
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q partner
|
|
|
kubectl create -f /tmp/prd/godevp/godevp.yaml --record
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q mmmgodevp
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "partner service install success!"
|
|
|
echo "godevp service install success!"
|
|
|
else
|
|
|
echo "partner service install fail!"
|
|
|
echo "godevp service install fail!"
|
|
|
fi
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q partner
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q mmmgodevp
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "partner deployment install success!"
|
|
|
echo "godevp deployment install success!"
|
|
|
else
|
|
|
echo "partner deployment install fail!"
|
|
|
echo "godevp deployment install fail!"
|
|
|
fi
|
|
|
else
|
|
|
kubectl delete -f /tmp/prd/partner/partner.yaml
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q partner
|
|
|
kubectl delete -f /tmp/prd/godevp/godevp.yaml
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q mmmgodevp
|
|
|
while [ "$?" == "0" ]
|
|
|
do
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q partner
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q mmmgodevp
|
|
|
done
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q partner
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q mmmgodevp
|
|
|
while [ "$?" == "0" ]
|
|
|
do
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q partner
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q mmmgodevp
|
|
|
done
|
|
|
kubectl create -f /tmp/prd/partner/partner.yaml --record
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q partner
|
|
|
kubectl create -f /tmp/prd/godevp/godevp.yaml --record
|
|
|
kubectl -n mmm-suplus-prd get svc | grep -q mmmgodevp
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "partner service update success!"
|
|
|
echo "godevp service update success!"
|
|
|
else
|
|
|
echo "partner service update fail!"
|
|
|
echo "godevp service update fail!"
|
|
|
fi
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q partner
|
|
|
kubectl -n mmm-suplus-prd get pods | grep -q mmmgodevp
|
|
|
if [ "$?" == "0" ];then
|
|
|
echo "partner deployment update success!"
|
|
|
echo "godevp deployment update success!"
|
|
|
else
|
|
|
echo "partner deployment update fail!"
|
|
|
echo "godevp deployment update fail!"
|
|
|
fi
|
|
|
fi |
|
|
\ No newline at end of file |
...
|
...
|
|