diff --git a/cicd/k3s-flannel-multus/bastion.sh b/cicd/k3s-flannel-multus/bastion.sh index 7b1c4d667..657b44515 100644 --- a/cicd/k3s-flannel-multus/bastion.sh +++ b/cicd/k3s-flannel-multus/bastion.sh @@ -1,2 +1,2 @@ apt-get update -apt-get install -y software-properties-common curl wget +apt-get install -y software-properties-common curl wget lksctp-tools diff --git a/cicd/k3s-flannel-multus/host_validation.sh b/cicd/k3s-flannel-multus/host_validation.sh index 37b171d98..51f3b7a58 100755 --- a/cicd/k3s-flannel-multus/host_validation.sh +++ b/cicd/k3s-flannel-multus/host_validation.sh @@ -2,6 +2,7 @@ extIP=$(cat /vagrant/extIP) tcp_port=55002 +sctp_port=55002 code=0 echo Service IP: $extIP @@ -17,4 +18,26 @@ else code=1 fi done + +for((i=0;i<20;i++)) +do +stdbuf -oL sctp_darn -H 0.0.0.0 -h $extIP -p $sctp_port -s < /vagrant/input > output +#sleep 1 +exp="New connection, peer addresses +4.0.5.2:55002 +4.0.3.1:55002 +4.0.4.1:55002" + +res=`cat output | grep -A 3 "New connection, peer addresses"` +sudo rm -rf output +if [[ "$res" == "$exp" ]]; then + #echo $res + echo "K3s-multus SCTP Multihoming service [OK]" +else + echo "K3s-multus SCTP Multihoming service [NOK]" + echo "Expected : $exp" + echo "Received : $res" + exit 1 +fi +done exit $code diff --git a/cicd/k3s-flannel-multus/kube-loxilb.yml b/cicd/k3s-flannel-multus/kube-loxilb.yml index d01240695..48f1da654 100644 --- a/cicd/k3s-flannel-multus/kube-loxilb.yml +++ b/cicd/k3s-flannel-multus/kube-loxilb.yml @@ -112,6 +112,7 @@ spec: args: - --loxiURL=http://4.0.6.149:11111 - --externalCIDR=4.0.5.2/32 + - --externalSecondaryCIDRs=4.0.4.1/24,4.0.3.1/24 #- --monitor #- --setBGP #- --setLBMode=1 diff --git a/cicd/k3s-flannel-multus/master.sh b/cicd/k3s-flannel-multus/master.sh index c3db1117d..b3ee6ceba 100644 --- a/cicd/k3s-flannel-multus/master.sh +++ b/cicd/k3s-flannel-multus/master.sh @@ -26,4 +26,6 @@ sudo ifconfig eth2 promisc sudo kubectl apply -f /vagrant/multus/multus-pod.yml sudo kubectl apply -f /vagrant/multus/multus-service.yml +sudo kubectl apply -f /vagrant/multus/multus-sctp-pod.yml +sudo kubectl apply -f /vagrant/multus/multus-sctp-service.yml /vagrant/wait_ready.sh diff --git a/cicd/k3s-flannel-multus/multus/macvlan.yml b/cicd/k3s-flannel-multus/multus/macvlan.yml index 9d455338b..97b50df0c 100644 --- a/cicd/k3s-flannel-multus/multus/macvlan.yml +++ b/cicd/k3s-flannel-multus/multus/macvlan.yml @@ -17,7 +17,7 @@ spec: "rangeEnd": "4.0.6.100", "routes": [ { - "dst": "4.0.5.0/24" + "dst": "0.0.0.0/0" } ], "gateway": "4.0.6.149"