Documentation
¶
Overview ¶
Package targetchart resolves the applications of a kubriX target type the way Argo CD does: it reads the bootstrap Application of the target type, renders the target chart with the values files it lists, and takes each rendered Application's chart path, value files, inline values and parameters.
Templates (*.yaml.tmpl) that a platform repository has not been bootstrapped with yet are rendered in memory with a customer config, so an upstream kubriX checkout can be analysed as well.
Index ¶
Constants ¶
const Dir = "platform-apps/target-chart"
Dir is the target chart inside a platform repository.
const RenderedSuffix = " (rendered)"
RenderedSuffix marks a layer that was rendered from a template, e.g. "values-x.yaml.tmpl (rendered)".
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
DefaultConfig is the customer config used when a repository has none: a plain Kubernetes cluster without DNS, as the platform installer renders it for an existing cluster.
func LoadConfig ¶
LoadConfig reads the customer config at path, or the repository's bootstrap/customer-config.yaml when path is empty, over the defaults of DefaultConfig: the installer always writes every key, while a repository's sample config may hold only a few.
func TargetTypes ¶
TargetTypes lists the target types of a repository: those with a bootstrap Application, and those with only a target values file.
func TargetTypesOf ¶
TargetTypesOf lists the target types named by repository paths, sorted: bootstrap-app-<type>.yaml at the root and platform-apps/target-chart/values-<type>.yaml, either possibly a template. Other paths are ignored.
Types ¶
type Options ¶
type Options struct {
// Repo is the platform repository root.
Repo string
// TargetType names bootstrap-app-<type>.yaml, or values-<type>.yaml in the target chart when there is no bootstrap Application.
TargetType string
// TargetValues is a target values file used instead of TargetType, layered over the target chart's defaults.
TargetValues string
// Config is the customer config templates are rendered with.
Config map[string]any
}
Options select what to resolve. Either TargetType (looked up in Repo) or TargetValues (an explicit profile file).