kind

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// KindClusterType indicates that the Kubernetes cluster was provisioned by Kind.
	KindClusterType clusters.Type = "kind"

	// EnvKeepCluster is the environment variable that can be set to "true" in order
	// to circumvent teardown during cleanup of clusters in order to allow a user to inspect them instead.
	EnvKeepCluster = "KIND_KEEP_CLUSTER"

	// DefaultKindDockerNetwork is the Docker network that a kind cluster uses by default.
	DefaultKindDockerNetwork = "kind"
)

Variables

This section is empty.

Functions

func NewFromExisting

func NewFromExisting(name string) (clusters.Cluster, error)

NewFromExisting provides a Cluster object for a given kind cluster by name.

Types

type Builder

type Builder struct {
	Name string
	// contains filtered or unexported fields
}

Builder generates clusters.Cluster objects backed by Kind given provided configuration options.

func NewBuilder

func NewBuilder() *Builder

NewBuilder provides a new *Builder object.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) (*Cluster, error)

Build creates and configures clients for a Kind-based Kubernetes clusters.Cluster.

func (*Builder) WithClusterVersion

func (b *Builder) WithClusterVersion(version semver.Version) *Builder

WithClusterVersion configures the Kubernetes cluster version for the Builder to use when building the Kind cluster.

func (*Builder) WithConfig added in v0.13.0

func (b *Builder) WithConfig(filename string) *Builder

WithConfig sets a filename containing a KIND config See: https://kind.sigs.k8s.io/docs/user/configuration/

func (*Builder) WithName added in v0.1.0

func (b *Builder) WithName(name string) *Builder

WithName indicates a custom name to use for the cluster.

type Cluster added in v0.11.0

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

Cluster is a clusters.Cluster implementation backed by Kubernetes In Docker (KIND)

func New

func New(ctx context.Context) (*Cluster, error)

New provides a new clusters.Cluster backed by a Kind based Kubernetes Cluster.

func (*Cluster) Cleanup added in v0.11.0

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

func (*Cluster) Client added in v0.11.0

func (c *Cluster) Client() *kubernetes.Clientset

func (*Cluster) Config added in v0.11.0

func (c *Cluster) Config() *rest.Config

func (*Cluster) DeleteAddon added in v0.11.0

func (c *Cluster) DeleteAddon(ctx context.Context, addon clusters.Addon) error

func (*Cluster) DeployAddon added in v0.11.0

func (c *Cluster) DeployAddon(ctx context.Context, addon clusters.Addon) error

func (*Cluster) GetAddon added in v0.11.0

func (c *Cluster) GetAddon(name clusters.AddonName) (clusters.Addon, error)

func (*Cluster) ListAddons added in v0.11.0

func (c *Cluster) ListAddons() []clusters.Addon

func (*Cluster) Name added in v0.11.0

func (c *Cluster) Name() string

func (*Cluster) Type added in v0.11.0

func (c *Cluster) Type() clusters.Type

func (*Cluster) Version added in v0.11.0

func (c *Cluster) Version() (semver.Version, error)

Jump to

Keyboard shortcuts

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