Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) Apply(ctx context.Context, resources []byte) error
- func (c *Cluster) ClientFromRestConfig(restConfig *rest.Config) (client.Client, error)
- func (c *Cluster) GetClient() (client.Client, error)
- func (c *Cluster) GetClientSet() (*kubernetes.Clientset, error)
- func (c Cluster) GetKubeconfigPath() string
- func (c *Cluster) GetName() string
- func (c Cluster) GetScheme() *runtime.Scheme
- func (c *Cluster) GetWorkerKubeconfigPath(ctx context.Context, namespace, name string) (string, error)
- func (c *Cluster) GetWorkloadClient(ctx context.Context, namespace, name string) (client.Client, error)
- func (c *Cluster) ImageExists(ctx context.Context, image string) bool
- func (c *Cluster) LoadImage(ctx context.Context, image string) error
- func (c *Cluster) Teardown(_ context.Context)
- func (c *Cluster) Wait(ctx context.Context, args ...string) error
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 ¶
Apply wraps `kubectl apply` and prints the output so we can see what gets applied to the cluster.
func (*Cluster) ClientFromRestConfig ¶
ClientFromRestConfig returns a controller-runtime client from a RESTConfig.
func (*Cluster) GetClient ¶
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
GetKubeconfigPath returns the path to the kubeconfig file for the cluster.
func (Cluster) GetScheme ¶ added in v0.3.4
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.