Documentation ¶
Index ¶
- Constants
- Variables
- type ImageRegistries
- func (i *ImageRegistries) DefaultRegistries()
- func (i ImageRegistries) FindRegistryByName(name string) ImageRegistry
- func (i ImageRegistries) FindRegistryByOverrideByImage(name string) (ImageRegistry, bool)
- func (i ImageRegistries) FindRegistryByOverrideByURL(url string) (ImageRegistry, bool)
- func (i ImageRegistries) FindRegistryByURL(url string) ImageRegistry
- func (i ImageRegistries) GetDefaultRegistry() (ImageRegistry, bool)
- func (i ImageRegistries) GetLatestVersionForImage(name, url string) string
- type ImageRegistry
- type OverrideImage
- type OverrideRegistry
Constants ¶
const ( // DockerHub is the default name for the DockerHub registry DockerHub = "DockerHub" // Quay is the default name for the Quay registry Quay = "Quay" // Gcr is the default name for the Gcr registry Gcr = "Gcr" // GcrK8s is the default name for the GcrK8s registry GcrK8s = "GcrK8s" // Zalando is the default name for the Zalando registry Zalando = "Zalando" // Gitlab is the default name for the Gitlab registry Gitlab = "Gitlab" // AuthTypeBasic is the basic auth type AuthTypeBasic = "basic" // AuthTypeToken is the token auth type AuthTypeToken = "token" // AuthTypeNone is no auth AuthTypeNone = "none" )
Variables ¶
var ErrNoMorePages = errors.New("no more pages")
ErrNoMorePages defines that there are no more pages
Functions ¶
This section is empty.
Types ¶
type ImageRegistries ¶
type ImageRegistries struct { DockerHub ImageRegistry `koanf:"dockerHub"` Quay ImageRegistry `koanf:"quay"` Gcr ImageRegistry `koanf:"gcr"` GcrK8s ImageRegistry `koanf:"gcrK8s"` Zalando ImageRegistry `koanf:"zalando"` Gitlab ImageRegistry `koanf:"gitlab"` OverrideImages []OverrideImage `koanf:"override"` OverrideRegistries []OverrideRegistry `koanf:"overrideRegistries"` OverrideImageNames map[string]string `koanf:"overrideImageNames"` }
ImageRegistries contains all the information regarding image registries
func (*ImageRegistries) DefaultRegistries ¶
func (i *ImageRegistries) DefaultRegistries()
DefaultRegistries sets default values for registries
func (ImageRegistries) FindRegistryByName ¶
func (i ImageRegistries) FindRegistryByName(name string) ImageRegistry
FindRegistryByName finds the configured registry by name, default is DockerHub
func (ImageRegistries) FindRegistryByOverrideByImage ¶
func (i ImageRegistries) FindRegistryByOverrideByImage(name string) (ImageRegistry, bool)
FindRegistryByOverrideByImage finds if the image has a registry override
func (ImageRegistries) FindRegistryByOverrideByURL ¶
func (i ImageRegistries) FindRegistryByOverrideByURL(url string) (ImageRegistry, bool)
FindRegistryByOverrideByURL finds if the URL has a registry override
func (ImageRegistries) FindRegistryByURL ¶
func (i ImageRegistries) FindRegistryByURL(url string) ImageRegistry
FindRegistryByURL finds the configured registry by URL, default is DockerHub
func (ImageRegistries) GetDefaultRegistry ¶
func (i ImageRegistries) GetDefaultRegistry() (ImageRegistry, bool)
GetDefaultRegistry finds the default configured registry
func (ImageRegistries) GetLatestVersionForImage ¶
func (i ImageRegistries) GetLatestVersionForImage(name, url string) string
GetLatestVersionForImage gets the latest version for image
type ImageRegistry ¶
type ImageRegistry struct { Name string `koanf:"name"` URL string `koanf:"url"` AuthType string `koanf:"authType"` Username string `koanf:"username"` Password string `koanf:"password"` Default bool `koanf:"default"` AllowAllReleases bool }
ImageRegistry contains all the information about the registry
func (ImageRegistry) GetLatestVersion ¶
func (r ImageRegistry) GetLatestVersion(name string) string
GetLatestVersion fetches the latest version of the docker image from Docker registry
type OverrideImage ¶
type OverrideImage struct { Images []string `koanf:"images"` Registry ImageRegistry `koanf:"registry"` RegistryName string `koanf:"registryName"` AllowAllReleases bool `koanf:"allowAllReleases"` }
OverrideImage contains information about which registry to use, it overrides the URL used in kubernetes
type OverrideRegistry ¶
type OverrideRegistry struct { Urls []string `koanf:"urls"` Registry ImageRegistry `koanf:"registry"` RegistryName string `koanf:"registryName"` AllowAllReleases bool `koanf:"allowAllReleases"` }
OverrideRegistry contains information about which registry to use, it overrides the URL used in kubernetes