Documentation
¶
Index ¶
- Constants
- Variables
- type Chart
- type ChartSearchResult
- type HelmOverrideRegistry
- type HelmRegistries
- type HelmRegistry
- type ImageRegistries
- func (i *ImageRegistries) DefaultRegistries()
- func (i ImageRegistries) DetermineRegistry(name, url string) ImageRegistry
- 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 IndexEntries
- type IndexEntry
- type OverrideImage
- type OverrideRegistry
- type Packages
- type Repository
- type SearchResultData
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" // AuthTypeECR is ECR auth type AuthTypeECR = "ecr" )
Variables ¶
var ErrNoMorePages = errors.New("no more pages")
ErrNoMorePages defines that there are no more pages
Functions ¶
This section is empty.
Types ¶
type Chart ¶
type Chart struct {
Packages []Packages `json:"packages"`
}
Chart contains attribute information for a chart coming from hub.helm.sh
type ChartSearchResult ¶
type ChartSearchResult struct {
ID string `json:"package_id"`
}
ChartSearchResult contains chart search results from hub.helm.sh
type HelmOverrideRegistry ¶
type HelmOverrideRegistry struct { HelmRegistry HelmRegistry `koanf:"registry"` Charts []string `koanf:"charts"` AllowAllReleases bool `koanf:"allowAllReleases"` }
HelmOverrideRegistry contains information about which registry to use to fetch helm versions
type HelmRegistries ¶
type HelmRegistries struct { OverrideChartNames map[string]string `koanf:"overrideChartNames"` OverrideRegistries []HelmOverrideRegistry `koanf:"override"` }
HelmRegistries contains all the information regarding helm registries
func (HelmRegistries) GetLatestVersionFromHelm ¶
func (h HelmRegistries) GetLatestVersionFromHelm(chart string) string
GetLatestVersionFromHelm fetches the latest version of the helm chart
type HelmRegistry ¶
type HelmRegistry struct {
URL string `koanf:"url"`
}
HelmRegistry contains information about the helm registry
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) DetermineRegistry ¶
func (i ImageRegistries) DetermineRegistry(name, url string) ImageRegistry
DetermineRegistry gets the approriate registry for an image/url,
based on the override rules given within the config
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"` Region string `koanf:"region"` 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 IndexEntries ¶
type IndexEntries struct {
Entries map[string][]IndexEntry `yaml:"entries"`
}
IndexEntries contains configured Helm indexes
type IndexEntry ¶
IndexEntry the actual Helm index information
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
type Packages ¶
type Packages struct { Name string `json:"name"` Version string `json:"version"` Repository Repository `json:"repository,omitempty"` }
Attributes contains version information for a chart coming from hub.helm.sh
type Repository ¶
type Repository struct {
Name string `json:"name"`
}
type SearchResultData ¶
type SearchResultData struct {
Data []ChartSearchResult `json:"data"`
}
SearchResultData contains search results from hub.helm.sh