Skip to content
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

Document skaffold cache behavior #9314

Open
ericzzzzzzz opened this issue Feb 15, 2024 · 0 comments
Open

Document skaffold cache behavior #9314

ericzzzzzzz opened this issue Feb 15, 2024 · 0 comments

Comments

@ericzzzzzzz
Copy link
Contributor

ericzzzzzzz commented Feb 15, 2024

  • Skaffold caches image build result metadata, such as imageID(if an images is stored to docker daemon) or Digest(if pushed to remote) to speed up the build process, this build result metadata is stored in ~/.skaffold/cache file by default.
  • However, it is not clear what are the intended behavior and what are not.
  • We should document how skaffold cache works
    • skaffold computes the hash of image build inputs as the key to retrieve image metadata
    • What tryImportmissing does
    • What lookuplocal does
    • What lookupremote does
  • here is the current implementation https://github.com/ericzzzzzzz/skaffold/blob/ade1a17d6516f160a2fb081ad32f1adfe7ab80f5/pkg/skaffold/build/cache/lookup.go#L60-L94

Note: the isLocalImage(imageName) is not used to determine if an image exists on local or uses local build environment, it should probably be named as isImageFinalDesitnationLocal or something like this to show that this method is to check if a image will be pushed to a registry eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant