Documentation ¶
Index ¶
- func PopulateGlobalCatalog(options ...PopulateOption) error
- type Catalog
- func (c Catalog) AppVersions(name string) []string
- func (c *Catalog) Append(chart *chart.Chart)
- func (c Catalog) Empty() bool
- func (c Catalog) First() *chart.Chart
- func (c Catalog) Names() []string
- func (c *Catalog) Populate(options ...PopulateOption) error
- func (c Catalog) Query(criteria ...Criterion) Catalog
- func (c Catalog) Versions(name string) []string
- type Criterion
- type PopulateConfig
- type PopulateOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PopulateGlobalCatalog ¶
func PopulateGlobalCatalog(options ...PopulateOption) error
PopulateGlobalCatalog uses the provided options to populate the existing Charts into the global Chart catalog.
Call this function only once when the controller initializes.
Types ¶
type Catalog ¶
Catalog is a list of available Helm Charts. Use different criteria with Query functions to select the desired Charts from the catalog.
func GlobalCatalog ¶
func GlobalCatalog() Catalog
GlobalCatalog returns the global Chart catalog. This catalog is created once and is accessible globally.
Do not change the content of this catalog directly.
func (Catalog) AppVersions ¶
AppVersions returns the list of the available appVersions of the named Chart in this catalog.
func (*Catalog) Append ¶
Append adds a new chart to the catalog. It ensures that the new chart has a valid metadata and a chart with the same name and version does not exist in the catalog.
func (Catalog) Empty ¶
Empty returns true when the catalog is empty. This is useful to check the results from the Query function.
func (Catalog) First ¶
First returns the first element of the catalog or nil if the catalog is empty. This is useful to retrieve results from the Query function.
func (*Catalog) Populate ¶
func (c *Catalog) Populate(options ...PopulateOption) error
Populate uses the provided options to populate the existing Charts into the catalog.
Currently it can only populate Charts from the local file system using a set of search paths and file name patterns. If a directory or an archive file in the specified search paths contain a chart it loads it and appends it to the catalog.
type Criterion ¶
Criterion is a single criterion for querying Chart catalog. If a Chart matches the criterion it must return true.
func All ¶
Any combines the provided Chart query criteria and succeeds when all of them return true.
func Any ¶
Any combines the provided Chart query criteria and succeeds when any of them returns true.
func None ¶
None combines the provided Chart query criteria and succeeds when none of them return true.
func WithAppVersion ¶
WithName matches the Chart appVersion.
type PopulateConfig ¶
type PopulateConfig struct { Logger logr.Logger SearchPaths []string FilePatterns []string // contains filtered or unexported fields }
PopulateConfig is the configuration used for populating available Helm Charts to the controller.
Currently it only supports searching the local file system with a set of search paths and file name patterns.
type PopulateOption ¶
type PopulateOption = func(*PopulateConfig)
PopulateOption represents an individual Chart population option. The available options are:
- WithSearchPath
- WithFilePattern
- WithLogger
- WithContext
See each option for further details.