v1alpha1

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 30

Documentation

Overview

+k8s:deepcopy-gen=package,register +groupName=tenancy.kcp.dev +k8s:openapi-gen=true

Index

Constants

View Source
const (
	ClusterWorkspaceTypeVirtualWorkspaceURLsReady conditionsv1alpha1.ConditionType = "VirtualWorkspaceURLsReady"
	ErrorGeneratingURLsReason                                                      = "ErrorGeneratingURLs"
)

These are valid conditions of ClusterWorkspaceType.

View Source
const (
	// WorkspaceScheduled represents status of the scheduling process for this workspace.
	WorkspaceScheduled conditionsv1alpha1.ConditionType = "WorkspaceScheduled"
	// WorkspaceReasonUnschedulable reason in WorkspaceScheduled WorkspaceCondition means that the scheduler
	// can't schedule the workspace right now, for example due to insufficient resources in the cluster.
	WorkspaceReasonUnschedulable = "Unschedulable"
	// WorkspaceReasonReasonUnknown reason in WorkspaceScheduled means that scheduler has failed for
	// some unexpected reason.
	WorkspaceReasonReasonUnknown = "Unknown"
	// WorkspaceReasonUnreschedulable reason in WorkspaceScheduled WorkspaceCondition means that the scheduler
	// can't reschedule the workspace right now, for example because it not in Scheduling phase anymore and
	// movement is not possible.
	WorkspaceReasonUnreschedulable = "Unreschedulable"

	// WorkspaceShardValid represents status of the connection process for this cluster workspace.
	WorkspaceShardValid conditionsv1alpha1.ConditionType = "WorkspaceShardValid"
	// WorkspaceShardValidReasonShardNotFound reason in WorkspaceShardValid condition means that the
	// referenced ClusterWorkspaceShard object got deleted.
	WorkspaceShardValidReasonShardNotFound = "ShardNotFound"

	// WorkspaceDeletionContentSuccess represents the status that all resources in the workspace is deleting
	WorkspaceDeletionContentSuccess conditionsv1alpha1.ConditionType = "WorkspaceDeletionContentSuccess"

	// WorkspaceContentDeleted represents the status that all resources in the workspace is deleted.
	WorkspaceContentDeleted conditionsv1alpha1.ConditionType = "WorkspaceContentDeleted"

	// WorkspaceInitialized represents the status that initialization has finished.
	WorkspaceInitialized conditionsv1alpha1.ConditionType = "WorkspaceInitialized"
	// WorkspaceInitializedInitializerExists reason in WorkspaceInitialized condition means that there is at least
	// one initializer still left.
	WorkspaceInitializedInitializerExists = "InitializerExists"

	// WorkspaceAPIBindingsInitialized represents the status of the initial APIBindings for the workspace.
	WorkspaceAPIBindingsInitialized conditionsv1alpha1.ConditionType = "APIBindingsInitialized"
	// WorkspaceInitializedWaitingOnAPIBindings is a reason for the APIBindingsInitialized condition that indicates
	// at least one APIBinding is not ready.
	WorkspaceInitializedWaitingOnAPIBindings = "WaitingOnAPIBindings"
	// WorkspaceInitializedClusterWorkspaceTypeInvalid is a reason for the APIBindingsInitialized
	// condition that indicates something is invalid with the ClusterWorkspaceType (e.g. a cycle trying
	// to resolve all the transitive types).
	WorkspaceInitializedClusterWorkspaceTypeInvalid = "ClusterWorkspaceTypeInvalid"
	// WorkspaceInitializedAPIBindingErrors is a reason for the APIBindingsInitialized condition that indicates there
	// were errors trying to initialize APIBindings for the workspace.
	WorkspaceInitializedAPIBindingErrors = "APIBindingErrors"
)

These are valid conditions of workspace.

View Source
const (
	// ClusterWorkspacePhaseLabel holds the ClusterWorkspace.Status.Phase value, and is enforced to match
	// by a mutating admission webhook.
	ClusterWorkspacePhaseLabel = "internal.kcp.dev/phase"
	// ClusterWorkspaceInitializerLabelPrefix is the prefix for labels which match ClusterWorkspace.Status.Initializers,
	// and the set of labels with this prefix is enforced to match the set of initializers by a mutating admission
	// webhook.
	ClusterWorkspaceInitializerLabelPrefix = "initializer.internal.kcp.dev/"
)
View Source
const ExperimentalClusterWorkspaceOwnerAnnotationKey string = "experimental.tenancy.kcp.dev/owner"
View Source
const (
	// RootWorkspaceTypeName is a reference to the root logical cluster, which has no cluster workspace type
	RootWorkspaceTypeName = ClusterWorkspaceTypeName("root")
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	// RootWorkspaceTypeReference is a reference to the root logical cluster, which has no cluster workspace type
	RootWorkspaceTypeReference = ClusterWorkspaceTypeReference{
		Name: RootWorkspaceTypeName,
		Path: RootCluster.String(),
	}

	// RootWorkspaceType is the implicit type of the root logical cluster.
	RootWorkspaceType = &ClusterWorkspaceType{
		ObjectMeta: metav1.ObjectMeta{
			Name: ObjectName(RootWorkspaceTypeReference.Name),
			Annotations: map[string]string{
				logicalcluster.AnnotationKey: RootWorkspaceTypeReference.Path,
			},
		},
		Spec: ClusterWorkspaceTypeSpec{
			LimitAllowedParents: &ClusterWorkspaceTypeSelector{
				None: true,
			},
		},
	}
)
View Source
var RootCluster = logicalcluster.New("root")

RootCluster is the root of ClusterWorkspace based logical clusters.

View Source
var RootShard = "root"

RootShard holds a name of the root shard.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: tenancy.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func ClusterWorkspaceReservedNames added in v0.9.0

func ClusterWorkspaceReservedNames() []string

ClusterWorkspaceReservedNames defines the set of names that may not be used on user-supplied ClusterWorkspaces. TODO(hasheddan): tie this definition of reserved names to the patches used to apply the same restrictions to the OpenAPISchema.

func ClusterWorkspaceTypeReservedNames added in v0.9.0

func ClusterWorkspaceTypeReservedNames() []string

ClusterWorkspaceTypeReservedNames defines the set of names that may not be used on user-supplied ClusterWorkspaceTypes. TODO(hasheddan): tie this definition of reserved names to the patches used to apply the same restrictions to the OpenAPISchema.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func ObjectName

func ObjectName(typeName ClusterWorkspaceTypeName) string

ObjectName converts the proper name of a type that users interact with to the metadata.name of the ClusterWorkspaceType object.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type APIExportReference added in v0.9.0

type APIExportReference struct {
	// path is the fully-qualified path to the workspace containing the APIExport.
	//
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:="^root(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
	Path string `json:"path"`

	// exportName is the name of the APIExport.
	//
	// +required
	// +kubebuilder:validation:Required
	// +kube:validation:MinLength=1
	ExportName string `json:"exportName"`
}

APIExportReference provides the fields necessary to resolve an APIExport.

func (*APIExportReference) DeepCopy added in v0.9.0

func (in *APIExportReference) DeepCopy() *APIExportReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIExportReference.

func (*APIExportReference) DeepCopyInto added in v0.9.0

func (in *APIExportReference) DeepCopyInto(out *APIExportReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspace

type ClusterWorkspace struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec ClusterWorkspaceSpec `json:"spec,omitempty"`

	// +optional
	Status ClusterWorkspaceStatus `json:"status,omitempty"`
}

ClusterWorkspace defines a Kubernetes-cluster-like endpoint that holds a default set of resources and exhibits standard Kubernetes API semantics of CRUD operations. It represents the full life-cycle of the persisted data in this workspace in a KCP installation.

ClusterWorkspace is a concrete type that implements a workspace.

+crd +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=kcp +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The current phase (e.g. Scheduling, Initializing, Ready)" +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type.name`,description="Type of the workspace" +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.status.baseURL`,description="URL to access the workspace" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*ClusterWorkspace) DeepCopy

func (in *ClusterWorkspace) DeepCopy() *ClusterWorkspace

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspace.

func (*ClusterWorkspace) DeepCopyInto

func (in *ClusterWorkspace) DeepCopyInto(out *ClusterWorkspace)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterWorkspace) DeepCopyObject

func (in *ClusterWorkspace) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ClusterWorkspace) GetConditions

func (in *ClusterWorkspace) GetConditions() conditionsv1alpha1.Conditions

func (*ClusterWorkspace) SetConditions

func (in *ClusterWorkspace) SetConditions(c conditionsv1alpha1.Conditions)

type ClusterWorkspaceInitializer

type ClusterWorkspaceInitializer string

ClusterWorkspaceInitializer is a unique string corresponding to a cluster workspace initialization controller for the given type of workspaces.

+kubebuilder:validation:Pattern:="^(root(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$"

const ClusterWorkspaceAPIBindingsInitializer ClusterWorkspaceInitializer = "system:apibindings"

ClusterWorkspaceAPIBindingsInitializer is a special-case initializer that waits for APIBindings defined on a ClusterWorkspaceType to be created.

type ClusterWorkspaceList

type ClusterWorkspaceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterWorkspace `json:"items"`
}

ClusterWorkspaceList is a list of ClusterWorkspace resources

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ClusterWorkspaceList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceList.

func (*ClusterWorkspaceList) DeepCopyInto

func (in *ClusterWorkspaceList) DeepCopyInto(out *ClusterWorkspaceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterWorkspaceList) DeepCopyObject

func (in *ClusterWorkspaceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterWorkspaceLocation

type ClusterWorkspaceLocation struct {
	// Current workspace placement (shard).
	//
	// +optional
	Current string `json:"current,omitempty"`

	// Target workspace placement (shard).
	//
	// +optional
	// +kubebuilder:validation:Enum=""
	Target string `json:"target,omitempty"`
}

ClusterWorkspaceLocation specifies workspace placement information, including current, desired (target), and historical information.

func (*ClusterWorkspaceLocation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceLocation.

func (*ClusterWorkspaceLocation) DeepCopyInto

func (in *ClusterWorkspaceLocation) DeepCopyInto(out *ClusterWorkspaceLocation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspacePhaseType

type ClusterWorkspacePhaseType string

ClusterWorkspacePhaseType is the type of the current phase of the workspace

const (
	ClusterWorkspacePhaseScheduling   ClusterWorkspacePhaseType = "Scheduling"
	ClusterWorkspacePhaseInitializing ClusterWorkspacePhaseType = "Initializing"
	ClusterWorkspacePhaseReady        ClusterWorkspacePhaseType = "Ready"
)

type ClusterWorkspaceShard

type ClusterWorkspaceShard struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec ClusterWorkspaceShardSpec `json:"spec,omitempty"`

	// +optional
	Status ClusterWorkspaceShardStatus `json:"status,omitempty"`
}

ClusterWorkspaceShard describes a Shard (== KCP instance) on which a number of workspaces will live

+crd +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=kcp +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.spec.baseURL`,description="Type URL to directly connect to the shard" +kubebuilder:printcolumn:name="External URL",type=string,JSONPath=`.spec.externalURL`,description="The URL exposed in workspaces created on that shard" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*ClusterWorkspaceShard) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceShard.

func (*ClusterWorkspaceShard) DeepCopyInto

func (in *ClusterWorkspaceShard) DeepCopyInto(out *ClusterWorkspaceShard)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterWorkspaceShard) DeepCopyObject

func (in *ClusterWorkspaceShard) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ClusterWorkspaceShard) GetConditions

func (*ClusterWorkspaceShard) SetConditions

type ClusterWorkspaceShardList

type ClusterWorkspaceShardList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterWorkspaceShard `json:"items"`
}

ClusterWorkspaceShardList is a list of workspace shards

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ClusterWorkspaceShardList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceShardList.

func (*ClusterWorkspaceShardList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterWorkspaceShardList) DeepCopyObject

func (in *ClusterWorkspaceShardList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterWorkspaceShardSpec

type ClusterWorkspaceShardSpec struct {
	// baseURL is the address of the KCP shard for direct connections, e.g. by some
	// front-proxy doing the fan-out to the shards.
	//
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Format=uri
	// +kubebuilder:validation:MinLength=1
	BaseURL string `json:"baseURL"`

	// externalURL is the externally visible address presented to users in Workspace URLs.
	// Changing this will break all existing workspaces on that shard, i.e. existing
	// kubeconfigs of clients will be invalid. Hence, when changing this value, the old
	// URL used by clients must keep working.
	//
	// The external address will not be unique if a front-proxy does a fan-out to
	// shards, but all workspace client will talk to the front-proxy. In that case,
	// put the address of the front-proxy here.
	//
	// Note that movement of shards is only possible (in the future) between shards
	// that share a common external URL.
	//
	// This will be defaulted to the value of the baseURL.
	//
	// +optional
	// +kubebuilder:validation:Format=uri
	// +kubebuilder:validation:MinLength=1
	ExternalURL string `json:"externalURL,omitempty"`

	// virtualWorkspaceURL is the address of the virtual workspace server associated with this shard.
	// It can be a direct address, an address of a front-proxy or even an address of an LB.
	// As of today this address is assigned to APIExports.
	//
	// This will be defaulted to the value of the baseURL.
	//
	// +optional
	// +kubebuilder:validation:Format=uri
	// +kubebuilder:validation:MinLength=1
	VirtualWorkspaceURL string `json:"virtualWorkspaceURL,omitempty"`
}

ClusterWorkspaceShardSpec holds the desired state of the ClusterWorkspaceShard.

func (*ClusterWorkspaceShardSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceShardSpec.

func (*ClusterWorkspaceShardSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspaceShardStatus

type ClusterWorkspaceShardStatus struct {
	// Set of integer resources that workspaces can be scheduled into
	// +optional
	Capacity corev1.ResourceList `json:"capacity,omitempty"`

	// Current processing state of the ClusterWorkspaceShard.
	// +optional
	Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`
}

ClusterWorkspaceShardStatus communicates the observed state of the ClusterWorkspaceShard.

func (*ClusterWorkspaceShardStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceShardStatus.

func (*ClusterWorkspaceShardStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspaceSpec

type ClusterWorkspaceSpec struct {
	// +optional
	ReadOnly bool `json:"readOnly,omitempty"`

	// type defines properties of the workspace both on creation (e.g. initial
	// resources and initially installed APIs) and during runtime (e.g. permissions).
	// If no type is provided, the default type for the workspace in which this workspace
	// is nesting will be used.
	//
	// The type is a reference to a ClusterWorkspaceType in the listed workspace, but
	// lower-cased. The ClusterWorkspaceType existence is validated at admission during
	// creation. The type is immutable after creation. The use of a type is gated via
	// the RBAC clusterworkspacetypes/use resource permission.
	//
	// +optional
	Type ClusterWorkspaceTypeReference `json:"type,omitempty"`

	// shard constraints onto which shards this cluster workspace can be scheduled to.
	// if the constraint is not fulfilled by the current location stored in the status,
	// movement will be attempted.
	//
	// Either shard name or shard selector must be specified.
	//
	// If the no shard constraints are specified, an arbitrary shard is chosen.
	//
	// +optional
	Shard *ShardConstraints `json:"shard,omitempty"`
}

ClusterWorkspaceSpec holds the desired state of the ClusterWorkspace.

func (*ClusterWorkspaceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceSpec.

func (*ClusterWorkspaceSpec) DeepCopyInto

func (in *ClusterWorkspaceSpec) DeepCopyInto(out *ClusterWorkspaceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspaceStatus

type ClusterWorkspaceStatus struct {
	// Phase of the workspace  (Scheduling / Initializing / Ready)
	Phase ClusterWorkspacePhaseType `json:"phase,omitempty"`

	// Current processing state of the ClusterWorkspace.
	// +optional
	Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`

	// Base URL where this ClusterWorkspace can be targeted.
	// This will generally be of the form: https://<workspace shard server>/cluster/<workspace name>.
	// But a workspace could also be targetable by a unique hostname in the future.
	//
	// +kubebuilder:validation:Pattern:https://[^/].*
	// +optional
	BaseURL string `json:"baseURL,omitempty"`

	// Contains workspace placement information.
	//
	// +optional
	Location ClusterWorkspaceLocation `json:"location,omitempty"`

	// initializers are set on creation by the system and must be cleared
	// by a controller before the workspace can be used. The workspace will
	// stay in the phase "Initializing" state until all initializers are cleared.
	//
	// A cluster workspace in "Initializing" state are gated via the RBAC
	// clusterworkspaces/initialize resource permission.
	//
	// +optional
	Initializers []ClusterWorkspaceInitializer `json:"initializers,omitempty"`
}

ClusterWorkspaceStatus communicates the observed state of the ClusterWorkspace.

func (*ClusterWorkspaceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceStatus.

func (*ClusterWorkspaceStatus) DeepCopyInto

func (in *ClusterWorkspaceStatus) DeepCopyInto(out *ClusterWorkspaceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspaceType

type ClusterWorkspaceType struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec ClusterWorkspaceTypeSpec `json:"spec,omitempty"`

	// +optional
	Status ClusterWorkspaceTypeStatus `json:"status,omitempty"`
}

ClusterWorkspaceType specifies behaviour of workspaces of this type.

+crd +genclient +genclient:nonNamespaced +kubebuilder:subresource:status +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster,categories=kcp

func (*ClusterWorkspaceType) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceType.

func (*ClusterWorkspaceType) DeepCopyInto

func (in *ClusterWorkspaceType) DeepCopyInto(out *ClusterWorkspaceType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterWorkspaceType) DeepCopyObject

func (in *ClusterWorkspaceType) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ClusterWorkspaceType) GetConditions

func (*ClusterWorkspaceType) SetConditions

func (in *ClusterWorkspaceType) SetConditions(conditions conditionsv1alpha1.Conditions)

type ClusterWorkspaceTypeExtension

type ClusterWorkspaceTypeExtension struct {
	// with are ClusterWorkspaceTypes whose initializers are added to the list
	// for the owning type, and for whom the owning type becomes an alias, as long
	// as all of their required types are not mentioned in without.
	//
	// +optional
	With []ClusterWorkspaceTypeReference `json:"with,omitempty"`
}

ClusterWorkspaceTypeExtension defines how other ClusterWorkspaceTypes are composed together to add functionality to the owning ClusterWorkspaceType.

func (*ClusterWorkspaceTypeExtension) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceTypeExtension.

func (*ClusterWorkspaceTypeExtension) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspaceTypeList

type ClusterWorkspaceTypeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ClusterWorkspaceType `json:"items"`
}

ClusterWorkspaceTypeList is a list of cluster workspace types

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ClusterWorkspaceTypeList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceTypeList.

func (*ClusterWorkspaceTypeList) DeepCopyInto

func (in *ClusterWorkspaceTypeList) DeepCopyInto(out *ClusterWorkspaceTypeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterWorkspaceTypeList) DeepCopyObject

func (in *ClusterWorkspaceTypeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterWorkspaceTypeName

type ClusterWorkspaceTypeName string

ClusterWorkspaceTypeName is a name of a ClusterWorkspaceType

+kubebuilder:validation:Pattern=`^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?`

func TypeName

func TypeName(objectName string) ClusterWorkspaceTypeName

TypeName converts the metadata.name of a ClusterWorkspaceType to the proper name of a type, as users interact with it.

type ClusterWorkspaceTypeReference

type ClusterWorkspaceTypeReference struct {
	// name is the name of the ClusterWorkspaceType
	//
	// +required
	// +kubebuilder:validation:Required
	Name ClusterWorkspaceTypeName `json:"name"`

	// path is an absolute reference to the workspace that owns this type, e.g. root:org:ws.
	//
	// +optional
	// +kubebuilder:validation:Pattern:="^root(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
	Path string `json:"path"`
}

ClusterWorkspaceTypeReference is a globally unique, fully qualified reference to a cluster workspace type.

func ReferenceFor

ReferenceFor returns a reference to the type.

func (*ClusterWorkspaceTypeReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceTypeReference.

func (*ClusterWorkspaceTypeReference) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterWorkspaceTypeReference) Equal

func (ClusterWorkspaceTypeReference) String

type ClusterWorkspaceTypeSelector

type ClusterWorkspaceTypeSelector struct {
	// none means that no type matches.
	//
	// +kuberbuilders:Enum=true
	None bool `json:"none,omitempty"`

	// types is a list of ClusterWorkspaceTypes that match. A workspace type extending
	// another workspace type automatically is considered as that extended type as well
	// (even transitively).
	//
	// An empty list matches all types.
	//
	// +optional
	// +kubebuilder:validation:MinItems=1
	Types []ClusterWorkspaceTypeReference `json:"types,omitempty"`
}

ClusterWorkspaceTypeSelector describes a set of types.

func (*ClusterWorkspaceTypeSelector) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceTypeSelector.

func (*ClusterWorkspaceTypeSelector) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspaceTypeSpec

type ClusterWorkspaceTypeSpec struct {
	// initializer determines if this ClusterWorkspaceType has an associated initializing
	// controller. These controllers are used to add functionality to a ClusterWorkspace;
	// all controllers must finish their work before the ClusterWorkspace becomes ready
	// for use.
	//
	// One initializing controller is supported per ClusterWorkspaceType; the identifier
	// for this initializer will be a colon-delimited string using the workspace in which
	// the ClusterWorkspaceType is defined, and the type's name. For example, if a
	// ClusterWorkspaceType `example` is created in the `root:org` workspace, the implicit
	// initializer name is `root:org:Example`.
	//
	// +optional
	Initializer bool `json:"initializer,omitempty"`

	// extend is a list of other ClusterWorkspaceTypes whose initializers and limitAllowedChildren
	// and limitAllowedParents this ClusterWorkspaceType is inheriting. By (transitively) extending
	// another ClusterWorkspaceType, this ClusterWorkspaceType will be considered as that
	// other type in evaluation of limitAllowedChildren and limitAllowedParents constraints.
	//
	// A dependency cycle stop this ClusterWorkspaceType from being admitted as the type
	// of a ClusterWorkspace.
	//
	// A non-existing dependency stop this ClusterWorkspaceType from being admitted as the type
	// of a ClusterWorkspace.
	//
	// +optional
	Extend ClusterWorkspaceTypeExtension `json:"extend,omitempty"`

	// additionalWorkspaceLabels are a set of labels that will be added to a
	// ClusterWorkspace on creation.
	//
	// +optional
	AdditionalWorkspaceLabels map[string]string `json:"additionalWorkspaceLabels,omitempty"`

	// defaultChildWorkspaceType is the ClusterWorkspaceType that will be used
	// by default if another, nested ClusterWorkspace is created in a workspace
	// of this type. When this field is unset, the user must specify a type when
	// creating nested workspaces. Extending another ClusterWorkspaceType does
	// not inherit its defaultChildWorkspaceType.
	//
	// +optional
	DefaultChildWorkspaceType *ClusterWorkspaceTypeReference `json:"defaultChildWorkspaceType,omitempty"`

	// limitAllowedChildren specifies constraints for sub-workspaces created in workspaces
	// of this type. These are in addition to child constraints of types this one extends.
	//
	// +optional
	LimitAllowedChildren *ClusterWorkspaceTypeSelector `json:"limitAllowedChildren,omitempty"`

	// limitAllowedParents specifies constraints for the parent workspace that workspaces
	// of this type are created in. These are in addition to parent constraints of types this one
	// extends.
	//
	// +optional
	LimitAllowedParents *ClusterWorkspaceTypeSelector `json:"limitAllowedParents,omitempty"`

	// defaultAPIBindings are the APIs to bind during initialization of workspaces created from this type.
	// The APIBinding names will be generated dynamically.
	//
	// +optional
	// +listType=map
	// +listMapKey=path
	// +listMapKey=exportName
	DefaultAPIBindings []APIExportReference `json:"defaultAPIBindings,omitempty"`
}

func (*ClusterWorkspaceTypeSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceTypeSpec.

func (*ClusterWorkspaceTypeSpec) DeepCopyInto

func (in *ClusterWorkspaceTypeSpec) DeepCopyInto(out *ClusterWorkspaceTypeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterWorkspaceTypeStatus

type ClusterWorkspaceTypeStatus struct {
	// conditions is a list of conditions that apply to the APIExport.
	//
	// +optional
	Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`

	// virtualWorkspaces contains all APIExport virtual workspace URLs.
	// +optional
	VirtualWorkspaces []VirtualWorkspace `json:"virtualWorkspaces,omitempty"`
}

ClusterWorkspaceTypeStatus defines the observed state of ClusterWorkspaceType.

func (*ClusterWorkspaceTypeStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceTypeStatus.

func (*ClusterWorkspaceTypeStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ShardConstraints

type ShardConstraints struct {
	// name is the name of ClusterWorkspaceShard.
	//
	// +optional
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
	Name string `json:"name,omitempty"`

	// selector is a label selector that filters shard scheduling targets.
	//
	// +optional
	Selector *metav1.LabelSelector `json:"selector,omitempty"`
}

func (*ShardConstraints) DeepCopy

func (in *ShardConstraints) DeepCopy() *ShardConstraints

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardConstraints.

func (*ShardConstraints) DeepCopyInto

func (in *ShardConstraints) DeepCopyInto(out *ShardConstraints)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VirtualWorkspace

type VirtualWorkspace struct {
	// url is a ClusterWorkspaceType initialization virtual workspace URL.
	//
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:format:URL
	// +required
	URL string `json:"url"`
}

func (*VirtualWorkspace) DeepCopy

func (in *VirtualWorkspace) DeepCopy() *VirtualWorkspace

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualWorkspace.

func (*VirtualWorkspace) DeepCopyInto

func (in *VirtualWorkspace) DeepCopyInto(out *VirtualWorkspace)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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