Documentation
¶
Overview ¶
Package mounts remembers which repositories hold a layer, so a push can have the destination registry mount a blob instead of taking the bytes.
remote.Write only offers a mount for layers still carrying the reference they were pulled from, which every local copy kaniko makes throws away. Keyed by digest rather than held on the layer, so a copy that keeps the bytes keeps the entry and one that rewrites them misses.
Only repositories this process read from or wrote to belong here. remote.Write fails a push outright when the token request for a mount source is refused, so an unproven entry is not a missed optimisation but a broken build.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mountable ¶
func Mountable(repos []name.Repository, registry string) (name.Repository, bool)
Mountable returns one of the repositories known to hold a layer that sits on registry. Cross-registry origins are not honoured in practice, so a source elsewhere is no source.
func PlannedDigest ¶
PlannedDigest names a layer that does not exist yet by the cache key that decides where it will end up. Cache keys are sha256 hex like a digest, and never collide with one in practice.
func RecordImage ¶
func RecordImage(img v1.Image, repo name.Repository)
Types ¶
This section is empty.