kind

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

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

Represents a KinD cluster.

func NewCluster

func NewCluster(name string, opts ...ClusterOption) *Cluster

func (*Cluster) Clients

func (c *Cluster) Clients() (*kubeclients.KubeClients, error)

func (*Cluster) Create

func (c *Cluster) Create(ctx context.Context) error

Creates the KinD cluster if it does not exist.

func (*Cluster) Destroy

func (c *Cluster) Destroy(_ context.Context) error

Destroys the KinD cluster if it exists.

func (*Cluster) Exists

func (c *Cluster) Exists() (bool, error)

Check if the cluster already exists.

func (*Cluster) ExportLogs

func (c *Cluster) ExportLogs(path string) error

func (*Cluster) ID

func (c *Cluster) ID() string

func (*Cluster) Kubeconfig

func (c *Cluster) Kubeconfig(internal bool) (string, error)

func (*Cluster) KubeconfigPath

func (c *Cluster) KubeconfigPath() (string, error)

func (*Cluster) LoadImageFromTar

func (c *Cluster) LoadImageFromTar(filePath string) error

Load an image from a tar archive into the environment.

func (*Cluster) Name

func (c *Cluster) Name() string

func (*Cluster) Run

func (c *Cluster) Run(ctx context.Context) error

Returns a Create dependency to ensure the cluster is setup.

type ClusterInitFn

type ClusterInitFn func(ctx context.Context, cluster *Cluster) error

Run a function with access to the cluster object. Can be used to directly interact with the cluster.

func (ClusterInitFn) Init

func (fn ClusterInitFn) Init(ctx context.Context, cl *Cluster) error

type ClusterInitializer

type ClusterInitializer interface {
	Init(ctx context.Context, cluster *Cluster) error
}

type ClusterLoadObjectFromClientObject

type ClusterLoadObjectFromClientObject struct {
	client.Object
}

Creates the referenced Object and waits for it to be ready.

func (ClusterLoadObjectFromClientObject) Init

type ClusterLoadObjectsFromFiles

type ClusterLoadObjectsFromFiles []string

Load objects from given file paths and applies them into the cluster.

func (ClusterLoadObjectsFromFiles) Init

func (l ClusterLoadObjectsFromFiles) Init(
	ctx context.Context, cluster *Cluster,
) error

type ClusterLoadObjectsFromFolders

type ClusterLoadObjectsFromFolders []string

Load objects from given folder paths and applies them into the cluster.

func (ClusterLoadObjectsFromFolders) Init

func (l ClusterLoadObjectsFromFolders) Init(
	ctx context.Context, cluster *Cluster,
) error

type ClusterLoadObjectsFromHTTP

type ClusterLoadObjectsFromHTTP []string

Load objects from the given http urls and applies them into the cluster.

func (ClusterLoadObjectsFromHTTP) Init

func (l ClusterLoadObjectsFromHTTP) Init(
	ctx context.Context, cluster *Cluster,
) error

type ClusterOption

type ClusterOption interface {
	ApplyToCluster(kc *Cluster)
}

type WithClientOptions

type WithClientOptions []kubeclients.Option

func (WithClientOptions) ApplyToCluster

func (opts WithClientOptions) ApplyToCluster(kc *Cluster)

type WithClusterConfig

type WithClusterConfig kindv1alpha4.Cluster

func (WithClusterConfig) ApplyToCluster

func (opts WithClusterConfig) ApplyToCluster(kc *Cluster)

type WithClusterInitializers

type WithClusterInitializers []ClusterInitializer

func (WithClusterInitializers) ApplyToCluster

func (opts WithClusterInitializers) ApplyToCluster(kc *Cluster)

type WithContainerRuntime

type WithContainerRuntime kubeutils.ContainerRuntime

func (WithContainerRuntime) ApplyToCluster

func (cr WithContainerRuntime) ApplyToCluster(kc *Cluster)

Jump to

Keyboard shortcuts

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