Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Annotations ¶
func Annotations( f partial.WithRawManifest, indexAnnotations, manifestAnnotations map[string]string, ) (partial.WithRawManifest, error)
Annotations wraps an OCI artifact to overlay annotations on its manifest. The input must be a v1.Image or v1.ImageIndex.
For a v1.Image, only manifestAnnotations are applied; indexAnnotations are ignored. For a v1.ImageIndex, indexAnnotations are applied to the index manifest and manifestAnnotations to each child image manifest.
This function exists because go-containerregistry's mutate.Annotations has a Layers() implementation that enumerates layers via ConfigFile().RootFS.DiffIDs, which is empty for non-Docker OCI artifacts (e.g. Helm charts). This causes layers to be omitted from the push, leading to MANIFEST_BLOB_UNKNOWN errors on cross-repository pushes. The wrappers here delegate Layers() and all other methods to the base artifact, overriding only the manifest to include annotations.
Types ¶
This section is empty.