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