diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 7f787dfaa8..044a3be63e 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -29,6 +29,9 @@ jobs: conformance-tests: name: Gateway Conformance Tests runs-on: ubuntu-22.04 + strategy: + matrix: + k8s-version: ["1.23.17", "latest"] permissions: contents: write # needed for uploading release artifacts steps: @@ -128,7 +131,8 @@ jobs: - name: Deploy Kubernetes id: k8s run: | - make create-kind-cluster KIND_KUBE_CONFIG=${{ github.workspace }}/kube-${{ github.run_id }} + k8s_version=${{ matrix.k8s-version }} + make create-kind-cluster KIND_KUBE_CONFIG=${{ github.workspace }}/kube-${{ github.run_id }} ${{ ! contains(matrix.k8s-version, 'latest') && 'KIND_IMAGE=kindest/node:v${k8s_version}' || '' }} echo "KUBECONFIG=${{ github.workspace }}/kube-${{ github.run_id }}" >> "$GITHUB_ENV" working-directory: ./conformance @@ -155,7 +159,7 @@ jobs: working-directory: ./conformance - name: Upload profile to release - if: startsWith(github.ref, 'refs/tags/') + if: ${{ matrix.k8s-version == 'latest' && startsWith(github.ref, 'refs/tags/') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh release upload ${{ github.ref_name }} conformance-profile.yaml diff --git a/conformance/Makefile b/conformance/Makefile index 72e11145df..816d999709 100644 --- a/conformance/Makefile +++ b/conformance/Makefile @@ -4,6 +4,7 @@ NGINX_IMAGE_NAME = $(NKG_PREFIX)/nginx GW_API_VERSION ?= 0.8.0 GATEWAY_CLASS = nginx SUPPORTED_FEATURES = HTTPRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPRoutePortRedirect,HTTPRouteSchemeRedirect,GatewayClassObservedGenerationBump +KIND_IMAGE ?= $(shell grep -m1 'FROM kindest/node' Note: The default kind cluster deployed is the latest available version. You can specify a different version by +> defining the kind image to use through the KIND_IMAGE variable, e.g. + +```makefile +make create-kind-cluster KIND_IMAGE=kindest/node:v1.27.3 +``` + ### Step 2 - Install Nginx Kubernetes Gateway to configured kind cluster > Note: If you want to run the latest conformance tests from the Gateway API `main` branch, set the following