From 50bcbfcbf346e9c45499b2899eb31b62d7f55fa0 Mon Sep 17 00:00:00 2001 From: Nikhil Malik Date: Tue, 5 Mar 2024 14:25:27 +0900 Subject: [PATCH] Upgraded K8s cicd to k8s v1.29.2 --- cicd/k8s-calico-ipvs/node_scripts/common.sh | 16 ++++++------ cicd/k8s-calico-ipvs/yaml/kubeadm-config.yaml | 2 +- cicd/k8s-calico-ipvs/yaml/settings.yaml | 3 ++- cicd/k8s-calico-ipvs2-ha-ka-sync/config.sh | 25 +++++++++++++++++++ .../host_validation.sh | 2 +- .../node_scripts/common.sh | 16 ++++++------ .../node_scripts/loxilb1.sh | 2 +- .../node_scripts/loxilb2.sh | 2 +- .../yaml/kubeadm-config.yaml | 2 +- .../yaml/settings.yaml | 3 ++- cicd/k8s-calico-ipvs2/config.sh | 25 +++++++++++++++++++ cicd/k8s-calico-ipvs2/node_scripts/common.sh | 16 ++++++------ cicd/k8s-calico-ipvs2/validation.sh | 2 +- .../k8s-calico-ipvs2/yaml/kubeadm-config.yaml | 2 +- cicd/k8s-calico-ipvs2/yaml/settings.yaml | 3 ++- .../node_scripts/common.sh | 16 ++++++------ .../yaml/kubeadm-config.yaml | 2 +- cicd/k8s-calico-ipvs3-ha/yaml/settings.yaml | 3 ++- cicd/k8s-calico-ipvs3/node_scripts/common.sh | 16 ++++++------ .../k8s-calico-ipvs3/yaml/kubeadm-config.yaml | 2 +- cicd/k8s-calico-ipvs3/yaml/settings.yaml | 3 ++- cicd/k8s-calico/config.sh | 1 + cicd/k8s-calico/node_scripts/common.sh | 4 +-- 23 files changed, 112 insertions(+), 56 deletions(-) diff --git a/cicd/k8s-calico-ipvs/node_scripts/common.sh b/cicd/k8s-calico-ipvs/node_scripts/common.sh index b8634194f..654da6b7c 100644 --- a/cicd/k8s-calico-ipvs/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs/node_scripts/common.sh @@ -26,7 +26,7 @@ sudo apt-get update -y # Install CRI-O Runtime VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" - +CRIO_VERSION=1.27 # Create the .conf file to load the modules at bootup cat < /dev/null vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/sctp_fullnat.yml' 2> /dev/null #vagrant ssh master -c 'kubectl apply -f https://raw.githubusercontent.com/loxilb-io/kube-loxilb/main/manifest/mesh/loxilb-mesh.yml' 2> /dev/null +for((i=1; i<=60; i++)) +do + fin=1 + pods=$(vagrant ssh master -c 'kubectl get pods -A' 2> /dev/null | grep -v "NAMESPACE") + + while IFS= read -a pods; do + read -a pod <<< "$pods" + if [[ ${pod[3]} != *"Running"* ]]; then + echo "${pod[1]} is not UP yet" + fin=0 + fi + done <<< "$pods" + if [ $fin == 1 ]; + then + echo "Cluster is ready" + break; + fi + echo "Will try after 10s" + sleep 10 +done + +if [[ $fin == 0 ]]; then + echo "Cluster is not ready" + exit 1 +fi diff --git a/cicd/k8s-calico-ipvs2-ha-ka-sync/host_validation.sh b/cicd/k8s-calico-ipvs2-ha-ka-sync/host_validation.sh index 371ee3827..3eeb9aadb 100755 --- a/cicd/k8s-calico-ipvs2-ha-ka-sync/host_validation.sh +++ b/cicd/k8s-calico-ipvs2-ha-ka-sync/host_validation.sh @@ -17,6 +17,6 @@ echo "Testing Service" echo "*********************************************" # iperf client accessing fullnat service -stdbuf -oL nohup iperf -c 192.168.80.5 -p 56002 -t 60 -i 1 -b 100M &> iperff.out & +stdbuf -oL nohup iperf -c 192.168.80.5 -p 56002 -t 100 -i 1 -b 100M &> iperff.out & echo "iperf client started" echo "phase-1 done" diff --git a/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh b/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh index 63b64c101..f0fe98697 100644 --- a/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs2-ha-ka-sync/node_scripts/common.sh @@ -29,7 +29,7 @@ sudo apt-get update -y # Install CRI-O Runtime VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" - +CRIO_VERSION=1.27 # Create the .conf file to load the modules at bootup cat < /dev/null vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/udp_fullnat.yml' 2> /dev/null +for((i=1; i<=60; i++)) +do + fin=1 + pods=$(vagrant ssh master -c 'kubectl get pods -A' 2> /dev/null | grep -v "NAMESPACE") + + while IFS= read -a pods; do + read -a pod <<< "$pods" + if [[ ${pod[3]} != *"Running"* ]]; then + echo "${pod[1]} is not UP yet" + fin=0 + fi + done <<< "$pods" + if [ $fin == 1 ]; + then + echo "Cluster is ready" + break; + fi + echo "Will try after 10s" + sleep 10 +done + +if [[ $fin == 0 ]]; then + echo "Cluster is not ready" + exit 1 +fi diff --git a/cicd/k8s-calico-ipvs2/node_scripts/common.sh b/cicd/k8s-calico-ipvs2/node_scripts/common.sh index b8634194f..654da6b7c 100644 --- a/cicd/k8s-calico-ipvs2/node_scripts/common.sh +++ b/cicd/k8s-calico-ipvs2/node_scripts/common.sh @@ -26,7 +26,7 @@ sudo apt-get update -y # Install CRI-O Runtime VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" - +CRIO_VERSION=1.27 # Create the .conf file to load the modules at bootup cat <