K3s-Base-Sanity-CI #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --disable-cloud-controller --kubelet-arg cloud-provider=external" K3S_KUBECONFIG_MODE="644" sh - | |
- run: | | |
sleep 10 | |
kubectl "${{ env.KUBECONFIG }}" taint nodes --all node.cloudprovider.kubernetes.io/uninitialized=false:NoSchedule- | |
sleep 60 | |
kubectl "${{ env.KUBECONFIG }}" get nodes | |
kubectl "${{ env.KUBECONFIG }}" get pods -A | |
wget https://github.com/loxilb-io/loxi-ccm/raw/master/manifests/loxi-ccm-k3s.yaml | |
kubectl "${{ env.KUBECONFIG }}" apply -f ./loxi-ccm-k3s.yaml | |
sleep 60 | |
kubectl "${{ env.KUBECONFIG }}" get pods -A | |
- run: | | |
cd cicd/k3s-base-sanity/ | |
./config.sh "${{ env.KUBECONFIG }}" | |
./validation.sh "${{ env.KUBECONFIG }}" | |
./rmconfig.sh "${{ env.KUBECONFIG }}" | |
cd - |