Documentation
¶
Index ¶
- type BaseStage
- func (bs BaseStage) Dependencies() []string
- func (bs BaseStage) Description() string
- func (bs BaseStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)
- func (bs BaseStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (bs BaseStage) Name() string
- func (bs BaseStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (bs BaseStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- type ConfigStage
- func (cs *ConfigStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)
- func (cs *ConfigStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (cs *ConfigStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (cs *ConfigStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- type InfrastructureStage
- func (is *InfrastructureStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)
- func (is *InfrastructureStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (is *InfrastructureStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (is *InfrastructureStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- type InitStage
- func (is *InitStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)
- func (is *InitStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (is *InitStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (is *InitStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- type ServiceStage
- func (ss *ServiceStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)
- func (ss *ServiceStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (ss *ServiceStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (ss *ServiceStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- type ValidationStage
- func (vs *ValidationStage) DryRun(ctx context.Context, cfg v2.Config) (*gitops.StagePlan, error)
- func (vs *ValidationStage) Execute(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (vs *ValidationStage) Rollback(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
- func (vs *ValidationStage) Validate(ctx context.Context, workspace *gitops.GitOpsWorkspace) error
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 ¶
NewBaseStage creates a new base stage with the given properties.
func (BaseStage) Dependencies ¶
Dependencies returns the stage dependencies.
func (BaseStage) Description ¶
Description returns the stage description.
func (BaseStage) DryRun ¶
DryRun is a default implementation that returns an empty plan. Concrete stages should override this method.
func (BaseStage) Execute ¶
Execute is a default implementation that does nothing. Concrete stages should override this method.
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) 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.
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) 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) 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.