images

package
v3.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureRegistry

func ConfigureRegistry(oc *exutil.CLI, desiredState RegistryConfiguration) error

ConfigureRegistry re-deploys the registry pod if its configuration doesn't match the desiredState. The function blocks until the registry is ready.

func DoesRegistryAcceptSchema2

func DoesRegistryAcceptSchema2(oc *exutil.CLI) (bool, error)

DoesRegistryAcceptSchema2 returns true if the integrated registry is configured to accept manifest V2 schema 2.

func EnsureRegistryAcceptsSchema2

func EnsureRegistryAcceptsSchema2(oc *exutil.CLI, accept bool) error

EnsureRegistryAcceptsSchema2 checks whether the registry is configured to accept manifests V2 schema 2 or not. If the result doesn't match given accept argument, registry's deployment config will be updated accordingly and the function will block until the registry have been re-deployed and ready for new requests.

func GetDockerRegistryURL

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

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

func GetManifestAndConfigByTag

func GetManifestAndConfigByTag(oc *exutil.CLI, repoName, tag string) (
	manifest distribution.Manifest,
	manifestBlob []byte,
	configBlob []byte,
	err error,
)

GetManifestAndConfigByTag fetches manifest and corresponding config blob from the given repository:tag from the integrated registry. If the manifest is of schema 1, nil will be returned instead of config blob.

func GetRegistryClientRepository

func GetRegistryClientRepository(oc *exutil.CLI, repoName string, actions ...string) (distribution.Repository, error)

GetRegistryClientRepository creates a repository interface to the integrated registry. If actions are not provided, only pull action will be requested.

func GetRegistryPod

func GetRegistryPod(podsGetter kcoreclient.PodsGetter) (*kapiv1.Pod, error)

GetRegistryPod returns the youngest registry pod deployed.

func GetRegistryStorageSize

func GetRegistryStorageSize(oc *exutil.CLI) (int64, error)

GetRegistryStorageSize returns a number of bytes occupied by registry's data on its filesystem.

func LogRegistryPod

func LogRegistryPod(oc *exutil.CLI) error

LogRegistryPod attempts to write registry log to a file in artifacts directory.

Types

type RegistryConfiguration

type RegistryConfiguration struct {
	ReadOnly      *bool
	AcceptSchema2 *bool
}

RegistriConfiguration holds desired configuration options for the integrated registry. *nil* stands for "no change".

Jump to

Keyboard shortcuts

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