capi

package
v0.0.0-...-723a762 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAPI

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

func NewClusterAPI

func NewClusterAPI(log logr.Logger, clusterAuth *k8sclient.ClusterAuthInfo, kubeconfigPath string) (*ClusterAPI, error)

NewClusterAPI creates a new instance of the ClusterAPI struct. This function initializes the ClusterAPI with the provided logger, authentication information, kubeconfig path, and context name. It returns a pointer to the newly created ClusterAPI instance and an error if any issues occur during the initialization. Context name has to be provided because it is not part of the authentication information stored in the clusterAuth variable but clusterApi client works with kubeconfig and context name, rather than REST config or clientset Context name is an arbitrary name given to a context inside kubeconfig file. At this stage of CAPI cluster the context for a cluster may not even exist yet in the kubeconfig

func (*ClusterAPI) GetClusterAuthInfoForWorkloadCluster

func (c *ClusterAPI) GetClusterAuthInfoForWorkloadCluster(authInfo *k8sclient.ClusterAuthInfo, name string) error

GetClusterAuthInfo returns the clientset and rest.Config for the workload cluster. It also updates the kubeconfig with the worklaod cluster config. (TODO - this feels like a side effect, is there a better way to do this?)

func (*ClusterAPI) InstallClusterAPI

func (c *ClusterAPI) InstallClusterAPI() error

func (*ClusterAPI) PivotCluster

func (c *ClusterAPI) PivotCluster(permClusterAuth *k8sclient.ClusterAuthInfo) error

func (*ClusterAPI) WaitForAllClustersProvisioning

func (c *ClusterAPI) WaitForAllClustersProvisioning() error

func (*ClusterAPI) WaitForClusterDeletion

func (c *ClusterAPI) WaitForClusterDeletion(clusterName, namespace string) error

func (*ClusterAPI) WaitForWorkloadClusterFullyRunning

func (c *ClusterAPI) WaitForWorkloadClusterFullyRunning(name string) error

Jump to

Keyboard shortcuts

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