Skip to content

K3s-Base-Sanity-CI #532

K3s-Base-Sanity-CI

K3s-Base-Sanity-CI #532

name: K3s-Base-Sanity-CI
on:
schedule:
# Runs "At 21:00 UTC every day-of-week"
- cron: '0 21 * * *'
workflow_dispatch:
inputs:
testName:
description: 'Test Run-Name'
required: true
default: 'k3s-base'
workflow_run:
workflows: ["Docker-Multi-Arch"]
types:
- completed
jobs:
build:
name: k3s-base-sanity
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- run: sudo apt-get update
- run: sudo apt-get -y install bridge-utils net-tools iperf curl lksctp-tools wget clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool
- run: docker pull ghcr.io/loxilb-io/loxilb:latest
- run: docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --name loxilb ghcr.io/loxilb-io/loxilb:latest
- run: pwd && ls && sudo mkdir /opt/loxilb/ && sudo -E env "PATH=$PATH" make docker-cp
- run: docker exec -dit loxilb mkllb_bpffs
- run: id=`docker ps -f name=loxilb | cut -d " " -f 1 | grep -iv "CONTAINER"` && docker commit $id ghcr.io/loxilb-io/loxilb:latest
- run: docker stop loxilb && docker rm loxilb
- run: |
echo "KUBECONFIG=--kubeconfig=/etc/rancher/k3s/k3s.yaml" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
submodules: recursive
- run: curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb" K3S_KUBECONFIG_MODE="644" sh -
- run: |
sleep 80
kubectl "${{ env.KUBECONFIG }}" get nodes
kubectl "${{ env.KUBECONFIG }}" get pods -A
sleep 20
- run: |
cd cicd/k3s-base-sanity/
./config.sh "${{ env.KUBECONFIG }}"
./validation.sh "${{ env.KUBECONFIG }}"
./rmconfig.sh "${{ env.KUBECONFIG }}"
cd -