image

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConformanceImageVersionAuto represents detecting the server's kubernetes version.
	ConformanceImageVersionAuto = "auto"
	// ConformanceImageVersionLatest represents always using the server's latest version.
	ConformanceImageVersionLatest = "latest"
)

Variables

View Source
var (
	//ErrImageVersionNoClient is the error returned when we need a client but didn't get on
	ErrImageVersionNoClient = errors.New(`can't use nil client with "auto" image version`)
)

Functions

func GetImages

func GetImages(e2eRegistryConfig, version string) (map[string]Config, error)

GetImages gets a map of image Configs

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config holds an images registry, name, and version

func (*Config) GetE2EImage

func (i *Config) GetE2EImage() string

GetE2EImage returns the fully qualified URI to an image (including version)

type ConformanceImageVersion

type ConformanceImageVersion string

ConformanceImageVersion represents the version of a conformance image, or "auto" to detect the version

func (*ConformanceImageVersion) Get

Get retrieves the preset version if there is one, or queries client if the ConformanceImageVersion is set to `auto`. kubernetes.Interface.Discovery() provides ServerVersionInterface. Don't require the entire kubernetes.Interface to simplify the required test mocks

func (*ConformanceImageVersion) Set

func (c *ConformanceImageVersion) Set(str string) error

Set the ImageVersion to either the string "auto" or a version string

func (*ConformanceImageVersion) String

func (c *ConformanceImageVersion) String() string

String needed for pflag.Value.

func (*ConformanceImageVersion) Type

func (c *ConformanceImageVersion) Type() string

Type needed for pflag.Value.

type ImageClient

type ImageClient struct {
	// contains filtered or unexported fields
}

func NewImageClient

func NewImageClient() ImageClient

func (ImageClient) DeleteImages

func (i ImageClient) DeleteImages(images map[string]Config, retries int) []error

func (ImageClient) DownloadImages

func (i ImageClient) DownloadImages(images []string, version string) (string, error)

func (ImageClient) PullImages

func (i ImageClient) PullImages(images map[string]Config, retries int) []error

func (ImageClient) PushImages

func (i ImageClient) PushImages(upstreamImages, privateImages map[string]Config, retries int) []error

type RegistryList

type RegistryList struct {
	GcAuthenticatedRegistry string `yaml:"gcAuthenticatedRegistry"`
	DockerLibraryRegistry   string `yaml:"dockerLibraryRegistry"`
	E2eRegistry             string `yaml:"e2eRegistry"`
	InvalidRegistry         string `yaml:"invalidRegistry"`
	GcRegistry              string `yaml:"gcRegistry"`
	GcrReleaseRegistry      string `yaml:"gcrReleaseRegistry"`
	GoogleContainerRegistry string `yaml:"googleContainerRegistry"`
	PrivateRegistry         string `yaml:"privateRegistry"`
	SampleRegistry          string `yaml:"sampleRegistry"`
	QuayK8sCSI              string `yaml:"quayK8sCSI"`

	// Registry used in v1.14.0 only
	EtcdRegistry string `yaml:"etcdRegistry"`

	K8sVersion *version.Version
	Images     map[int]Config
}

RegistryList holds public and private image registries

func NewRegistryList

func NewRegistryList(repoConfig, k8sVersion string) (*RegistryList, error)

NewRegistryList returns a default registry or one that matches a config file passed

func (*RegistryList) GetImageConfigs

func (r *RegistryList) GetImageConfigs() (map[string]Config, error)

GetImageConfigs returns the map of imageConfigs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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