Documentation ¶
Index ¶
- Constants
- Variables
- func GetImages(e2eRegistryConfig, version string) (map[string]Config, error)
- type Config
- type ConformanceImageVersion
- type ImageClient
- func (i ImageClient) DeleteImages(images map[string]Config, retries int) []error
- func (i ImageClient) DownloadImages(images []string, version string) (string, error)
- func (i ImageClient) PullImages(images map[string]Config, retries int) []error
- func (i ImageClient) PushImages(upstreamImages, privateImages map[string]Config, retries int) []error
- type RegistryList
Constants ¶
const ( // ConformanceImageVersionAuto represents detecting the server's kubernetes version. ConformanceImageVersionAuto = "auto" // ConformanceImageVersionLatest represents always using the server's latest version. ConformanceImageVersionLatest = "latest" )
Variables ¶
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 ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds an images registry, name, and version
func (*Config) GetE2EImage ¶
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 ¶
func (c *ConformanceImageVersion) Get(client discovery.ServerVersionInterface) (string, error)
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 { DockerLibraryRegistry string `yaml:"dockerLibraryRegistry,omitempty"` E2eRegistry string `yaml:"e2eRegistry,omitempty"` EtcdRegistry string `yaml:"etcdRegistry,omitempty"` GcAuthenticatedRegistry string `yaml:"gcAuthenticatedRegistry,omitempty"` GcRegistry string `yaml:"gcRegistry,omitempty"` GcrReleaseRegistry string `yaml:"gcrReleaseRegistry,omitempty"` GoogleContainerRegistry string `yaml:"googleContainerRegistry,omitempty"` InvalidRegistry string `yaml:"invalidRegistry,omitempty"` PrivateRegistry string `yaml:"privateRegistry,omitempty"` QuayK8sCSI string `yaml:"quayK8sCSI,omitempty"` SampleRegistry string `yaml:"sampleRegistry,omitempty"` K8sVersion *version.Version `yaml:"-"` Images map[int]Config `yaml:"-"` }
RegistryList holds public and private image registries
func GetDefaultImageRegistries ¶ added in v0.16.5
func GetDefaultImageRegistries(version string) (*RegistryList, error)
GetDefaultImageRegistries returns the default default image registries used for a given version of the Kubernetes E2E tests
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