Documentation
¶
Overview ¶
Package helmfile provides utilities for helmfile configuration and execution, including EKS cluster name resolution and AWS authentication handling.
Package helmfile provides utilities for helmfile configuration and execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTargetFlag ¶ added in v1.222.0
ExtractTargetFlag removes the Atmos `--target[=value]` flag from a helmfile argument list and returns the selected target plus the remaining args. Both `--target X` and `--target=X` forms are supported.
func RenderAndDeliver ¶ added in v1.222.0
func RenderAndDeliver(ctx context.Context, in *RenderDeliverInput) (string, error)
RenderAndDeliver runs `helmfile template`, captures the rendered manifests, and delivers them to the selected provision target. When the selected target is the implicit cluster (no external target), the rendered manifests are written to stdout instead.
Types ¶
type AuthInput ¶
type AuthInput struct {
// Identity is the value from --identity flag (highest priority).
Identity string
// ProfilePattern is the helm_aws_profile_pattern from config (deprecated).
ProfilePattern string
}
AuthInput contains all possible sources for AWS auth resolution.
type AuthResult ¶
type AuthResult struct {
// UseIdentityAuth is true if identity-based authentication should be used.
UseIdentityAuth bool
// Profile is the AWS profile name (only set if UseIdentityAuth is false).
Profile string
// Source indicates where the auth came from.
Source string
// IsDeprecated is true if the source uses deprecated configuration.
IsDeprecated bool
}
AuthResult contains the resolved AWS authentication information.
func ResolveAWSAuth ¶
func ResolveAWSAuth(input AuthInput, context *Context) (*AuthResult, error)
ResolveAWSAuth determines the AWS authentication method with precedence: 1. The --identity flag (highest - uses identity system). 2. The helm_aws_profile_pattern (deprecated, logs warning). The context parameter must be non-nil when using helm_aws_profile_pattern.
type ClusterNameInput ¶
type ClusterNameInput struct {
// FlagValue is the value from --cluster-name flag (highest priority).
FlagValue string
// ConfigValue is the value from cluster_name in config.
ConfigValue string
// Template is the cluster_name_template value (Go template syntax).
Template string
// Pattern is the cluster_name_pattern value (deprecated token syntax).
Pattern string
}
ClusterNameInput contains all possible sources for cluster name resolution.
type ClusterNameResult ¶
type ClusterNameResult struct {
// ClusterName is the resolved cluster name.
ClusterName string
// Source indicates where the cluster name came from.
Source string
// IsDeprecated is true if the source uses deprecated configuration.
IsDeprecated bool
}
ClusterNameResult contains the resolved cluster name and metadata.
func ResolveClusterName ¶
func ResolveClusterName( input ClusterNameInput, context *Context, atmosConfig *schema.AtmosConfiguration, componentSection map[string]any, templateProcessor TemplateProcessor, ) (*ClusterNameResult, error)
ResolveClusterName determines the EKS cluster name with precedence: 1. The --cluster-name flag (highest - always overrides). 2. The cluster_name in config. 3. The cluster_name_template expanded (Go template syntax). 4. The cluster_name_pattern expanded (deprecated, logs warning).
type RenderDeliverInput ¶ added in v1.222.0
type RenderDeliverInput struct {
AtmosConfig *schema.AtmosConfiguration
Info *schema.ConfigAndStacksInfo
Command string // Resolved helmfile binary.
Args []string // Full helmfile args (including the `template` subcommand).
WorkingDir string // Component working directory.
EnvVars []string // Environment for the helmfile process.
ProvisionSection map[string]any // The component's `provision:` section.
FlagTarget string // The selected `--target` value (may be empty).
EnvProvider target.IdentityEnvironmentProvider
}
RenderDeliverInput carries everything needed to render a helmfile to manifests and deliver them to a provision target.
type TemplateProcessor ¶
type TemplateProcessor func( atmosConfig *schema.AtmosConfiguration, tmplName string, tmplValue string, tmplData any, ignoreMissingTemplateValues bool, ) (string, error)
TemplateProcessor is a function that processes Go templates. This allows injecting the template processor for testing.