From 08d61def844198ab60ecdb14419bb2b0e6316412 Mon Sep 17 00:00:00 2001 From: Thomas Maas Date: Wed, 15 Jul 2026 17:43:32 +0200 Subject: [PATCH] fix: persist DEFAULT_CHANNEL in prepare-release The `prepare-release` target writes CHANNELS/BUNDLE_CHANNELS to make/release.mk but never persisted DEFAULT_CHANNEL/BUNDLE_DEFAULT_CHANNEL. This meant subsequent `make bundle` invocations on a release branch silently fell back to the Makefile default, producing bundles without an explicit default-channel annotation. Conditionally append DEFAULT_CHANNEL/BUNDLE_DEFAULT_CHANNEL to release.mk when the caller passes DEFAULT_CHANNEL, mirroring the existing ifneq guard at the top of the Makefile. Callers who don't pass DEFAULT_CHANNEL see no behavior change. Same class of bug fixed for limitador-operator in Kuadrant/limitador-operator#268 / #269. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Thomas Maas --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 9f935779..685a4295 100644 --- a/Makefile +++ b/Makefile @@ -612,6 +612,9 @@ prepare-release: ## Generates a makefile that will override environment variable echo -e "#Release default values\\nIMG=$(IMAGE_TAG_BASE):$(IMG_TAG)\nBUNDLE_IMG=$(IMAGE_TAG_BASE)-bundle:$(IMG_TAG)\n\ CATALOG_IMG=$(IMAGE_TAG_BASE)-catalog:$(IMG_TAG)\nCOREDNS_IMG=$(COREDNS_IMAGE_TAG_BASE):$(IMG_TAG)\nCHANNELS=$(CHANNELS)\n\ BUNDLE_CHANNELS=--channels=$(CHANNELS)\nVERSION=$(VERSION)" > $(RELEASE_FILE) +ifneq ($(origin DEFAULT_CHANNEL), undefined) + echo -e "DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)\nBUNDLE_DEFAULT_CHANNEL=--default-channel=$(DEFAULT_CHANNEL)" >> $(RELEASE_FILE) +endif $(MAKE) set-image-refs $(MAKE) bundle $(MAKE) helm-build VERSION=$(VERSION)