bootstrapper

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRetrierClient added in v0.11.2

func NewRetrierClient(client *ClusterClient, retrier *retrier.Retrier) *retrierClient

Types

type BootstrapClusterClientOption

type BootstrapClusterClientOption func() error

type BootstrapClusterOption

type BootstrapClusterOption func(b *Bootstrapper) BootstrapClusterClientOption

func WithEnv

func WithEnv(env map[string]string) BootstrapClusterOption

func WithExtraDockerMounts

func WithExtraDockerMounts() BootstrapClusterOption

func WithExtraPortMappings added in v0.9.0

func WithExtraPortMappings(ports []int) BootstrapClusterOption

type Bootstrapper

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

func New

func New(clusterClient ClusterClient, opts ...BootstrapperOpt) *Bootstrapper

func (*Bootstrapper) CreateBootstrapCluster

func (b *Bootstrapper) CreateBootstrapCluster(ctx context.Context, clusterSpec *cluster.Spec, opts ...BootstrapClusterOption) (*types.Cluster, error)

func (*Bootstrapper) DeleteBootstrapCluster

func (b *Bootstrapper) DeleteBootstrapCluster(ctx context.Context, cluster *types.Cluster, operationType constants.Operation, isForceCleanup bool) error

type BootstrapperOpt added in v0.11.2

type BootstrapperOpt func(*Bootstrapper)

func WithRetrier added in v0.11.2

func WithRetrier(retrier *retrier.Retrier) BootstrapperOpt

WithRetrier implemented primarily for unit testing optimization purposes.

type ClusterClient

type ClusterClient interface {
	CreateBootstrapCluster(ctx context.Context, clusterSpec *cluster.Spec, opts ...BootstrapClusterClientOption) (kubeconfig string, err error)
	DeleteBootstrapCluster(ctx context.Context, cluster *types.Cluster) error
	WithExtraDockerMounts() BootstrapClusterClientOption
	WithExtraPortMappings([]int) BootstrapClusterClientOption
	WithEnv(env map[string]string) BootstrapClusterClientOption
	ApplyKubeSpecFromBytes(ctx context.Context, cluster *types.Cluster, data []byte) error
	GetClusters(ctx context.Context, cluster *types.Cluster) ([]types.CAPICluster, error)
	GetKubeconfig(ctx context.Context, clusterName string) (string, error)
	ClusterExists(ctx context.Context, clusterName string) (bool, error)
	ValidateClustersCRD(ctx context.Context, cluster *types.Cluster) error
	CreateNamespaceIfNotPresent(ctx context.Context, kubeconfig string, namespace string) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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