Add dev-image and dev-push Make targets#12145
Open
caseydavenport wants to merge 2 commits intoprojectcalico:masterfrom
Open
Add dev-image and dev-push Make targets#12145caseydavenport wants to merge 2 commits intoprojectcalico:masterfrom
caseydavenport wants to merge 2 commits intoprojectcalico:masterfrom
Conversation
Add workflow for building all Calico images, tagging them with a custom tag, and pushing to a personal Docker Hub registry. This enables deploying custom builds on real clusters without kind-specific hacks like PullNever. The operator is built with registry and imagePath baked in via gen-versions, so it resolves images correctly without Installation CR changes. Usage: make dev-push DEV_IMAGE_PATH=caseydavenport DEV_IMAGE_TAG=my-feature
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a developer workflow to build Calico component images locally, retag them with a custom tag/namespace, and (optionally) push them to a personal registry so real clusters can pull custom builds without kind-specific PullNever behavior. It also extends the kind operator build script to generate operator image references pointing at that dev registry/path/tag.
Changes:
- Add
dev-imageanddev-pushtargets to build/tag/push images for a developer-owned registry namespace. - Extend
hack/test/kind/infra/build-operator.shwith a “dev mode” that regenerates operator versions with custom registry/path/tag. - Stop tracking
hack/test/kind/infra/operatoras a repo object and ignore it to allow local cloning during operator builds.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
lib.Makefile |
Adds dev-image/dev-push targets that retag kind-built images for developer publishing. |
hack/test/kind/infra/build-operator.sh |
Adds a dev-mode path that rewrites versions YAML and builds/tags operator for remote pulls. |
hack/test/kind/infra/operator |
Removes previously tracked operator directory reference (was preventing clean local cloning). |
.gitignore |
Ignores hack/test/kind/infra/operator so local clones don’t show up as untracked. |
Skip work for unchanged images using docker image ID comparison via stamp files in .dev-stamps/: - dev-image: only re-tags images whose docker ID changed since last run - dev-image-operator: only rebuilds when inputs change (versions file, tag, registry, path, operator branch). This is the big win since the operator build clones and compiles from scratch. - dev-push: only pushes images whose ID changed since last push Also set PullAlways in dev mode operator builds so clusters pull fresh images when redeploying with the same tag. Use 'rm -rf .dev-stamps' to force a full rebuild.
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.
Add workflow for building all Calico images, tagging them with a custom tag, and pushing to a personal Docker Hub registry. This enables deploying custom builds on real clusters without kind-specific hacks like PullNever.
The operator is built with registry and imagePath baked in via gen-versions, so it resolves images correctly without Installation CR changes.
Usage: