正在显示
1 个修改的文件
包含
43 行增加
和
0 行删除
deploy/k8s/test/install.sh
0 → 100644
| 1 | +#!/bin/bash | ||
| 2 | +export PATH=/root/local/bin:$PATH | ||
| 3 | +kubectl -n mmm-suplus-test get pods | grep -q performance-back | ||
| 4 | +if [ "$?" == "1" ];then | ||
| 5 | + kubectl create -f /tmp/test/performance-back/performance-back.yaml --record | ||
| 6 | + kubectl -n mmm-suplus-test get svc | grep -q performance-back | ||
| 7 | + if [ "$?" == "0" ];then | ||
| 8 | + echo "performance-back service install success!" | ||
| 9 | + else | ||
| 10 | + echo "performance-back service install fail!" | ||
| 11 | + fi | ||
| 12 | + kubectl -n mmm-suplus-test get pods | grep -q performance-back | ||
| 13 | + if [ "$?" == "0" ];then | ||
| 14 | + echo "performance-back deployment install success!" | ||
| 15 | + else | ||
| 16 | + echo "performance-back deployment install fail!" | ||
| 17 | + fi | ||
| 18 | +else | ||
| 19 | + kubectl delete -f /tmp/test/performance-back/performance-back.yaml | ||
| 20 | + kubectl -n mmm-suplus-test get svc | grep -q performance-back | ||
| 21 | + while [ "$?" == "0" ] | ||
| 22 | + do | ||
| 23 | + kubectl -n mmm-suplus-test get svc | grep -q performance-back | ||
| 24 | + done | ||
| 25 | + kubectl -n mmm-suplus-test get pods | grep -q performance-back | ||
| 26 | + while [ "$?" == "0" ] | ||
| 27 | + do | ||
| 28 | + kubectl -n mmm-suplus-test get pods | grep -q performance-back | ||
| 29 | + done | ||
| 30 | + kubectl create -f /tmp/test/performance-back/performance-back.yaml --record | ||
| 31 | + kubectl -n mmm-suplus-test get svc | grep -q performance-back | ||
| 32 | + if [ "$?" == "0" ];then | ||
| 33 | + echo "performance-back service update success!" | ||
| 34 | + else | ||
| 35 | + echo "performance-back service update fail!" | ||
| 36 | + fi | ||
| 37 | + kubectl -n mmm-suplus-test get pods | grep -q performance-back | ||
| 38 | + if [ "$?" == "0" ];then | ||
| 39 | + echo "performance-back deployment update success!" | ||
| 40 | + else | ||
| 41 | + echo "performance-back deployment update fail!" | ||
| 42 | + fi | ||
| 43 | +fi |
-
请 注册 或 登录 后发表评论