-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
When the image is remote and cached, skaffold tries to pull it locally and ignores the cache. #9177
Comments
@3droj7 Hi, I'm trying to understand this issue. You provided a Or you want skaffold to compute the inputDigest then check cache, if not available, check local, check remote, tryImport happen in sequence, if any found then (store and) return result? |
@ericzzzzzzz I actually meant "skafold run". What I expect to happen is the following -
What happens instead is -
I saw that by doing the following change, it solves it (specifically in the build phase) -
But now, I have some issues in the deployment phase and not sure if it was because of the change or something else |
Apparently the deployment problem was on my end but the cache and the pulling issue were real problems so I've created a PR - It probably could be better (with less code duplication) but I'm not that aware of the code base and it seems to work for me also when trying to use the cluster and local images. |
* fix: puling images when working with a remote repository (#9177) If the skaffold is configured to use the cluster and not the local images, it will not pull the images locally. If everything is cached it will move to deployment stage instead of unnecessarily downloading the images. * Fixed the tests --------- Co-authored-by: daniel <daniel@cybellum.com>
* Revert "fix(lookupRemote): fixed lookup.go lookupRemote to compare remote and cached digests (#9278)" This reverts commit 9ff4546. * Revert "fix: Scope Issue with the 'entry' variable when looking up remote images and tests additions (#9211)" This reverts commit ffe769c. * Revert "fix: puling images when working with a remote repository (#9177) (#9181)" This reverts commit 9376dc0.
Hey,
We're using helm to deploy our images to the EKS and the images themselves are saved in the gitlab registry.
When we're trying to use skaffold, it will always try to download the image locally when it shouldn't because the deployment doesn't use the local images.
There's seems to be a bug in
skaffold/pkg/skaffold/build/cache/lookup.go
Line 83 in 1f591ba
It tries to import the image when the image can be remote and doesn't need to be imported.
skaffold/pkg/skaffold/runner/new.go
Line 229 in 1f591ba
Also I would suggest to put some debug logs to understand if skaffold decided that the image is remote or local.
Expected behavior
Checking cache...
Actual behavior
Checking cache...
Information
skaffold build --default-repo registry.gitlab.com/.... --platform=linux/amd64 -v debug
The text was updated successfully, but these errors were encountered: