Documentation
¶
Index ¶
- func NewDoguStepGenerator(client kubernetes.Interface, clusterConfig *rest.Config, dogus context.Dogus, ...) (*doguStepGenerator, error)
- func NewResourcePatchStep(phase patch.Phase, patcher resourcePatcher, patches []patch.ResourcePatch) *resourcePatchStep
- func NewValidatorStep(registry remote.Registry, setupCtx *appcontext.SetupContext) *setupValidatorStep
- func SetupAPI(ctx context.Context, router ginRoutes, clusterConfig *rest.Config, ...)
- type Executor
- func (e *Executor) PerformSetup(ctx context.Context) (err error, errCausingAction string)
- func (e *Executor) RegisterComponentSetupSteps() error
- func (e *Executor) RegisterDataSetupSteps(etcdRegistry registry.Registry) error
- func (e *Executor) RegisterDoguInstallationSteps() error
- func (e *Executor) RegisterLoadBalancerFQDNRetrieverSteps() error
- func (e *Executor) RegisterSSLGenerationStep() error
- func (e *Executor) RegisterSetupSteps(steps ...ExecutorStep)
- func (e *Executor) RegisterValidationStep() error
- type ExecutorStep
- type SetupExecutor
- type Starter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDoguStepGenerator ¶ added in v0.4.0
func NewDoguStepGenerator(client kubernetes.Interface, clusterConfig *rest.Config, dogus context.Dogus, registry remote.Registry, namespace string) (*doguStepGenerator, error)
NewDoguStepGenerator creates a new generator capable of generating dogu installation steps.
func NewResourcePatchStep ¶ added in v0.16.0
func NewResourcePatchStep(phase patch.Phase, patcher resourcePatcher, patches []patch.ResourcePatch) *resourcePatchStep
NewResourcePatchStep creates a new setup step which patches arbitrary Kubernetes resources according the given setup phase.
func NewValidatorStep ¶ added in v0.4.0
func NewValidatorStep(registry remote.Registry, setupCtx *appcontext.SetupContext) *setupValidatorStep
NewValidatorStep creates a new setup step to validate the setup configuration.
func SetupAPI ¶
func SetupAPI(ctx context.Context, router ginRoutes, clusterConfig *rest.Config, k8sClient kubernetes.Interface, setupContextBuilder *appcontext.SetupContextBuilder)
SetupAPI setups the REST API for configuration information
Types ¶
type Executor ¶
type Executor struct {
// SetupContext contains information about the current context.
SetupContext *appcontext.SetupContext
// ClientSet is the actual k8s client responsible for the k8s API communication.
ClientSet kubernetes.Interface
// ClusterConfig is the current rest config used to create a kubernetes clients.
ClusterConfig *rest.Config
// Steps contains all necessary steps for the setup
Steps []ExecutorStep
// Registry is the dogu registry
Registry remote.Registry
}
Executor is responsible to perform the actual steps of the setup.
func NewExecutor ¶
func NewExecutor(clusterConfig *rest.Config, k8sClient kubernetes.Interface, setupCtx *appcontext.SetupContext) (*Executor, error)
NewExecutor creates a new setup executor with the given app configuration.
func (*Executor) PerformSetup ¶
PerformSetup starts the setup and executes all registered setup steps
func (*Executor) RegisterComponentSetupSteps ¶ added in v0.4.0
RegisterComponentSetupSteps adds all setup steps responsible to install vital components into the ecosystem.
func (*Executor) RegisterDataSetupSteps ¶ added in v0.4.0
RegisterDataSetupSteps adds all setup steps responsible to read, write, or verify data needed by the setup.
func (*Executor) RegisterDoguInstallationSteps ¶ added in v0.4.0
RegisterDoguInstallationSteps creates install steps for the dogu install list
func (*Executor) RegisterLoadBalancerFQDNRetrieverSteps ¶ added in v0.16.0
RegisterLoadBalancerFQDNRetrieverSteps registers the steps for creating a loadbalancer retrieving the fqdn
func (*Executor) RegisterSSLGenerationStep ¶ added in v0.4.0
RegisterSSLGenerationStep registers all ssl steps
func (*Executor) RegisterSetupSteps ¶ added in v0.18.0
func (e *Executor) RegisterSetupSteps(steps ...ExecutorStep)
RegisterSetupSteps adds a new step to the setup
func (*Executor) RegisterValidationStep ¶ added in v0.4.0
RegisterValidationStep registers all validation steps
type ExecutorStep ¶
type ExecutorStep interface {
// GetStepDescription returns the description of the setup step. The Executor prints the description of every step
// when executing the setup.
GetStepDescription() string
// PerformSetupStep is called for every registered step when executing the setup.
PerformSetupStep(ctx context.Context) error
}
ExecutorStep describes a valid step in the setup.
type SetupExecutor ¶ added in v0.4.0
type SetupExecutor interface {
// RegisterLoadBalancerFQDNRetrieverSteps registers the FQDN retriever step
RegisterLoadBalancerFQDNRetrieverSteps() error
// RegisterSSLGenerationStep registers all ssl steps
RegisterSSLGenerationStep() error
// RegisterValidationStep registers all validation steps
RegisterValidationStep() error
// RegisterComponentSetupSteps adds all setup steps responsible to install vital components into the ecosystem.
RegisterComponentSetupSteps() error
// RegisterDataSetupSteps adds all setup steps responsible to read, write, or verify data needed by the setup.
RegisterDataSetupSteps(registry.Registry) error
// RegisterDoguInstallationSteps creates install steps for the dogu install list
RegisterDoguInstallationSteps() error
// PerformSetup starts the setup and executes all registered setup steps
PerformSetup(ctx context.Context) (error, string)
}
SetupExecutor is uses to register all necessary steps and executes them
type Starter ¶ added in v0.4.0
type Starter struct {
EtcdRegistry registry.Registry
ClientSet kubernetes.Interface
ClusterConfig *rest.Config
SetupContext *appcontext.SetupContext
Namespace string
SetupExecutor SetupExecutor
}
Starter is used to init and start the setup process
func NewStarter ¶ added in v0.4.0
func NewStarter(ctx context.Context, clusterConfig *rest.Config, k8sClient kubernetes.Interface, setupContextBuilder *appcontext.SetupContextBuilder) (*Starter, error)
NewStarter creates a new setup starter struct which one inits registries and starts the setup process