stages

package
v1.0.0-rc07 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStage

type BaseStage struct {
	// contains filtered or unexported fields
}

BaseStage provides common functionality for generation stages. Concrete stages can embed this to inherit default behavior.

func NewBaseStage

func NewBaseStage(name, description string, dependencies []string) BaseStage

NewBaseStage creates a new base stage with the given properties.

func (BaseStage) Dependencies

func (bs BaseStage) Dependencies() []string

Dependencies returns the stage dependencies.

func (BaseStage) Description

func (bs BaseStage) Description() string

Description returns the stage description.

func (BaseStage) DryRun

func (bs BaseStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)

DryRun is a default implementation that returns an empty plan. Concrete stages should override this method.

func (BaseStage) Execute

func (bs BaseStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Execute is a default implementation that does nothing. Concrete stages should override this method.

func (BaseStage) Name

func (bs BaseStage) Name() string

Name returns the stage name.

func (BaseStage) Rollback

func (bs BaseStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Rollback is a default implementation that does nothing. Concrete stages should override this method if they need rollback logic.

func (BaseStage) Validate

func (bs BaseStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Validate is a default implementation that always succeeds. Concrete stages should override this method if they need validation logic.

type ConfigStage

type ConfigStage struct {
	BaseStage
	// contains filtered or unexported fields
}

ConfigStage generates cluster-specific configuration files. This stage creates configuration files like kustomization.yaml, cluster overlays, and other cluster-specific settings that tie together the infrastructure and services.

func NewConfigStage

func NewConfigStage(engine template.TemplateEngine, registry template.TemplateRegistry) *ConfigStage

NewConfigStage creates a new configuration generation stage.

func (*ConfigStage) DryRun

func (cs *ConfigStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)

DryRun returns a plan of what this stage would create.

func (*ConfigStage) Execute

func (cs *ConfigStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Execute generates the cluster-specific configuration files.

func (*ConfigStage) Rollback

func (cs *ConfigStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Rollback removes the configuration files created by this stage.

func (*ConfigStage) Validate

func (cs *ConfigStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Validate checks that the configuration files were generated correctly.

type InfrastructureStage

type InfrastructureStage struct {
	BaseStage
	// contains filtered or unexported fields
}

InfrastructureStage generates provider-specific infrastructure templates. This stage creates the infrastructure configuration files based on the cluster's provider (OpenStack, AWS, baremetal, etc.).

func NewInfrastructureStage

func NewInfrastructureStage(engine template.TemplateEngine, registry template.TemplateRegistry) *InfrastructureStage

NewInfrastructureStage creates a new infrastructure generation stage.

func (*InfrastructureStage) DryRun

func (is *InfrastructureStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)

DryRun returns a plan of what this stage would create.

func (*InfrastructureStage) Execute

func (is *InfrastructureStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Execute generates the infrastructure templates for the configured provider.

func (*InfrastructureStage) Rollback

func (is *InfrastructureStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Rollback removes the infrastructure files created by this stage.

func (*InfrastructureStage) Validate

func (is *InfrastructureStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Validate checks that the infrastructure templates were generated correctly.

type InitStage

type InitStage struct {
	BaseStage
}

InitStage creates the base directory structure for the GitOps repository. This is typically the first stage in the generation pipeline.

func NewInitStage

func NewInitStage() *InitStage

NewInitStage creates a new initialization stage.

func (*InitStage) DryRun

func (is *InitStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)

DryRun returns a plan of what this stage would create.

func (*InitStage) Execute

func (is *InitStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Execute creates the base directory structure.

func (*InitStage) Rollback

func (is *InitStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Rollback removes the directories created by this stage.

func (*InitStage) Validate

func (is *InitStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Validate checks that the base structure was created correctly.

type ServiceStage

type ServiceStage struct {
	BaseStage
	// contains filtered or unexported fields
}

ServiceStage generates service-specific templates for enabled services. This stage creates the service configuration files based on which services are enabled in the cluster configuration.

func NewServiceStage

func NewServiceStage(
	engine template.TemplateEngine,
	templateRegistry template.TemplateRegistry,
	serviceRegistry services.ServiceRegistry,
) *ServiceStage

NewServiceStage creates a new service generation stage.

func (*ServiceStage) DryRun

func (ss *ServiceStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)

DryRun returns a plan of what this stage would create.

func (*ServiceStage) Execute

func (ss *ServiceStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Execute generates the service templates for enabled services.

func (*ServiceStage) Rollback

func (ss *ServiceStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Rollback removes the service files created by this stage.

func (*ServiceStage) Validate

func (ss *ServiceStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Validate checks that the service templates were generated correctly.

type ValidationStage

type ValidationStage struct {
	BaseStage
}

ValidationStage validates that the generated GitOps repository structure meets all requirements before completion. This stage should typically be the last stage in the generation pipeline.

func NewValidationStage

func NewValidationStage(dependencies []string) *ValidationStage

NewValidationStage creates a new validation stage. This stage depends on all other generation stages completing first.

func (*ValidationStage) DryRun

func (vs *ValidationStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)

DryRun returns a plan for the validation stage.

func (*ValidationStage) Execute

func (vs *ValidationStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Execute validates the generated repository structure. This performs comprehensive checks to ensure all required components exist.

func (*ValidationStage) Rollback

func (vs *ValidationStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Rollback is a no-op for validation stage since it doesn't modify anything.

func (*ValidationStage) Validate

func (vs *ValidationStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error

Validate checks that validation completed successfully. For the validation stage itself, this is a no-op since Execute already validates.

Jump to

Keyboard shortcuts

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