GoogleContainerTools / GoogleContainerTools/skaffold
Document skaffold cache behavior
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
- 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.
Contributor guide
Assessment
This issue has not been assessed yet.