-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #608 from backguynn/main
Create __k8s-base-sanity-module.yml
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
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 - |