Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureForComponent ¶
EnsureForComponent parses the raw plugin declarations and installs any that are missing, returning the managed HELM_PLUGINS directory.
When no plugins are declared it returns an empty string so callers leave HELM_PLUGINS untouched, preserving the user's default Helm plugin behavior.
func ExtractSpecs ¶
ExtractSpecs reads the `plugins` section from a component configuration map and returns the declared plugin specs as strings. Non-string entries are coerced with fmt so templated values render predictably. Returns nil when the section is absent or empty.
func KnownAliases ¶
func KnownAliases() []string
KnownAliases returns the sorted list of built-in plugin aliases. Used to build helpful error hints when an unknown alias is supplied.
func ManagedDir ¶
func ManagedDir() string
ManagedDir returns the default managed HELM_PLUGINS directory, derived from the toolchain install path.
The path is resolved to absolute: helmfile runs helm from the component's working directory, so a HELM_PLUGINS value relative to the Atmos base directory (e.g. a configured `.tools`) would not resolve there and helm would fail to find installed plugins like helm-diff. This mirrors how toolchain binary PATH entries are absolutized (see pkg/dependencies/environment.go).
Types ¶
type InstalledPlugin ¶
InstalledPlugin describes a plugin reported by `helm plugin list`.
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
Installer installs and inspects Helm plugins in an Atmos-managed directory.
func NewInstaller ¶
NewInstaller creates an Installer for the given helm binary path.
func (*Installer) EnsurePlugins ¶
EnsurePlugins makes sure every spec is installed at the requested version in the managed directory and returns that directory (suitable for HELM_PLUGINS).
Already-satisfied plugins are skipped. A plugin present at a different pinned version is reinstalled to honor the declared version.
type Option ¶
type Option func(*Installer)
Option configures an Installer.
func WithRunner ¶
WithRunner overrides the subprocess runner (used in tests).
type Runner ¶
type Runner interface {
// Run executes name with args. extraEnv entries (KEY=VALUE) are appended to
// the current environment. It returns combined stdout and stderr separately.
Run(ctx context.Context, name string, args, extraEnv []string) (stdout, stderr string, err error)
}
Runner abstracts subprocess execution so the installer can be unit-tested without a real helm binary.
type Spec ¶
type Spec struct {
// Name is a human-friendly label for the plugin (the alias or repo name),
// used in log/UI messages.
Name string
// URL is the install URL passed to `helm plugin install`.
URL string
// Version is a concrete tag/ref (e.g. "v3.9.4") or empty / "latest" to
// install the latest released version.
Version string
// Raw is the original, unparsed declaration.
Raw string
}
Spec is a parsed Helm plugin declaration.
It is produced from a compact string in one of the following forms:
- short alias: "diff" or "diff@v3.9.4"
- owner/repo: "databus23/helm-diff" or "databus23/helm-diff@v3.9.4"
- full URL: "https://github.com/databus23/helm-diff@v3.9.4"
func ParseSpecs ¶
ParseSpecs parses a list of compact plugin declarations.