From 3abb61f29451e6e33bc85b09f1f78183361f4000 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Thu, 19 Nov 2026 23:00:56 -0700 Subject: [PATCH] Three Kubernetes minors x two architectures, nightly and callable (K-L8) lab/kubernetes.json pins the kind node images (1.35.8, 1.36.4, 1.37.0, by digest, from kind v0.33.0's release). e2e.yml builds its matrix from it and the architectures, runs nightly, on every push and by hand, and can be called by inbuxa-charts with a chart commit and the architectures to use. --- .github/workflows/e2e.yml | 70 +++++++++++++++++++++++++++++++++------ README.md | 4 ++- lab/e2e.sh | 4 +-- lab/kubernetes.json | 5 +++ 4 files changed, 70 insertions(+), 13 deletions(-) create mode 100644 lab/kubernetes.json diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 47398dc..ef8f7cc 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,46 +1,93 @@ # SPDX-FileCopyrightText: 2026 Coffey Labs LLC # SPDX-License-Identifier: Apache-2.0 # -# The lab end to end on a fresh GitHub runner, amd64 and arm64 (S7, K-L1): -# lab/tools.sh, then lab/e2e.sh with the chart from inbuxa-charts' main. -# Runs on the GitHub replica only (vars.BUILD_ON), where the runners are; -# Gitea's runners don't run it. +# The lab end to end on fresh GitHub runners (K-L1, K-L8): lab/tools.sh, +# then lab/e2e.sh, on each Kubernetes minor in lab/kubernetes.json (kind +# node images pinned by digest) and each runner architecture. # -# The full matrix (three Kubernetes minors, nightly, chart PRs) is K-L8. +# - nightly, on every push here, and by hand: the chart's main, three +# minors on amd64 and arm64 +# - called by inbuxa-charts for each chart branch (workflow_call): that +# chart commit, the architectures it asks for +# +# Runs on the GitHub replicas only (vars.BUILD_ON, the caller's when +# called), where the runners are; Gitea runs .gitea/workflows instead. name: e2e on: + schedule: + - cron: "17 9 * * *" # 02:17 in Arizona workflow_dispatch: # Every branch: the lab's PRs are on Gitea, its branches reach GitHub by # the push mirror push: + workflow_call: + inputs: + chart_ref: + description: the inbuxa-charts commit or branch to test + type: string + required: true + lab_ref: + description: the inbuxa-k8s-lab commit or branch to test with + type: string + default: main + architectures: + description: JSON list of runner labels + type: string + default: '["ubuntu-24.04", "ubuntu-24.04-arm"]' permissions: contents: read concurrency: - group: e2e-${{ github.ref }} + group: e2e-${{ github.repository }}-${{ github.ref }}-${{ inputs.chart_ref || 'main' }} cancel-in-progress: true jobs: - e2e: + matrix: if: ${{ vars.BUILD_ON == 'github' }} + runs-on: ubuntu-24.04 + outputs: + kubernetes: ${{ steps.m.outputs.kubernetes }} + runners: ${{ steps.m.outputs.runners }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: inbuxa/inbuxa-k8s-lab + ref: ${{ inputs.lab_ref || github.sha }} + persist-credentials: false + sparse-checkout: lab/kubernetes.json + sparse-checkout-cone-mode: false + - id: m + env: + RUNNERS: ${{ inputs.architectures || '["ubuntu-24.04", "ubuntu-24.04-arm"]' }} + run: | + echo "kubernetes=$(jq -c . lab/kubernetes.json)" >> "$GITHUB_OUTPUT" + echo "runners=$(jq -c . <<<"$RUNNERS")" >> "$GITHUB_OUTPUT" + + e2e: + needs: matrix + name: e2e (${{ matrix.kubernetes.minor }}, ${{ matrix.runner }}) strategy: fail-fast: false matrix: - runner: [ubuntu-24.04, ubuntu-24.04-arm] + runner: ${{ fromJSON(needs.matrix.outputs.runners) }} + kubernetes: ${{ fromJSON(needs.matrix.outputs.kubernetes) }} runs-on: ${{ matrix.runner }} timeout-minutes: 40 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: + repository: inbuxa/inbuxa-k8s-lab + ref: ${{ inputs.lab_ref || github.sha }} path: inbuxa-k8s-lab persist-credentials: false - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: inbuxa/inbuxa-charts - # main, unless the repo variable CHART_REF names a chart branch - ref: ${{ vars.CHART_REF || 'main' }} + # the caller's chart commit; otherwise main, or the branch the repo + # variable CHART_REF names + ref: ${{ inputs.chart_ref || vars.CHART_REF || 'main' }} path: inbuxa-charts persist-credentials: false - name: Tools (pinned, checksummed) @@ -52,6 +99,9 @@ jobs: nproc; free -h | head -2; df -h / | tail -1 docker version --format 'docker {{.Server.Version}}' - name: Lab end to end + env: + KIND_NODE_IMAGE: ${{ matrix.kubernetes.image }} + E2E_LABEL: Kubernetes ${{ matrix.kubernetes.minor }}, ${{ matrix.runner }} run: inbuxa-k8s-lab/lab/e2e.sh - name: Memory at the end if: always() diff --git a/README.md b/README.md index aa0ab65..5476cda 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,9 @@ seeded, then mail, the webmail and the console, timing each part. It wants inbuxa-charts checked out next to this repository (or `CHART_REPO=`), and kind, kubectl and Helm, which `lab/tools.sh` installs at pinned versions, each checked against its published checksum. CI runs it on GitHub's amd64 -and arm64 runners (`.github/workflows/e2e.yml`). +and arm64 runners on each Kubernetes minor in `lab/kubernetes.json`, nightly +and on every push (`.github/workflows/e2e.yml`), and each chart branch in +inbuxa-charts calls the same workflow for its own commit. `lab/up.sh` is just the cluster: kind, Kyverno and the policies, MetalLB, and the data layer (CloudNativePG, NATS, Garage). It adds the Helm diff --git a/lab/e2e.sh b/lab/e2e.sh index c02768b..4a17c30 100755 --- a/lab/e2e.sh +++ b/lab/e2e.sh @@ -16,7 +16,7 @@ # # lab/e2e.sh # chart in ../inbuxa-charts # CHART_REPO=path lab/e2e.sh -# KIND_NODE_IMAGE=kindest/node:v1.35.4 lab/e2e.sh +# KIND_NODE_IMAGE=kindest/node:v1.35.8 lab/e2e.sh # lab/kubernetes.json lists the three CI runs # # Prints a summary, also to $GITHUB_STEP_SUMMARY when it's set, and on a # failure what the pods and events were. @@ -37,7 +37,7 @@ lap() { SUMMARY+=("| $1 | $(( SECONDS - ${2:-$t0} ))s |"); } report() { { echo "| Part | Took |"; echo "|---|---|"; printf '%s\n' "${SUMMARY[@]}"; } > "$STATE/e2e-summary.md" cat "$STATE/e2e-summary.md" - [ -n "${GITHUB_STEP_SUMMARY:-}" ] && { echo "### inbuxa lab, $(uname -m)"; cat "$STATE/e2e-summary.md"; } >> "$GITHUB_STEP_SUMMARY" + [ -n "${GITHUB_STEP_SUMMARY:-}" ] && { echo "### inbuxa lab, ${E2E_LABEL:-$(uname -m)}"; cat "$STATE/e2e-summary.md"; } >> "$GITHUB_STEP_SUMMARY" return 0 } on_exit() { diff --git a/lab/kubernetes.json b/lab/kubernetes.json new file mode 100644 index 0000000..b561c3c --- /dev/null +++ b/lab/kubernetes.json @@ -0,0 +1,5 @@ +[ + {"minor": "1.35", "image": "kindest/node:v1.35.8@sha256:07b2536e30b803ed61d1677a79df6115f798ce64c80f9e22f6ed45afd09323c0"}, + {"minor": "1.36", "image": "kindest/node:v1.36.4@sha256:099e049362a1526b2db71494e1947aae99bd16290d7c895f2b7ea312e3cbfaed"}, + {"minor": "1.37", "image": "kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5"} +] -- 2.54.0