Documentation
¶
Overview ¶
Package clusteraddon contains function for cluster addon config operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Apply applies a helm chart. Apply = Action("apply") // Delete deletes a helm chart. Delete = Action("delete") )
View Source
var ErrConditionNotMatch = errors.New("condition don't match")
ErrConditionNotMatch is used when the specified CEL expression doesn't match in the stage.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { APIVersion string `yaml:"apiVersion"` ClusterAddonVersion string `yaml:"clusterAddonVersion"` AddonStages map[string][]*Stage `yaml:"addonStages"` }
Config is a configuration for multi-stage cluster addons.
func ParseConfig ¶
ParseConfig parses a file whose path is given and returns a config struct.
type Object ¶
type Object struct { Key string `yaml:"key"` APIVersion string `yaml:"apiVersion"` Name string `yaml:"name"` Kind string `yaml:"kind"` Namespace string `yaml:"namespace"` }
Object is a representation of a Kubernetes object plus a key for evaluating CEL expressions with that object.
type Stage ¶
type Stage struct { Name string `yaml:"name"` Action Action `yaml:"action"` WaitForPreCondition WaitForCondition `yaml:"waitForPreCondition,omitempty"` WaitForPostCondition WaitForCondition `yaml:"waitForPostCondition,omitempty"` }
Stage is a stage of a hook in which a certain Helm chart is applied and pre- and post-conditions are evaluated if they exist.
type WaitForCondition ¶
type WaitForCondition struct { Objects []Object `yaml:"objects"` Conditions string `yaml:"conditions"` }
WaitForCondition contains objects and conditions to use in CEL expressions.
Click to show internal directories.
Click to hide internal directories.