Documentation
¶
Overview ¶
Package helm generates per-component Helm bundles from recipe results.
Per-component folder layout (NNN-prefixed, written by pkg/bundler/deployer/localformat):
- NNN-<component>/install.sh: Per-folder install script
- NNN-<component>/values.yaml: Static Helm values
- NNN-<component>/cluster-values.yaml: Per-cluster dynamic values
- NNN-<component>/upstream.env: CHART/REPO/VERSION (upstream-helm folders)
- NNN-<component>/Chart.yaml + templates/: Local chart (local-helm folders)
Top-level files (owned by this deployer):
- README.md: Root deployment guide with ordered steps
- deploy.sh: Automation script (0755)
- undeploy.sh: Reverse-order uninstall script (0755)
- checksums.txt: SHA256 digests for verification (optional)
Usage:
generator := &helm.Generator{
RecipeResult: recipeResult,
ComponentValues: componentValues,
Version: "1.0.0",
IncludeChecksums: true,
}
output, err := generator.Generate(ctx, "/path/to/output")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentData ¶
type ComponentData struct {
Name string
Namespace string
Repository string
ChartName string
Version string // Original version string (preserves 'v' prefix) for helm install --version
IsOCI bool
Tag string // Git ref for Kustomize-typed components (tag/branch/commit)
Path string // Path within the repository to the kustomization
}
ComponentData contains data for rendering per-component template blocks. The helm deployer no longer owns per-component folder content (localformat does). ComponentData now carries only the fields needed by the orchestration templates: README.md's component table and deploy.sh / undeploy.sh name-matched special-case blocks.
type Generator ¶
type Generator struct {
// RecipeResult contains the recipe metadata and component references.
RecipeResult *recipe.RecipeResult
// ComponentValues maps component names to their values.
// These are collected from individual bundlers.
ComponentValues map[string]map[string]any
// Version is the bundler version (from CLI/bundler version).
Version string
// IncludeChecksums indicates whether to generate a checksums.txt file.
IncludeChecksums bool
// ComponentManifests maps component name → manifest path → content.
// Each component's manifests are placed in its own manifests/ subdirectory.
ComponentManifests map[string]map[string][]byte
// DataFiles lists additional file paths (relative to output dir) to include
// in checksum generation. Used for external data files copied into the bundle.
DataFiles []string
// DynamicValues maps component names to their dynamic value paths.
// These paths are removed from values.yaml and written to cluster-values.yaml.
DynamicValues map[string][]string
}
Generator creates per-component Helm bundles from recipe results. Configure it with the required fields, then call Generate.
func (*Generator) Generate ¶
Generate creates a per-component Helm bundle from the configured generator fields. Per-component folder content (Chart.yaml, values.yaml, install.sh, templates/*) is delegated to pkg/bundler/deployer/localformat. The helm deployer owns only the top-level orchestration: README.md, deploy.sh, undeploy.sh, and checksums.