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"` E2eRegistry string `yaml:"e2eRegistry"` EtcdRegistry string `yaml:"etcdRegistry"` GcRegistry string `yaml:"gcRegistry"` PrivateRegistry string `yaml:"privateRegistry"` SampleRegistry string `yaml:"sampleRegistry"` 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