cluster

package
v0.0.0-...-be065d1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationCleanup = "notification.kubesphere.io/cleanup"
)

Variables

This section is empty.

Functions

func ClusterClientset

func ClusterClientset(config *rest.Config) (*kubeclient.Clientset, error)

ClusterClientset provides a kubernetes API compliant clientset to communicate with the joining cluster's kubernetes API server.

func ClusterServiceAccountName

func ClusterServiceAccountName(joiningClusterName, hostClusterName string) string

ClusterServiceAccountName returns the name of a service account whose credentials are used by the host cluster to access the client cluster.

func HostClientset

func HostClientset(config *rest.Config) (*kubeclient.Clientset, error)

HostClientset provides a kubernetes API compliant clientset to communicate with the host cluster's kubernetes API server.

func IsPrimaryCluster

func IsPrimaryCluster(obj, clusterObj pkgruntime.Object) bool

IsPrimaryCluster checks if the caller is working with objects for the primary cluster by checking if the UIDs match for both ObjectMetas passed in. TODO (font): Need to revisit this when cluster ID is available.

func MetaAccessor

func MetaAccessor(obj pkgruntime.Object) metav1.Object

func NewClusterController

func NewClusterController(
	k8sClient kubernetes.Interface,
	ksClient kubesphere.Interface,
	config *rest.Config,
	clusterInformer clusterinformer.ClusterInformer,
	userLister iamv1alpha2listers.UserLister,
	resyncPeriod time.Duration,
	hostClusterName string,
) *clusterController

Types

type ValidatingHandler

type ValidatingHandler struct {
	Client client.Client
	// contains filtered or unexported fields
}

func (*ValidatingHandler) Handle

Handle handles admission requests.

func (*ValidatingHandler) InjectDecoder

func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder into a ValidatingHandler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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