kind

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Name                       string
	KubeconfigPath             string
	Client                     client.Client
	Scheme                     *runtime.Scheme
	WorkloadClusterKubeconfigs map[string]string
}

Cluster represents a Kubernetes cluster used as a management cluster backed by kind. Deprecated. Please use bootstrap.ClusterProvider and ClusterProxy

func NewCluster

func NewCluster(ctx context.Context, name string, scheme *runtime.Scheme, images ...string) (*Cluster, error)

NewCluster sets up a new kind cluster to be used as the management cluster. Deprecated. Please use bootstrap.ClusterProvider and ClusterProxy

func NewClusterWithConfig

func NewClusterWithConfig(ctx context.Context, name, configFile string, scheme *runtime.Scheme, images ...string) (*Cluster, error)

NewClusterWithConfig creates a kind cluster using a kind-config file. Deprecated. Please use bootstrap.ClusterProvider and ClusterProxy

func (*Cluster) Apply

func (c *Cluster) Apply(ctx context.Context, resources []byte) error

Apply wraps `kubectl apply` and prints the output so we can see what gets applied to the cluster.

func (*Cluster) ClientFromRestConfig

func (c *Cluster) ClientFromRestConfig(restConfig *rest.Config) (client.Client, error)

ClientFromRestConfig returns a controller-runtime client from a RESTConfig.

func (*Cluster) GetClient

func (c *Cluster) GetClient() (client.Client, error)

GetClient returns a controller-runtime client for the management cluster.

func (*Cluster) GetClientSet

func (c *Cluster) GetClientSet() (*kubernetes.Clientset, error)

GetClientSet returns a clientset to the management cluster to be used for object interface expansions such as pod logs.

func (Cluster) GetKubeconfigPath added in v0.3.4

func (c Cluster) GetKubeconfigPath() string

GetKubeconfigPath returns the path to the kubeconfig file for the cluster.

func (*Cluster) GetName

func (c *Cluster) GetName() string

GetName returns the name of the cluster

func (Cluster) GetScheme added in v0.3.4

func (c Cluster) GetScheme() *runtime.Scheme

GetScheme returns the scheme defining the types hosted in the cluster.

func (*Cluster) GetWorkerKubeconfigPath added in v0.3.4

func (c *Cluster) GetWorkerKubeconfigPath(ctx context.Context, namespace, name string) (string, error)

GetWorkerKubeconfigPath returns the path to the kubeconfig file for the specified workload cluster.

func (*Cluster) GetWorkloadClient

func (c *Cluster) GetWorkloadClient(ctx context.Context, namespace, name string) (client.Client, error)

GetWorkloadClient returns a controller-runtime client for the workload cluster.

func (*Cluster) ImageExists

func (c *Cluster) ImageExists(ctx context.Context, image string) bool

func (*Cluster) LoadImage

func (c *Cluster) LoadImage(ctx context.Context, image string) error

LoadImage will put a local image onto the kind node

func (*Cluster) Teardown

func (c *Cluster) Teardown(_ context.Context)

Teardown deletes all the tmp files and cleans up the kind cluster. This does not return an error so that it can clean as much up as possible regardless of error.

func (*Cluster) Wait

func (c *Cluster) Wait(ctx context.Context, args ...string) error

Wait wraps `kubectl wait`.

Jump to

Keyboard shortcuts

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