images

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package images provides functions for building and pushing images.

Package images provides functions for building and pushing images.

Package images provides functions for building and pushing images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupInProgressLayers

func CleanupInProgressLayers(ctx context.Context, img v1.Image) error

CleanupInProgressLayers removes incomplete layers from the cache.

func CommonOpts

func CommonOpts(arch string) []crane.Option

CommonOpts returns a set of common options for crane under Zarf.

func NoopOpt

func NoopOpt(*crane.Options)

NoopOpt is a no-op option for crane.

func Pull

func Pull(ctx context.Context, cfg PullConfig) (map[transform.Image]v1.Image, error)

Pull pulls all images from the given config.

func Push

func Push(ctx context.Context, cfg PushConfig) error

Push pushes images to a registry.

func SaveConcurrent

func SaveConcurrent(ctx context.Context, cl clayout.Path, m map[transform.Image]v1.Image) (map[transform.Image]v1.Image, error)

SaveConcurrent saves images in a concurrent, bounded manner.

func SaveSequential

func SaveSequential(ctx context.Context, cl clayout.Path, m map[transform.Image]v1.Image) (map[transform.Image]v1.Image, error)

SaveSequential saves images sequentially.

func WithArchitecture

func WithArchitecture(arch string) crane.Option

WithArchitecture sets the platform option for crane.

This option is actually a slight mis-use of the platform option, as it is setting the architecture only and hard coding the OS to linux.

func WithBasicAuth

func WithBasicAuth(username, password string) crane.Option

WithBasicAuth returns an option for crane that sets basic auth.

func WithGlobalInsecureFlag

func WithGlobalInsecureFlag() []crane.Option

WithGlobalInsecureFlag returns an option for crane that configures insecure based upon Zarf's global --insecure-skip-tls-verify (and --insecure) flags.

func WithPullAuth

func WithPullAuth(ri types.RegistryInfo) crane.Option

WithPullAuth returns an option for crane that sets pull auth from a given registry info.

func WithPushAuth

func WithPushAuth(ri types.RegistryInfo) crane.Option

WithPushAuth returns an option for crane that sets push auth from a given registry info.

Types

type PullConfig

type PullConfig struct {
	DestinationDirectory string

	ImageList []transform.Image

	Arch string

	RegistryOverrides map[string]string

	CacheDirectory string
}

PullConfig is the configuration for pulling images.

type PushConfig

type PushConfig struct {
	SourceDirectory string

	ImageList []transform.Image

	RegInfo types.RegistryInfo

	NoChecksum bool

	Arch string

	Retries int
}

PushConfig is the configuration for pushing images.

Jump to

Keyboard shortcuts

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