chore: remove kube-rbac-proxy and use ginkgo tests #117
Workflow file for this run
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: Aergia Controller Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
test-suite: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kindest_node_version: [v1.25.16, v1.26.15, v1.27.13, v1.28.9, v1.29.4, v1.30.2] | ||
experimental: [false] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
- name: Set up testing dependencies | ||
run: sudo apt-get update && sudo apt-get -y install build-essential && sudo apt-get clean | ||
- name: Setup correct Go version | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
- name: Install kustomize, kubebuilder, helm | ||
run: | | ||
#kubebuilder | ||
curl -sL https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.2/kubebuilder_2.3.2_linux_amd64.tar.gz | tar -xz -C /tmp/ | ||
sudo mkdir -p /usr/local/kubebuilder/bin | ||
sudo mv /tmp/kubebuilder_2.3.2_linux_amd64/bin/* /usr/local/kubebuilder/bin | ||
chmod +x /usr/local/kubebuilder/bin/* | ||
echo "/usr/local/kubebuilder/bin" >> $GITHUB_PATH | ||
- name: Check go, kustomize, kubebuilder, helm, docker-compose, kind versions | ||
run: | | ||
go version | ||
kustomize version | ||
helm version | ||
kubebuilder version | ||
kind version | ||
- name: Add dependency chart repos | ||
run: | | ||
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx | ||
helm repo add metallb https://metallb.github.io/metallb | ||
- name: Install gojq | ||
run: | | ||
cd /tmp | ||
curl -sSLO https://github.com/itchyny/gojq/releases/download/v0.11.1/gojq_v0.11.1_linux_amd64.tar.gz | ||
tar -xf ./gojq_v0.11.1_linux_amd64.tar.gz | ||
sudo cp /tmp/gojq_v0.11.1_linux_amd64/gojq /usr/local/bin/jq | ||
- name: Configure node IP in kind-config.yaml | ||
run: | | ||
docker network create kind | ||
LAGOON_KIND_CIDR_BLOCK=$(docker network inspect kind | jq '. [0].IPAM.Config[0].Subnet' | tr -d '"') | ||
export KIND_NODE_IP=$(echo ${LAGOON_KIND_CIDR_BLOCK%???} | awk -F'.' '{print $1,$2,$3,240}' OFS='.') | ||
envsubst < test-resources/test-suite.kind-config.yaml.tpl > test-resources/test-suite.kind-config.yaml | ||
envsubst < test/e2e/testdata/example-nginx.yaml.tpl > test/e2e/testdata/example-nginx.yaml | ||
- name: Create kind cluster | ||
uses: helm/kind-action@v1.10.0 | ||
with: | ||
version: v0.24.0 | ||
cluster_name: aergia-controller | ||
node_image: kindest/node:${{ matrix.kindest_node_version }} | ||
kubectl_version: v1.30.4 | ||
config: test-resources/test-suite.kind-config.yaml | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
load: true | ||
tags: uselagoon/aergia:test-tag | ||
- name: Run github/test-e2e | ||
run: | | ||
make github/test-e2e KIND_NETWORK=kind |