Skip to content

Commit

Permalink
Merge pull request #608 from backguynn/main
Browse files Browse the repository at this point in the history
Create __k8s-base-sanity-module.yml
  • Loading branch information
UltraInstinct14 authored Mar 29, 2024
2 parents 4a2d2a9 + 10c0596 commit bc3b914
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/__k3s-base-sanity-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This module is only called from other actions and is not executed directly.
name: __K3s-Base-Sanity-CI-Module
on:
workflow_call:
jobs:
build:
name: k3s-base-sanity
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- run: |
sudo apt-get update
sudo apt-get -y install bridge-utils net-tools iperf curl 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
git clone --recursive https://github.com/loxilb-io/loxilb
- working-directory: ./loxilb
run: |
docker pull ghcr.io/loxilb-io/loxilb:latest
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
pwd && ls && sudo mkdir /opt/loxilb/ && sudo -E env "PATH=$PATH" make docker-cp
docker exec -dit loxilb mkllb_bpffs
id=`docker ps -f name=loxilb | cut -d " " -f 1 | grep -iv "CONTAINER"` && docker commit $id ghcr.io/loxilb-io/loxilb:latest
docker stop loxilb && docker rm loxilb
- run: |
echo "KUBECONFIG=--kubeconfig=/etc/rancher/k3s/k3s.yaml" >> $GITHUB_ENV
- 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
- working-directory: ./loxilb
run: |
cd cicd/k3s-base-sanity/
./config.sh "${{ env.KUBECONFIG }}"
./validation.sh "${{ env.KUBECONFIG }}"
./rmconfig.sh "${{ env.KUBECONFIG }}"
cd -

0 comments on commit bc3b914

Please sign in to comment.