images

package
v3.7.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAndPushImageOfSizeWithBuilder added in v1.3.0

func BuildAndPushImageOfSizeWithBuilder(
	oc *exutil.CLI,
	dClient *dockerclient.Client,
	namespace, name, tag string,
	size uint64,
	numberOfLayers int,
	shouldSucceed bool,
) error

BuildAndPushImageOfSizeWithBuilder tries to build an image of wanted size and number of layers. Built image is stored as an image stream tag <name>:<tag>. If shouldSucceed is false, a build is expected to fail with a denied error. Note the size is only approximate. Resulting image size will be different depending on used compression algorithm and metadata overhead.

func BuildAndPushImageOfSizeWithDocker added in v1.3.0

func BuildAndPushImageOfSizeWithDocker(
	oc *exutil.CLI,
	dClient *dockerclient.Client,
	name, tag string,
	size uint64,
	numberOfLayers int,
	outSink io.Writer,
	shouldSucceed bool,
) (imageDigest string, err error)

BuildAndPushImageOfSizeWithDocker tries to build an image of wanted size and number of layers. It instructs Docker daemon directly. Built image is stored as an image stream tag <name>:<tag>. If shouldSucceed is false, a push is expected to fail with a denied error. Note the size is only approximate. Resulting image size will be different depending on used compression algorithm and metadata overhead.

func GetDockerRegistryURL added in v1.3.0

func GetDockerRegistryURL(oc *exutil.CLI) (string, error)

GetDockerRegistryURL returns a cluster URL of internal docker registry if available.

func GetImageLabels

func GetImageLabels(c client.ImageStreamImageInterface, imageRepoName, imageRef string) (map[string]string, error)

GetImageLabels retrieves Docker labels from image from image repository name and image reference

func IsBlobStoredInRegistry

func IsBlobStoredInRegistry(
	oc *exutil.CLI,
	dgst digest.Digest,
	repository string,
) (bool, bool, error)

IsBlobStoredInRegistry verifies a presence of the given blob on registry's storage. The registry must be deployed with a filesystem storage driver. If repository is given, the presence will be verified also for layer link inside the ${repository}/_layers directory. First returned bool says whether the blob is present globally in the registry's storage. The second says whether the blob is linked in the given repository.

func IsEmptyDigest

func IsEmptyDigest(dgst digest.Digest) bool

IsEmptyDigest returns true if the given digest matches one of empty blobs.

func MirrorBlobInRegistry

func MirrorBlobInRegistry(oc *exutil.CLI, dgst digest.Digest, repository string, timeout time.Duration) error

MirrorBlobInRegistry forces a blob of external image to be mirrored in the registry. The function expects the blob not to exist before a GET request is issued. The function blocks until the blob is mirrored or the given timeout passes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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