clusterproxy

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 14 Imported by: 14 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKubeconfig

func CreateKubeconfig(logger logr.Logger, kubeconfigContent []byte) (string, error)

CreateKubeconfig creates a temporary file with the Kubeconfig to access CAPI cluster

func GetKubernetesClient

func GetKubernetesClient(ctx context.Context, logger logr.Logger, c client.Client,
	s *runtime.Scheme, clusterNamespace, clusterName string) (client.Client, error)

GetKubernetesClient returns a client to access CAPI Cluster clusterNamespace/clusterName c is the client to access management cluster

func GetKubernetesRestConfig

func GetKubernetesRestConfig(ctx context.Context, logger logr.Logger, c client.Client,
	clusterNamespace, clusterName string) (*rest.Config, error)

GetKubernetesRestConfig returns rest.Config for a CAPI Cluster clusterNamespace/clusterName c is the client to access management cluster

func GetMachinesForCluster

func GetMachinesForCluster(
	ctx context.Context, c client.Client,
	cluster *corev1.ObjectReference, logger logr.Logger,
) (*clusterv1.MachineList, error)

GetMachinesForCluster find all Machines for a given CAPI Cluster.

func GetSecretData

func GetSecretData(ctx context.Context, logger logr.Logger, c client.Client,
	clusterNamespace, clusterName string) ([]byte, error)

GetSecretData verifies Cluster exists and returns the content of secret containing the kubeconfig for CAPI cluster

func IsClusterReadyToBeConfigured

func IsClusterReadyToBeConfigured(
	ctx context.Context, c client.Client,
	cluster *corev1.ObjectReference, logger logr.Logger,
) (bool, error)

IsClusterReadyToBeConfigured gets all Machines for a given CAPI Cluster and returns true if at least one control plane machine is in running phase

Types

This section is empty.

Jump to

Keyboard shortcuts

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