Update toolkit components #1177
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: e2e-arm64 | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ 'main', 'update-components', 'e2e-*', 'release/**' ] | |
permissions: | |
contents: read | |
jobs: | |
e2e-arm64-kubernetes: | |
# Hosted on Equinix | |
# Docs: https://github.com/fluxcd/flux2/tree/main/.github/runners | |
runs-on: [self-hosted, Linux, ARM64, equinix] | |
strategy: | |
matrix: | |
# Keep this list up-to-date with https://endoflife.date/kubernetes | |
# Check which versions are available on DockerHub with 'crane ls kindest/node' | |
KUBERNETES_VERSION: [ 1.25.11, 1.26.6, 1.27.3, 1.28.0 ] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- name: Setup Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version: 1.20.x | |
cache-dependency-path: | | |
**/go.sum | |
**/go.mod | |
- name: Prepare | |
id: prep | |
run: | | |
ID=${GITHUB_SHA:0:7}-${{ matrix.KUBERNETES_VERSION }}-$(date +%s) | |
echo "CLUSTER=arm64-${ID}" >> $GITHUB_OUTPUT | |
- name: Build | |
run: | | |
make build | |
- name: Setup Kubernetes Kind | |
run: | | |
kind create cluster \ | |
--wait 5m \ | |
--name ${{ steps.prep.outputs.CLUSTER }} \ | |
--kubeconfig=/tmp/${{ steps.prep.outputs.CLUSTER }} \ | |
--image=kindest/node:v${{ matrix.KUBERNETES_VERSION }} | |
- name: Run e2e tests | |
run: TEST_KUBECONFIG=/tmp/${{ steps.prep.outputs.CLUSTER }} make e2e | |
- name: Run multi-tenancy tests | |
env: | |
KUBECONFIG: /tmp/${{ steps.prep.outputs.CLUSTER }} | |
run: | | |
./bin/flux install | |
./bin/flux create source git flux-system \ | |
--interval=15m \ | |
--url=https://github.com/fluxcd/flux2-multi-tenancy \ | |
--branch=main \ | |
--ignore-paths="./clusters/**/flux-system/" | |
./bin/flux create kustomization flux-system \ | |
--interval=15m \ | |
--source=flux-system \ | |
--path=./clusters/staging | |
kubectl -n flux-system wait kustomization/tenants --for=condition=ready --timeout=5m | |
kubectl -n apps wait kustomization/dev-team --for=condition=ready --timeout=1m | |
kubectl -n apps wait helmrelease/podinfo --for=condition=ready --timeout=1m | |
- name: Run monitoring tests | |
# Keep this test in sync with https://fluxcd.io/flux/guides/monitoring/ | |
env: | |
KUBECONFIG: /tmp/${{ steps.prep.outputs.CLUSTER }} | |
run: | | |
./bin/flux create source git flux-monitoring \ | |
--interval=30m \ | |
--url=https://github.com/fluxcd/flux2 \ | |
--branch=${GITHUB_REF#refs/heads/} | |
./bin/flux create kustomization kube-prometheus-stack \ | |
--interval=1h \ | |
--prune \ | |
--source=flux-monitoring \ | |
--path="./manifests/monitoring/kube-prometheus-stack" \ | |
--health-check-timeout=5m \ | |
--wait | |
./bin/flux create kustomization monitoring-config \ | |
--depends-on=kube-prometheus-stack \ | |
--interval=1h \ | |
--prune=true \ | |
--source=flux-monitoring \ | |
--path="./manifests/monitoring/monitoring-config" \ | |
--health-check-timeout=1m \ | |
--wait | |
kubectl -n flux-system wait kustomization/kube-prometheus-stack --for=condition=ready --timeout=5m | |
kubectl -n flux-system wait kustomization/monitoring-config --for=condition=ready --timeout=5m | |
kubectl -n monitoring wait helmrelease/kube-prometheus-stack --for=condition=ready --timeout=1m | |
- name: Debug failure | |
if: failure() | |
env: | |
KUBECONFIG: /tmp/${{ steps.prep.outputs.CLUSTER }} | |
run: | | |
kubectl -n flux-system get all | |
kubectl -n flux-system describe po | |
kubectl -n flux-system logs deploy/source-controller | |
kubectl -n flux-system logs deploy/kustomize-controller | |
- name: Cleanup | |
if: always() | |
run: | | |
kind delete cluster --name ${{ steps.prep.outputs.CLUSTER }} | |
rm /tmp/${{ steps.prep.outputs.CLUSTER }} |