multicluster

package
v0.5.9-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigFromCluster

func NewConfigFromCluster(c *clusterv1beta1.Cluster) (*restclient.Config, error)

NewConfigFromCluster takes in a v1beta1.Cluster object and return the corresponding restclient.Config object for client-go

func UnstructuredToRuntimeObject

func UnstructuredToRuntimeObject(u *unstructured.Unstructured) (runtime.Object, error)

unstructuredToRuntimeObject converts an unstructured.Unstructured into a typed runtime.Object

Types

type MultiClusterClient

type MultiClusterClient struct {
	ClientSet     *kubernetes.Clientset
	DynamicClient *dynamic.DynamicClient
	MetricsClient *metricsv1beta1.MetricsV1beta1Client
}

MultiClusterClient represents the client used to interact with multiple Kubernetes clusters.

func BuildHubClients

func BuildHubClients(
	ctx context.Context,
	hubConfig *restclient.Config,
) (*MultiClusterClient, error)

func BuildMultiClusterClient

func BuildMultiClusterClient(
	ctx context.Context,
	hubConfig *restclient.Config,
	name string,
) (*MultiClusterClient, error)

BuildMultiClusterClient returns a MultiClusterClient based on the cluster name in the request

func BuildSpokeClients

func BuildSpokeClients(
	ctx context.Context,
	hubDynamicClient *dynamic.DynamicClient,
	name string,
) (*MultiClusterClient, error)

BuildSpokeClients returns a MultiClusterClient for the spoke cluster based on the cluster name in the request

Jump to

Keyboard shortcuts

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