Documentation ¶
Index ¶
- Constants
- Variables
- func Equal(a, b string) (bool, error)
- func MoreRecentThan(a, b string) (bool, error)
- type ChartVersionRule
- type HelmDownloader
- func (lc *HelmDownloader) Cleanup() error
- func (lc *HelmDownloader) Download() error
- func (lc *HelmDownloader) FindLatestVersionAvailable() (string, error)
- func (lc HelmDownloader) GetChart() *chart.Metadata
- func (lc HelmDownloader) GetVersionRule() ChartVersionRule
- func (lc *HelmDownloader) Install(namespace string, values map[string]interface{}) (*release.Release, error)
- type HelmDownloaderConfig
Constants ¶
const ( // The default URL for getting the charts listing DefaultHelmRepoURL = "https://www.getambassador.io" // The default chart name DefaultChartName = "ambassador" )
Variables ¶
var ( // ErrUnknownHelmRepoScheme is unknown helm repo scheme ErrUnknownHelmRepoScheme = errors.New("unknown helm repo scheme") // ErrNoChartDirFound is no chart directory found ErrNoChartDirFound = errors.New("no chart directory found") )
Functions ¶
func MoreRecentThan ¶
MoreRecentThan returns True if a is more recent than b
Types ¶
type ChartVersionRule ¶
type ChartVersionRule struct {
// contains filtered or unexported fields
}
A chart version rule defines the rules for allowed chart versions
func NewChartVersionRule ¶
func NewChartVersionRule(ver string) (ChartVersionRule, error)
func (ChartVersionRule) Allowed ¶
func (cv ChartVersionRule) Allowed(s string) (bool, error)
Allowed returns true if the version provided is allowed by the ChartVersionRule
func (ChartVersionRule) String ¶
func (cv ChartVersionRule) String() string
type HelmDownloader ¶
type HelmDownloader struct { URL *url.URL Version ChartVersionRule KubeInfo *k8s.KubeInfo DownChartDir string // contains filtered or unexported fields }
HelmDownloader is a downloader for a remote Helm repo or a file, provided with an URL
func NewHelmDownloader ¶
func NewHelmDownloader(options HelmDownloaderConfig) (HelmDownloader, error)
NewHelmDownloader creates a new charts manager The Helm Manager will use the URL provided, and download (lazily) a Chart that obeys the Version Rule.
func (*HelmDownloader) Cleanup ¶
func (lc *HelmDownloader) Cleanup() error
Cleanup removed all the download directories
func (*HelmDownloader) Download ¶
func (lc *HelmDownloader) Download() error
GetReleaseMgr returns a manager for the latest
func (*HelmDownloader) FindLatestVersionAvailable ¶ added in v1.5.0
func (lc *HelmDownloader) FindLatestVersionAvailable() (string, error)
FindLatestVersionAvailable returns the latest version available in the repository (or file) specified in the `helmRepo`.
func (HelmDownloader) GetChart ¶
func (lc HelmDownloader) GetChart() *chart.Metadata
GetChart returns the metadata about the Chart that has been downloaded from URL with the given constraints (like the Version)
func (HelmDownloader) GetVersionRule ¶
func (lc HelmDownloader) GetVersionRule() ChartVersionRule
GetValues returns the version rules associated with this Helm manager
type HelmDownloaderConfig ¶ added in v1.10.0
type HelmDownloaderConfig struct { URL string KubeInfo *k8s.KubeInfo Version ChartVersionRule Logger *log.Logger }
HelmDownloaderConfig specifies options for creating the Helm manager