kubernetes

package
v1.223.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderKubectl   = "kubectl"
	ProviderKustomize = "kustomize"
)

Variables

This section is empty.

Functions

func Execute

func Execute(ctx *component.ExecutionContext, operation Operation) error

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

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL