workspace

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 44 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ControllerName = "kcp-workspace"
)
View Source
const (
	// WorkspaceShardHashAnnotationKey keeps track on which shard LogicalCluster must be scheduled. The value
	// is a base36(sha224) hash of the Shard name.
	WorkspaceShardHashAnnotationKey = "internal.tenancy.kcp.io/shard"
)

Variables

This section is empty.

Functions

func ByBase36Sha224NameValue

func ByBase36Sha224NameValue(name string) string

func LogicalClustersInitializers

func LogicalClustersInitializers(
	resolver workspacetypeexists.TransitiveTypeResolver,
	getWorkspaceType func(clusterName logicalcluster.Path, name string) (*tenancyv1alpha1.WorkspaceType, error),
	typePath logicalcluster.Path, typeName string,
) ([]corev1alpha1.LogicalClusterInitializer, error)

LogicalClustersInitializers returns the initializers for a LogicalCluster of a given fully-qualified WorkspaceType reference.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller watches Workspaces and WorkspaceShards in order to make sure every Workspace is scheduled to a valid Shard.

func NewController

func NewController(
	shardName string,
	kcpClusterClient kcpclientset.ClusterInterface,
	kubeClusterClient kubernetes.ClusterInterface,
	logicalClusterAdminConfig *rest.Config,
	externalLogicalClusterAdminConfig *rest.Config,
	workspaceInformer tenancyv1alpha1informers.WorkspaceClusterInformer,
	globalShardInformer corev1alpha1informers.ShardClusterInformer,
	globalWorkspaceTypeInformer tenancyv1alpha1informers.WorkspaceTypeClusterInformer,
	logicalClusterInformer corev1alpha1informers.LogicalClusterClusterInformer,
) (*Controller, error)

func (*Controller) Start

func (c *Controller) Start(ctx context.Context, numThreads int)

Jump to

Keyboard shortcuts

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