cloud: let the environment override the cloud image and registry - #5130
Open
Brian-McM wants to merge 1 commit into
Open
cloud: let the environment override the cloud image and registry#5130Brian-McM wants to merge 1 commit into
Brian-McM wants to merge 1 commit into
Conversation
The VARIANT=cloud block pinned BUILD_IMAGE, IMAGE_REGISTRY and PUSH_IMAGE_PREFIXES with `:=`, which overrides the environment. That is right for a cloud release, but it left no way to build the cloud variant into another registry: a Calico Enterprise hashrelease passes the hashrelease registry and image via the environment and had them silently replaced with gcr.io/tigera-tesla/operator-cloud. Move the block above the enterprise defaults and use `?=` so an environment override wins, the cloud values apply when there is none, and enterprise builds are unchanged. ARCHES stays `:=` — the cloud variant is amd64 only by construction. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
caseydavenport
approved these changes
Aug 1, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of fix: build system change, no runtime behaviour change.
The
VARIANT=cloudblock pinnedBUILD_IMAGE,IMAGE_REGISTRYandPUSH_IMAGE_PREFIXESwith:=, and a Makefile assignment overrides the environment. That is what we want for a cloud release— it should always land in
gcr.io/tigera-tesla/operator-cloud— but it left no way to build thecloud variant into a different registry. A Calico Enterprise hashrelease passes the hashrelease
registry and image name through the environment (
REGISTRY/IMAGE_NAME, which the release toolturns into
IMAGE_REGISTRY/BUILD_IMAGE), and those were silently replaced with the tigera-teslavalues.
This moves the cloud block above the enterprise defaults and switches those three to
?=, so:make release-tag VARIANT=cloudisunchanged),
ARCHESdeliberately stays:=— the cloud variant is amd64 only by construction, andpush-alliterates
ARCHES, so it must not pick up arches that were never built.Why now: tigera/calico-private is adding the cloud operator image to enterprise hashreleases. It
needs the image to land next to the enterprise operator in the hashrelease registry, both to keep
dev artifacts out of the cloud release registry and because the hashrelease CI job's OIDC service
account is scoped to the hashrelease project, not tigera-tesla.
Testing
Verified variable resolution for all three paths by evaluating the Makefile directly:
BUILD_IMAGEIMAGE_REGISTRYARCHESCLOUD_LDFLAGSVARIANT)tigera/operatorquay.ioVARIANT=cloudtigera-tesla/operator-cloudgcr.ioamd64VARIANT=cloud+ env overridetigera/operator-cloudgcr.io/unique-caldron-775/cnxamd64hack/releaseunit tests pass.Release Note
For PR author
make gen-files(n/a)make gen-versions(n/a)🤖 Generated with Claude Code