mutate

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL