Documentation ¶
Index ¶
- func Include(chartFilter []string, chartName string) bool
- func LabelSelector(c *Chart) string
- func LoadValues(files ...string) (map[interface{}]interface{}, error)
- func Render(config *Config) (map[string]string, error)
- func ValuesForChart(chartName string, values map[interface{}]interface{}) (map[interface{}]interface{}, error)
- type Chart
- type Config
- type HookExecutor
- type NoopHookExecutor
- type Processor
- type ReverseVisitor
- type Visitor
- type VisitorFunc
- type VisitorOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Include ¶
Include returns true if chartName is included in chartFilter or if chartFilter is empty.
func LabelSelector ¶ added in v0.0.2
LabelSelector builds valid label selector for a *resource.Builder that selects all resources associated to the chart. See doc of const LabelChartName for more information.
func LoadValues ¶
LoadValues loads yaml files and stores the contents of provided files into a map. The contents are merged left to right, and will overwrite keys present in files that are loaded earlier. This makes it possible to layer values files.
func Render ¶
Render takes a chart config and renders the chart. It returns a map of template filepaths and their rendered contents.
func ValuesForChart ¶
func ValuesForChart(chartName string, values map[interface{}]interface{}) (map[interface{}]interface{}, error)
ValuesForChart extracts the necessary parts of the values for given chart.
Types ¶
type Chart ¶
Chart is a rendered chart with the config used for rendering, a list of chart resources and a map of chart hooks.
type HookExecutor ¶
type HookExecutor interface { // ExecHooks takes a chart and executes all hooks of type hookType that are // defined in the chart. Depending on the configuration of the hooks it may // returns errors if hooks fail or not. Should return all other errors that // occur while hook execution. ExecHooks(c *Chart, hookType string) error }
HookExecutor executes chart lifecycle hooks
func NewHookExecutor ¶ added in v0.0.2
func NewHookExecutor( streams genericclioptions.IOStreams, client dynamic.Interface, mapper meta.RESTMapper, printer printers.ContextPrinter, dryRun bool, ) HookExecutor
NewHookExecutor creates a new HookExecutor.
type NoopHookExecutor ¶ added in v0.0.2
type NoopHookExecutor struct{}
NoopHookExecutor does not execute any hooks.
type Processor ¶
Processor type processes a chart config and renders the contained resources. It will also perform post-processing on these resources.
func NewDefaultProcessor ¶
func NewDefaultProcessor() *Processor
NewDefaultProcessor creates a new *Processor value.
func NewProcessor ¶
NewProcessor creates a new *Processor values which uses given decoder to decode rendered chart templates.
type ReverseVisitor ¶
type ReverseVisitor struct {
Visitor Visitor
}
ReverseVisitor wraps a Visitor and visits all charts in the reverse order.
func NewReverseVisitor ¶
func NewReverseVisitor(visitor Visitor) *ReverseVisitor
NewReverseVisitor creates a new *ReverseVisitor which wraps visitor.
func (*ReverseVisitor) Visit ¶
func (v *ReverseVisitor) Visit(fn VisitorFunc) error
Visit implements Visitor.
type Visitor ¶
type Visitor interface { // Visit accepts a function that is called for every chart the visitor // encounters. Visit(fn VisitorFunc) error }
Visitor is a type that visits charts.
func NewVisitor ¶
func NewVisitor(p *Processor, o VisitorOptions) Visitor
NewVisitor creates a new *Visitor which uses given *Processor and VisitorOptions to process charts.
type VisitorFunc ¶
VisitorFunc is the signature of a function that is called for every chart that is encountered by the visitor.