作者 Administrator

增加新文件

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