cluster

package
v0.0.0-...-18e089f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 57 Imported by: 1

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