multicluster

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 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 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