{"modulePath":"github.com/SovereignCloudStack/cluster-stack-operator","version":"v0.2.0-alpha.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package clusteraddon\n\nPackage clusteraddon contains function for cluster addon config operations.\n\n## Variables\n\n```go\nvar (\n\t// Apply applies a helm chart.\n\tApply = Action(\"apply\")\n\n\t// Delete deletes a helm chart.\n\tDelete = Action(\"delete\")\n)\n```\n\n```go\nvar ErrConditionNotMatch = errors.New(\"condition don't match\")\n```\nErrConditionNotMatch is used when the specified CEL expression doesn't match in the stage.\n\n## Types\n\n```go\ntype Action string\n```\nAction is the type for helm chart action (e.g. - apply, delete).\n\n```go\ntype Config struct {\n\tAPIVersion          string              `yaml:\"apiVersion\"`\n\tClusterAddonVersion string              `yaml:\"clusterAddonVersion\"`\n\tAddonStages         map[string][]*Stage `yaml:\"addonStages\"`\n}\n```\nConfig is a configuration for multi-stage cluster addons.\n\n```go\nfunc ParseConfig(path string) (Config, error)\n```\nParseConfig parses a file whose path is given and returns a config struct.\n\n```go\ntype Object struct {\n\tKey        string `yaml:\"key\"`\n\tAPIVersion string `yaml:\"apiVersion\"`\n\tName       string `yaml:\"name\"`\n\tKind       string `yaml:\"kind\"`\n\tNamespace  string `yaml:\"namespace\"`\n}\n```\nObject is a representation of a Kubernetes object plus a key for evaluating CEL expressions with that object.\n\n```go\ntype Stage struct {\n\tName                 string           `yaml:\"name\"`\n\tAction               Action           `yaml:\"action\"`\n\tWaitForPreCondition  WaitForCondition `yaml:\"waitForPreCondition,omitempty\"`\n\tWaitForPostCondition WaitForCondition `yaml:\"waitForPostCondition,omitempty\"`\n}\n```\nStage is a stage of a hook in which a certain Helm chart is applied and pre- and post-conditions are evaluated if they exist.\n\n```go\ntype WaitForCondition struct {\n\tObjects    []Object `yaml:\"objects\"`\n\tConditions string   `yaml:\"conditions\"`\n}\n```\nWaitForCondition contains objects and conditions to use in CEL expressions.\n\n","path":"github.com/SovereignCloudStack/cluster-stack-operator/pkg/clusteraddon","name":"clusteraddon","synopsis":"Package clusteraddon contains function for cluster addon config operations.","isRedistributable":true}
