images

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 37 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 added in v0.34.0

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

CleanupInProgressLayers removes incomplete layers from the cache.

func CommonOpts added in v0.34.0

func CommonOpts(arch string) []crane.Option

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

func NoopOpt added in v0.34.0

func NoopOpt(*crane.Options)

NoopOpt is a no-op option for crane.

func Pull added in v0.34.0

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

Pull pulls all of the images from the given config.

func Push added in v0.34.0

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

Push pushes images to a registry.

func SaveConcurrent added in v0.34.0

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 added in v0.34.0

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 added in v0.34.0

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 added in v0.34.0

func WithBasicAuth(username, password string) crane.Option

WithBasicAuth returns an option for crane that sets basic auth.

func WithGlobalInsecureFlag added in v0.34.0

func WithGlobalInsecureFlag() []crane.Option

WithGlobalInsecureFlag returns an option for crane that configures insecure based upon Zarf's global --insecure flag.

func WithPullAuth added in v0.34.0

func WithPullAuth(ri types.RegistryInfo) crane.Option

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

func WithPushAuth added in v0.34.0

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 added in v0.34.0

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 added in v0.34.0

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