Skip to content

Commit

Permalink
Merge pull request #403 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
PR - cicd:fixed for latest k0s
  • Loading branch information
UltraInstinct14 authored Sep 28, 2023
2 parents a117346 + 7bb7b14 commit abc1669
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
9 changes: 9 additions & 0 deletions cicd/k0s-weave/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ else
sudo k0s kubectl apply -f https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s.yaml
sleep 30
if [ ! -f /opt/cni/bin/loopback ]; then
git clone https://github.com/containernetworking/plugins.git
cd plugins
./build_linux.sh
sudo cp -f bin/* /opt/cni/bin/
cd -
fi
# Check kubectl works
sudo k0s kubectl get pods -A
Expand Down
1 change: 0 additions & 1 deletion cicd/k0s-weave/k0s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
port: 6443
sans:
- 192.169.20.59
tunneledNetworkingMode: false
controllerManager: {}
extensions:
helm:
Expand Down
2 changes: 2 additions & 0 deletions cicd/k0s-weave/rmconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ delete_docker_host ep3
sudo ip link del esysllb1
sudo ip link del esysllb2

./rmweave.sh

# If k3s setup exists, remove it
if [[ -f "/usr/local/bin/k0s" ]]; then
sudo k0s stop
Expand Down
3 changes: 3 additions & 0 deletions cicd/tcplb/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ config_docker_host --host1 llb1 --host2 l3ep1 --ptype phy --addr 31.31.31.254/24
config_docker_host --host1 llb1 --host2 l3ep2 --ptype phy --addr 32.32.32.254/24
config_docker_host --host1 llb1 --host2 l3ep3 --ptype phy --addr 33.33.33.254/24

$dexec llb1 ip addr add 10.10.10.3/32 dev lo

sleep 5
create_lb_rule llb1 20.20.20.1 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
create_lb_rule llb1 10.10.10.254 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
create_lb_rule llb1 10.10.10.3 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
4 changes: 2 additions & 2 deletions cicd/tcplb/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $hexec l3ep3 node ../common/tcp_server.js server3 &

sleep 5
code=0
servIP=( "10.10.10.254" "20.20.20.1" )
servIP=( "10.10.10.254" "20.20.20.1" "10.10.10.3" )
servArr=( "server1" "server2" "server3" )
ep=( "31.31.31.1" "32.32.32.1" "33.33.33.1" )
j=0
Expand All @@ -34,7 +34,7 @@ do
sleep 1
done

for k in {0..1}
for k in {0..2}
do
echo "Testing Service IP: ${servIP[k]}"
lcode=0
Expand Down
2 changes: 1 addition & 1 deletion loxilb-ebpf

0 comments on commit abc1669

Please sign in to comment.