Upgrade Calico CNI to v3.23
[iec.git] / src / foundation / scripts / nginx.sh
index 40a9377..96ee728 100755 (executable)
@@ -36,6 +36,11 @@ spec:
         - containerPort: 80
 EOF
 
+if [ -f "$HOME/.bashrc" ]; then
+  # shellcheck source=/dev/null
+  source "$HOME/.bashrc"
+fi
+
 if ! kubectl get services | grep -q nginx; then
   kubectl create -f "${NGINX_APP}"
 fi
@@ -56,9 +61,10 @@ done
 [ $attempts -gt 0 ] || exit 1
 
 svcip=$(kubectl get services nginx  -o json | grep clusterIP | cut -f4 -d'"')
-sleep 10
-wget "http://$svcip"
+sleep 20
+wget -O /dev/null "http://$svcip"
 kubectl delete -f "${NGINX_APP}"
+rm -f "${NGINX_APP}"
 kubectl get rc
 kubectl get pods
 kubectl get services