Documentation
¶
Index ¶
- Constants
- func Execute(ctx *component.ExecutionContext, operation Operation) error
- type ComponentProvider
- func (p *ComponentProvider) Execute(ctx *component.ExecutionContext) error
- func (p *ComponentProvider) GenerateArtifacts(ctx *component.ExecutionContext) error
- func (p *ComponentProvider) GetAvailableCommands() []string
- func (p *ComponentProvider) GetBasePath(atmosConfig *schema.AtmosConfiguration) string
- func (p *ComponentProvider) GetGroup() string
- func (p *ComponentProvider) GetType() string
- func (p *ComponentProvider) ListComponents(ctx context.Context, stack string, stackConfig map[string]any) ([]string, error)
- func (p *ComponentProvider) ValidateComponent(config map[string]any) error
- type Config
- type Operation
Constants ¶
const ( ProviderKubectl = "kubectl" ProviderKustomize = "kustomize" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComponentProvider ¶
type ComponentProvider struct{}
ComponentProvider implements the Atmos component.ComponentProvider interface for the native Kubernetes component type (render/diff/apply/deploy/delete).
func (*ComponentProvider) Execute ¶
func (p *ComponentProvider) Execute(ctx *component.ExecutionContext) error
Execute dispatches the requested subcommand to the corresponding Kubernetes operation.
func (*ComponentProvider) GenerateArtifacts ¶
func (p *ComponentProvider) GenerateArtifacts(ctx *component.ExecutionContext) error
GenerateArtifacts is a no-op for Kubernetes components; manifests are produced at execution time.
func (*ComponentProvider) GetAvailableCommands ¶
func (p *ComponentProvider) GetAvailableCommands() []string
GetAvailableCommands returns the subcommands supported by the Kubernetes component type.
func (*ComponentProvider) GetBasePath ¶
func (p *ComponentProvider) GetBasePath(atmosConfig *schema.AtmosConfiguration) string
GetBasePath returns the configured base path for Kubernetes components, or the default when unset.
func (*ComponentProvider) GetGroup ¶
func (p *ComponentProvider) GetGroup() string
GetGroup returns the human-readable group label used in command help ("Kubernetes").
func (*ComponentProvider) GetType ¶
func (p *ComponentProvider) GetType() string
GetType returns the component type identifier ("kubernetes").
func (*ComponentProvider) ListComponents ¶
func (p *ComponentProvider) ListComponents(ctx context.Context, stack string, stackConfig map[string]any) ([]string, error)
ListComponents returns the sorted names of Kubernetes components defined in the stack config.
func (*ComponentProvider) ValidateComponent ¶
func (p *ComponentProvider) ValidateComponent(config map[string]any) error
ValidateComponent validates a Kubernetes component config. Abstract components are skipped. The provider, when present, must be a string of "kubectl" or "kustomize"; a non-string provider is rejected so the type error surfaces at validation time.
type Config ¶
type Config struct {
BasePath string `yaml:"base_path" json:"base_path" mapstructure:"base_path"`
Provider string `yaml:"provider" json:"provider" mapstructure:"provider"`
AutoGenerateFiles bool `yaml:"auto_generate_files" json:"auto_generate_files" mapstructure:"auto_generate_files"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type Operation ¶
type Operation string
Operation identifies a Kubernetes component runtime operation.
const ( // OperationRender renders manifests without contacting the cluster. OperationRender Operation = "render" // OperationDiff computes a server-side dry-run diff against the cluster. OperationDiff Operation = "diff" // OperationApply applies manifests to the cluster. OperationApply Operation = "apply" // OperationDelete deletes the component's objects from the cluster. OperationDelete Operation = "delete" // OperationValidate validates rendered manifests (offline, plus an optional server-side dry-run). OperationValidate Operation = "validate" )