-
Notifications
You must be signed in to change notification settings - Fork 1.4k
✨ tilt-prepare: add a flag to skip image preloading #13143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Note: this issue is also relevant when using docker community edition >= version 29 for any OS. I think the workaround used in CI should work here too: using Afterwards preload work. |
Although crane would work, I am trying to avoid any dependencies for the user. Not everybody knows/uses crane in their local. That's why I chose the skipping way since that's probably the simplest and most straight forward. It just relies on the standard way of kubelet pulling images. |
|
The thing is this does not exclusively fail for The issue here is not >how we load the images< (which is part of the tooling) it is >how we pull the images<. I'd favor a toggle-able option to disable it if needed. Long-term this should work. |
3577304 to
22df0c3
Compare
|
@chrischdi Got it. I have now updated the PR so that users could provide a flag in |
| preloadImages := true | ||
| if ts.PreloadImages != nil { | ||
| preloadImages = *ts.PreloadImages | ||
| } | ||
| tasks["cert-manager-cainjector"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-cainjector:%s", config.CertManagerDefaultVersion), preloadImages) | ||
| tasks["cert-manager-webhook"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-webhook:%s", config.CertManagerDefaultVersion), preloadImages) | ||
| tasks["cert-manager-controller"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-controller:%s", config.CertManagerDefaultVersion), preloadImages) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not create the tasks entirely when the flag is set? (vs creating task that are no op)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I modified the code to now conditionally execute this based on the bool. Also modified preLoadImageTask function accordingly.
Signed-off-by: Bharath Nallapeta <nr.bharath97@gmail.com>
22df0c3 to
65608a0
Compare
|
@chrischdi @fabriziopandini PTAL. |
fabriziopandini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think the approach suggested by @chrischdi (use crane) provides better results for iterative development, because you don't have to download the image every time you do kind-up.
However, considering cert-manager is not a strong requirement for CAPI, and in theory it that can be replaced or entirely removed, I'm ok to make it possible to skip cert-manager pre-load tasks.
/lgtm
/approve
|
LGTM label has been added. DetailsGit tree hash: b682422c12c6e0175d34c11ed15d327e9d36f012 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
On Apple Silicon Macs,
kind load docker-imagefails for multi-arch images (like cert-manager) because Docker Desktop only stores thearm64layers locally. This causesctrto fail when it tries to import all architectures, resulting in a "content digest not found" error that blockstilt up.This PR updates
tilt-prepareto skip the preloading step specifically ondarwin/arm64. Instead of preloading, we rely on the Kubelet to pull the images on-demand when the pods start. This bypasses the kind/docker import issue and allows the development environment to start correctly.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #13142
Refs: kubernetes-sigs/kind#3795
/area devtools