Documentation ¶
Index ¶
Constants ¶
const ( CreateBootstrapCluster workflow.TaskName = "CreateBootstrapCluster" CreateWorkloadCluster workflow.TaskName = "CreateWorkloadCluster" DeleteBootstrapCluster workflow.TaskName = "DeleteBootstrapCluster" )
Define tasks names for each task run as part of the create cluster workflow. To aid readability the order of task names should be representative of the order of execution.
const ( PreDeleteClusterTaskName workflow.TaskName = "PreDeleteManagementCluster" PostDeleteClusterTaskName workflow.TaskName = "PostDeleteManagementCluster" )
const ( PreUpgradeClusterTaskName workflow.TaskName = "PreUpgradeManagementCluster" PostUpgradeClusterTaskName workflow.TaskName = "PostUpgradeManagementCluster" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCluster ¶
type CreateCluster struct { // The spec used to construcft all other dependencies. Spec *cluster.Spec // CreateBootstrapOptions supplies bootstrap cluster options for creating bootstrap clusters. CreateBootstrapClusterOptions bootstrap.OptionsRetriever // Bootstrapper creates and destroys bootstrap clusters. Bootstrapper bootstrap.Bootstrapper // Cluster represents a logical cluster to be created. Cluster workload.Cluster // CNIInstaller installs a CNI in a Kubernetes cluster CNIInstaller workload.CNIInstaller // FS is a file system abstraction used to write files. FS filewriter.FileWriter // contains filtered or unexported fields }
CreateCluster defines the configuration for a managment cluster creation workflow. It executes tasks in the following order:
- CreateBootstrapCluster
- DeleteBootstrapCluster
func (CreateCluster) Run ¶
func (c CreateCluster) Run(ctx context.Context) error
Run runs the create cluster workflow.
func (*CreateCluster) WithHookRegistrar ¶
func (c *CreateCluster) WithHookRegistrar(registrar CreateClusterHookRegistrar) *CreateCluster
WithHookRegistrar adds a hook registrar to the create cluster workflow builder.
type CreateClusterHookRegistrar ¶
type CreateClusterHookRegistrar interface {
RegisterCreateManagementClusterHooks(workflow.HookBinder)
}
CreateClusterHookRegistrar is a Hook registrar that binds hooks to a create management cluster workflow.
type DeleteClusterBuilder ¶
type DeleteClusterBuilder struct {
HookRegistrars []DeleteClusterHookRegistrar
}
DeleteClusterBuilder defines the configuration for a management cluster deletion workflow.
func (*DeleteClusterBuilder) Build ¶
func (cfg *DeleteClusterBuilder) Build() (*workflow.Workflow, error)
Build builds the delete cluster workflow.
func (*DeleteClusterBuilder) WithHookRegistrar ¶
func (b *DeleteClusterBuilder) WithHookRegistrar(registrar DeleteClusterHookRegistrar) *DeleteClusterBuilder
WithHookRegistrar adds a hook registrar to the delete cluster workflow builder.
type DeleteClusterHookRegistrar ¶
type DeleteClusterHookRegistrar interface {
RegisterDeleteManagementClusterHooks(workflow.HookBinder)
}
DeleteClusterHookRegistrar is a Hook registrar that binds hooks to a delete management cluster workflow.
type UpgradeClusterBuilder ¶
type UpgradeClusterBuilder struct {
HookRegistrars []UpgradeClusterHookRegistrar
}
UpgradeClusterBuilder defines the configuration for a management cluster upgrade workflow.
func (*UpgradeClusterBuilder) Build ¶
func (cfg *UpgradeClusterBuilder) Build() (*workflow.Workflow, error)
Build builds the upgrade cluster workflow.
func (*UpgradeClusterBuilder) WithHookRegistrar ¶
func (b *UpgradeClusterBuilder) WithHookRegistrar(registrar UpgradeClusterHookRegistrar) *UpgradeClusterBuilder
WithHookRegistrar adds a hook registrar to the upgrade cluster workflow builder.
type UpgradeClusterHookRegistrar ¶
type UpgradeClusterHookRegistrar interface {
RegisterUpgradeManagementClusterHooks(workflow.HookBinder)
}
UpgradeClusterHookRegistrar is a Hook registrar that binds hooks to an upgrade management cluster workflow.