images

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package images finds the container images manifests run, normalises their references and pins them by digest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Covered

func Covered(image string, pinned []string) bool

Covered reports whether image, as a chart renders it, is one of the pinned images: the same repository and digest, or the same repository and tag.

func FromManifests

func FromManifests(docs ...string) ([]string, error)

FromManifests lists, normalised and sorted, the images that containers in the given YAML manifests run.

func Normalize

func Normalize(ref string) (string, error)

Normalize returns the full form of an image reference: docker.io/library/nginx:latest for nginx. A digest is kept, and a tag defaults to latest only when there is no digest.

func Pinned

func Pinned(ref string) bool

Pinned reports whether a reference carries a digest.

func Split

func Split(ref string) (repo, tag, digest string)

Split returns the repository (registry/path), the tag and the digest of a normalised reference.

Types

type Resolver

type Resolver struct {
	// CredentialsFile is a Docker config with registry credentials;
	// empty means anonymous access.
	CredentialsFile string
	// PlainHTTP talks to registries without TLS (test registries only).
	PlainHTTP bool
	// PlainHTTPRegistries are registry hosts, host or host:port, reached
	// without TLS; the others keep it.
	PlainHTTPRegistries []string
}

Resolver looks up the digests of image tags.

func (Resolver) Pin

func (r Resolver) Pin(ctx context.Context, ref string) (string, error)

Pin returns ref with the digest its tag points at now; a reference that already has a digest is returned as it is.

func (Resolver) Repository

func (r Resolver) Repository(name string) (*remote.Repository, error)

Repository opens an image repository, registry/path, mapping docker.io to its registry host.

Jump to

Keyboard shortcuts

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