clusterproxy

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 16 Imported by: 11

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 GetCAPIKubernetesClient added in v0.3.0

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

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

func GetCAPIKubernetesRestConfig added in v0.3.0

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

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

func GetCAPISecretData added in v0.3.0

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

GetCAPISecretData verifies Cluster exists and returns the content of secret containing the kubeconfig for CAPI 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 GetSveltosKubernetesClient added in v0.3.0

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

GetSveltosKubernetesClient returns a client to access Sveltos Cluster clusterNamespace/clusterName c is the client to access management cluster

func GetSveltosKubernetesRestConfig added in v0.3.0

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

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

func GetSveltosSecretData added in v0.3.0

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

GetSveltosSecretData verifies Cluster exists and returns the content of secret containing the kubeconfig for Sveltos cluster

func IsClusterReadyToBeConfigured

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

IsClusterReadyToBeConfigured returns true if cluster is ready to be configured

Types

This section is empty.

Jump to

Keyboard shortcuts

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