Documentation
¶
Overview ¶
Package plan builds, writes and reads the self-contained build artifact under .nelmwave/. Runtime commands (up/down/diff) read only the plan and never re-render templates, keeping CI deterministic.
Index ¶
Constants ¶
const ( // DefaultDir is the build output directory. DefaultDir = ".nelmwave" // PlanfileName is the plan file inside the build directory. PlanfileName = "planfile.yml" // ValuesDir holds merged per-release values (populated in a later milestone). ValuesDir = "values" // StoreDir holds resolved store files. It matches the "stores" datasource // namespace, so a path under .nelmwave/ and a `ds "stores/x"` reference read // the same way. StoreDir = "stores" // ChartsDir holds chart archives downloaded by `build --download-charts`. // Unlike values and stores it is keyed by chart, not by release: two // releases of the same chart share one archive. ChartsDir = "charts" )
Default locations of the build output.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Need ¶
Need is one resolved dependency edge of a plan release: the target uniqname and whether the dependency is optional (droppable when filtered out).
type Plan ¶
type Plan struct {
Project string `yaml:"project"`
Repositories map[string]config.Repository `yaml:"repositories,omitempty"`
Releases map[string]Release `yaml:"releases"`
}
Plan is the flat, fully-resolved deployment plan persisted to disk. Repositories and Releases are keyed by identity, mirroring the manifest. yaml.v3 marshals map keys in sorted order, so output is deterministic.
func FromConfig ¶
FromConfig projects a validated Config into a Plan.
func (*Plan) ReleaseNames ¶
ReleaseNames returns the release names in deterministic (sorted) order.
type Release ¶
type Release struct {
Labels map[string]string `yaml:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty"`
Needs []Need `yaml:"needs,omitempty"`
Chart config.Chart `yaml:"chart,omitempty"`
Values []config.FileRef `yaml:"values,omitempty"`
Sets map[string]any `yaml:"sets,omitempty"`
Stores []config.FileRef `yaml:"stores,omitempty"`
// Namespace creation policy and metadata for this release.
Namespace config.Namespace `yaml:"namespace"`
// Timeout bounds the operation ("5m"); empty means nelm's default.
Timeout string `yaml:"timeout,omitempty"`
// AutoRollback rolls back to the last deployed revision on failure.
AutoRollback bool `yaml:"autoRollback,omitempty"`
// Resource-handling policies, mirroring config.Release.
ForceAdoption bool `yaml:"forceAdoption,omitempty"`
RemoveManualChanges bool `yaml:"removeManualChanges"`
InstallCRDs bool `yaml:"installCRDs"`
DeletePropagation string `yaml:"deletePropagation,omitempty"`
HistoryLimit int `yaml:"historyLimit,omitempty"`
DriverURL string `yaml:"driverURL,omitempty"`
// ValuesFiles are the plan-relative paths to the resolved values files, in
// precedence order (lowest first: global values, then per-release). They are
// passed to nelm as-is; nelm performs the ordered Helm-style merge.
ValuesFiles []string `yaml:"valuesFiles,omitempty"`
// ChartFile is the plan-relative path to the chart archive `build
// --download-charts` fetched for this release. When set it replaces
// Chart.Name at apply time, so up/down/diff need no registry at all. Empty
// means the chart is still resolved against Repositories, as before.
ChartFile string `yaml:"chartFile,omitempty"`
}
Release is a plan entry for a single release, keyed by its uniqname ("name[@namespace[@kubecontext]]") in Plan.Releases. It mirrors config.Release but stores resolved dependency edges and artifact paths.