Documentation ¶
Index ¶
- type ClusterAPI
- func (c *ClusterAPI) GetClusterAuthInfoForWorkloadCluster(authInfo *k8sclient.ClusterAuthInfo, name string) error
- func (c *ClusterAPI) InstallClusterAPI() error
- func (c *ClusterAPI) PivotCluster(permClusterAuth *k8sclient.ClusterAuthInfo) error
- func (c *ClusterAPI) WaitForAllClustersProvisioning() error
- func (c *ClusterAPI) WaitForClusterDeletion(clusterName, namespace string) error
- func (c *ClusterAPI) WaitForWorkloadClusterFullyRunning(name string) error
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