workspace

package
v0.11.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 43 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,
	shardExternalURL func() string,
	kcpClusterClient kcpclientset.ClusterInterface,
	kubeClusterClient kubernetes.ClusterInterface,
	logicalClusterAdminConfig *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