bootstrap

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrapper

type Bootstrapper interface {
	// CreateCluster creates a new local cluster. It does not contain any EKS-A components.
	CreateBootstrapCluster(
		context.Context,
		*cluster.Spec,
		...bootstrapper.BootstrapClusterOption,
	) (*types.Cluster, error)

	// DeleteBootstrapCluster deletes a local cluster created with CreateCluster.
	DeleteBootstrapCluster(
		ctx context.Context,
		cluster *types.Cluster,
		operationType constants.Operation,
		isForceCleanup bool,
	) error
}

Bootstrapper creates and destroys bootstrap clusters. It is satisfied by the bootstrap package and exists predominently for testability.

type CreateCluster

type CreateCluster struct {
	// Spec is the spec to be used for bootstrapping the cluster.
	Spec *cluster.Spec

	// Options supplies bootstrap cluster creation options.
	Options OptionsRetriever

	// Bootstrapper is used to create the cluster.
	Bootstrapper Bootstrapper
}

CreateCluster creates a functional Kubernetes cluster that can be used to faciliate EKS-A operations. The bootstrap cluster is populated in the context using workflow.WithBootstrapCluster for subsequent tasks.

func (CreateCluster) RunTask

func (t CreateCluster) RunTask(ctx context.Context) (context.Context, error)

RunTask satisfies workflow.Task.

type DeleteCluster

type DeleteCluster struct {
	// Bootstrapper is used to delete the cluster.
	Bootstrapper Bootstrapper
}

DeleteCluster deletes a bootstrap cluster. It expects the bootstrap cluster to be populated in the context using workflow.WithBootstrapCluster.

func (DeleteCluster) RunTask

func (t DeleteCluster) RunTask(ctx context.Context) (context.Context, error)

RunTask satisfies workflow.Task.

type OptionsRetriever

type OptionsRetriever interface {
	BootstrapClusterOpts(*cluster.Spec) ([]bootstrapper.BootstrapClusterOption, error)
}

OptionsRetriever supplies bootstrap cluster options. This is typically satisfied by a provider.

Jump to

Keyboard shortcuts

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