From 1077788014b0d7353b845f8bdfc68c0dd0fd4564 Mon Sep 17 00:00:00 2001 From: Aswin Sreeraj Date: Fri, 14 Aug 2026 21:14:20 +0530 Subject: [PATCH] ci: set default Kubernetes version dynamically via Makefile Hardcoding the default Kubernetes minor version (1.35) in the integration-tests workflow forces manual search-and-replace updates across multiple files when bumping versions. Add a `print-kube-minor` target to `node-images/fedora/Makefile` to make the Makefile the single source of truth for the default Kubernetes version, and invoke it dynamically in GitHub Actions (`integration-tests.yml`). Closes #87 Signed-off-by: Aswin Sreeraj --- .github/workflows/integration-tests.yml | 2 +- node-images/fedora/Makefile | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index c1d29ea..08b2621 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -62,7 +62,7 @@ jobs: - name: Get supported Kubernetes versions id: set-matrix run: | - DEFAULT="1.35" + DEFAULT=$(make -s -C node-images/fedora print-kube-minor) FEDORA_VERSION="44" ALL=$(curl -s https://endoflife.date/api/kubernetes.json | \ jq -c '[.[] | select(.eol > (now | strftime("%Y-%m-%d"))) | .cycle][:3]') diff --git a/node-images/fedora/Makefile b/node-images/fedora/Makefile index c1e211e..4a2d85a 100644 --- a/node-images/fedora/Makefile +++ b/node-images/fedora/Makefile @@ -1,4 +1,4 @@ -.PHONY: build-bootc-image build-disk-image build-disk-image-composefs clean help +.PHONY: build-bootc-image build-disk-image build-disk-image-composefs print-kube-minor clean help KUBE_MINOR ?= 1.35 FEDORA_VERSION ?= 44 @@ -82,6 +82,9 @@ print-node-image: print-node-image-composefs: @echo $(NODE_IMAGE_COMPOSEFS) +print-kube-minor: + @echo $(KUBE_MINOR) + clean: @echo "=== Cleaning up ===" podman rmi -f $(BOOTC_IMAGE) $(NODE_IMAGE) 2>/dev/null || true