Documentation ¶
Overview ¶
package managedcluster contains the spoke cluster side reconciler for the SpokeCluster resource.
Index ¶
- Variables
- func DumpSecret(coreV1Client corev1client.CoreV1Interface, ...) error
- func GetClusterAgentNamesFromCertificate(certData []byte) (clusterName, agentName string, err error)
- func NewClientCertForHubController(clusterName string, agentName string, clientCertSecretNamespace string, ...) factory.Controller
- func NewHubKubeconfigSecretController(hubKubeconfigDir, hubKubeconfigSecretNamespace, hubKubeconfigSecretName string, ...) factory.Controller
- func NewManagedClusterClaimController(clusterName string, maxCustomClusterClaims int, ...) factory.Controller
- func NewManagedClusterCreatingController(clusterName string, spokeExternalServerURLs []string, spokeCABundle []byte, ...) factory.Controller
- func NewManagedClusterHealthCheckController(clusterName string, hubClusterClient clientset.Interface, ...) factory.Controller
- func NewManagedClusterJoiningController(clusterName string, hubClusterClient clientset.Interface, ...) factory.Controller
- func NewManagedClusterLeaseController(clusterName string, hubClient clientset.Interface, ...) factory.Controller
Constants ¶
This section is empty.
Variables ¶
var CreatingControllerSyncInterval = 60 * time.Minute
CreatingControllerSyncInterval is exposed so that integration tests can crank up the constroller sync speed.
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 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, spokeCoreClient corev1client.CoreV1Interface, hubCSRClient csrclient.CertificateSigningRequestInterface, hubCSRInformer certificatesinformers.CertificateSigningRequestInformer, spokeSecretInformer corev1informers.SecretInformer, 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 NewManagedClusterHealthCheckController ¶
func NewManagedClusterHealthCheckController( clusterName string, hubClusterClient clientset.Interface, hubClusterInformer clusterv1informer.ManagedClusterInformer, managedClusterDiscoveryClient discovery.DiscoveryInterface, resyncInterval time.Duration, recorder events.Recorder) factory.Controller
NewManagedClusterHealthCheckController creates a managed cluster health check controller on managed cluster.
func NewManagedClusterJoiningController ¶
func NewManagedClusterJoiningController( clusterName string, hubClusterClient clientset.Interface, hubManagedClusterInformer clusterv1informer.ManagedClusterInformer, discoveryClient discovery.DiscoveryInterface, nodeInformer corev1informers.NodeInformer, 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.
Types ¶
This section is empty.