Documentation ¶
Overview ¶
Package options provides functionality for adding options to components.
Options, in this context, are values that need to be added to components at runtime. Sometimes these are called 'last-mile' customizations. For example, you might want the Cluster IP or the Cluster Name to a specific value.
The parent options package provides common functionality and types while the subdirectories provide specific option-applying instances.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCommon ¶
func ApplyCommon(comp *bundle.Component, opts JSONOptions, objFn ObjHandler) (*bundle.Component, error)
ApplyCommon provides common functionality for applying options, deferring the specific object handling logic.
Types ¶
type Applier ¶
type Applier interface { // ApplyOptions applys options to some subset objects from the component. The // returned component should be copy of the original, with (perhaps) modifications made to the original. ApplyOptions(comp *bundle.Component, opts JSONOptions) (*bundle.Component, error) }
OptionsApplier represents an object that can take options and apply them to components.
type JSONOptions ¶
type JSONOptions map[string]interface{}
JSONOptions is an instance of options, represented as a JSON object encoded as map[string]interface{}. See more at the go docs for `encoding/json`.
type ObjHandler ¶
type ObjHandler func(obj *unstructured.Unstructured, ref bundle.ComponentReference, opts JSONOptions) (*unstructured.Unstructured, error)
ObjHandler is a function that can apply options to a Kubernetes object.
Directories ¶
Path | Synopsis |
---|---|
Package rawtexttmpl is a special-case option applier for adding options to objects with the assumption that objects have been inlined as go-templates via RawTextFiles ComponentSpec field into ConfigMaps.
|
Package rawtexttmpl is a special-case option applier for adding options to objects with the assumption that objects have been inlined as go-templates via RawTextFiles ComponentSpec field into ConfigMaps. |
Package simpletemplate contains helpers for applying options with the assumption that cluster objects are simple go templates.
|
Package simpletemplate contains helpers for applying options with the assumption that cluster objects are simple go templates. |