managedcluster

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 46 Imported by: 1

Documentation

Overview

package managedcluster contains the spoke cluster side reconciler for the SpokeCluster resource.

Index

Constants

This section is empty.

Variables

View Source
var (
	// CreatingControllerSyncInterval is exposed so that integration tests can crank up the controller sync speed.
	CreatingControllerSyncInterval = 60 * time.Minute
)

Functions

func DumpSecret

func DumpSecret(
	coreV1Client corev1client.CoreV1Interface,
	secretNamespace, secretName, outputDir string,
	ctx context.Context,
	recorder events.Recorder) error

DumpSecret dumps the data in the given seccret into a directory in file system. The output directory will be created if not exists. TO DO: remove the file once the corresponding key is removed from secret.

func GenerateBootstrapStatusUpdater added in v0.8.0

func GenerateBootstrapStatusUpdater() clientcert.StatusUpdateFunc

func GenerateStatusUpdater added in v0.8.0

func GenerateStatusUpdater(hubClusterClient clientset.Interface, clusterName string) clientcert.StatusUpdateFunc

GenerateStatusUpdater generates status update func for the certificate management

func GetClusterAgentNamesFromCertificate

func GetClusterAgentNamesFromCertificate(certData []byte) (clusterName, agentName string, err error)

GetClusterAgentNamesFromCertificate returns the cluster name and agent name by parsing the common name of the certification

func NewClientCertForHubController

func NewClientCertForHubController(
	clusterName string,
	agentName string,
	clientCertSecretNamespace string,
	clientCertSecretName string,
	kubeconfigData []byte,
	spokeSecretInformer corev1informers.SecretInformer,
	csrControl clientcert.CSRControl,
	csrExpirationSeconds int32,
	spokeKubeClient kubernetes.Interface,
	statusUpdater clientcert.StatusUpdateFunc,
	recorder events.Recorder,
	controllerName string,
) factory.Controller

NewClientCertForHubController returns a controller to 1). Create a new client certificate and build a hub kubeconfig for the registration agent; 2). Or rotate the client certificate referenced by the hub kubeconfig before it become expired;

func NewHubKubeconfigSecretController

func NewHubKubeconfigSecretController(
	hubKubeconfigDir, hubKubeconfigSecretNamespace, hubKubeconfigSecretName string,
	spokeCoreClient corev1client.CoreV1Interface,
	spokeSecretInformer corev1informers.SecretInformer,
	recorder events.Recorder) factory.Controller

NewHubKubeconfigSecretController returns a new HubKubeconfigSecretController

func NewManagedClusterClaimController

func NewManagedClusterClaimController(
	clusterName string,
	maxCustomClusterClaims int,
	hubClusterClient clientset.Interface,
	hubManagedClusterInformer clusterv1informer.ManagedClusterInformer,
	claimInformer clusterv1alpha1informer.ClusterClaimInformer,
	recorder events.Recorder) factory.Controller

NewManagedClusterClaimController creates a new managed cluster claim controller on the managed cluster.

func NewManagedClusterCreatingController

func NewManagedClusterCreatingController(
	clusterName string, spokeExternalServerURLs []string,
	spokeCABundle []byte,
	hubClusterClient clientset.Interface,
	recorder events.Recorder) factory.Controller

NewManagedClusterCreatingController creates a new managedClusterCreatingController on the managed cluster.

func NewManagedClusterJoiningController

func NewManagedClusterJoiningController(
	clusterName string,
	hubClusterClient clientset.Interface,
	hubManagedClusterInformer clusterv1informer.ManagedClusterInformer,
	recorder events.Recorder) factory.Controller

NewManagedClusterJoiningController creates a new managed cluster joining controller on the managed cluster.

func NewManagedClusterLeaseController

func NewManagedClusterLeaseController(
	clusterName string,
	hubClient clientset.Interface,
	hubClusterInformer clusterv1informer.ManagedClusterInformer,
	recorder events.Recorder) factory.Controller

NewManagedClusterLeaseController creates a new managed cluster lease controller on the managed cluster.

func NewManagedClusterStatusController added in v0.6.0

func NewManagedClusterStatusController(
	clusterName string,
	hubClusterClient clientset.Interface,
	hubClusterInformer clusterv1informer.ManagedClusterInformer,
	managedClusterDiscoveryClient discovery.DiscoveryInterface,
	nodeInformer corev1informers.NodeInformer,
	resyncInterval time.Duration,
	recorder events.Recorder) factory.Controller

NewManagedClusterStatusController creates a managed cluster status controller on managed cluster.

Types

This section is empty.

Jump to

Keyboard shortcuts

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