bootstrapper

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 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 BootstrapClusterClientOption

type BootstrapClusterClientOption func() error

type BootstrapClusterOption

type BootstrapClusterOption func(b *Bootstrapper) BootstrapClusterClientOption

func WithDefaultCNIDisabled

func WithDefaultCNIDisabled() BootstrapClusterOption

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) *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, isUpgrade bool) error

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
	WithDefaultCNIDisabled() 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
	CreateNamespace(ctx context.Context, kubeconfig string, namespace string) error
	GetNamespace(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