Documentation
¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=tenancy.kcp.io +k8s:openapi-gen=true
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func ObjectName(typeName WorkspaceTypeName) string
- func Resource(resource string) schema.GroupResource
- func WorkspaceTypeReservedNames() []string
- type APIExportReference
- type Mount
- type MountPhaseType
- type MountSpec
- type MountStatus
- type VirtualWorkspace
- type Workspace
- type WorkspaceList
- type WorkspaceLocation
- type WorkspaceSpec
- type WorkspaceStatus
- type WorkspaceType
- func (in *WorkspaceType) DeepCopy() *WorkspaceType
- func (in *WorkspaceType) DeepCopyInto(out *WorkspaceType)
- func (in *WorkspaceType) DeepCopyObject() runtime.Object
- func (in *WorkspaceType) GetConditions() conditionsv1alpha1.Conditions
- func (in *WorkspaceType) SetConditions(conditions conditionsv1alpha1.Conditions)
- type WorkspaceTypeExtension
- type WorkspaceTypeList
- type WorkspaceTypeName
- type WorkspaceTypeReference
- type WorkspaceTypeSelector
- type WorkspaceTypeSpec
- type WorkspaceTypeStatus
Constants ¶
const ( // ExperimentalWorkspaceOwnerAnnotationKey is the annotation key used to indicate the owner of the workspace. ExperimentalWorkspaceOwnerAnnotationKey string = "experimental.tenancy.kcp.io/owner" // ExperimentalWorkspaceMountAnnotationKey is the annotation key used to indicate the mounts of the workspace. ExperimentalWorkspaceMountAnnotationKey string = "experimental.tenancy.kcp.io/mount" // ExperimentalIsMountAnnotationKey is the annotation key used to indicate that object is a mount. ExperimentalIsMountAnnotationKey string = "experimental.tenancy.kcp.io/is-mount" )
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" // WorkspaceContentDeleted represents the status that all resources in the workspace are 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" // WorkspaceInitializedWorkspaceDisappeared reason in WorkspaceInitialized condition means that the LogicalCluster // object has disappeared. WorkspaceInitializedWorkspaceDisappeared = "WorkspaceDisappeared" // 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" // WorkspaceInitializedWorkspaceTypeInvalid is a reason for the APIBindingsInitialized // condition that indicates something is invalid with the WorkspaceType (e.g. a cycle trying // to resolve all the transitive types). WorkspaceInitializedWorkspaceTypeInvalid = "WorkspaceTypesInvalid" // 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.
const ( WorkspaceTypeVirtualWorkspaceURLsReady conditionsv1alpha1.ConditionType = "VirtualWorkspaceURLsReady" ErrorGeneratingURLsReason = "ErrorGeneratingURLs" )
These are valid conditions of WorkspaceType.
const ( // WorkspacePhaseLabel holds the Workspace.Status.Phase value, and is enforced to match // by a mutating admission webhook. WorkspacePhaseLabel = "tenancy.kcp.io/phase" // WorkspaceInitializerLabelPrefix is the prefix for labels which match Workspace.Status.Initializers, // and the set of labels with this prefix is enforced to match the set of initializers by a mutating admission // webhook. WorkspaceInitializerLabelPrefix = "initializer.internal.kcp.io/" )
const LogicalClusterTypeAnnotationKey = "internal.tenancy.kcp.io/type"
LogicalClusterTypeAnnotationKey is the annotation key used to indicate the type of the workspace on the corresponding LogicalCluster object. Its format is "root:ws:name".
const ( // RootWorkspaceTypeName is a reference to the root logical cluster, which has no workspace type. RootWorkspaceTypeName = WorkspaceTypeName("root") )
const WorkspaceAPIBindingsInitializer corev1alpha1.LogicalClusterInitializer = "system:apibindings"
WorkspaceAPIBindingsInitializer is a special-case initializer that waits for APIBindings defined on a WorkspaceType to be created.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: tenancy.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func ObjectName ¶
func ObjectName(typeName WorkspaceTypeName) string
ObjectName converts the proper name of a type that users interact with to the metadata.name of the WorkspaceType object.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
func WorkspaceTypeReservedNames ¶
func WorkspaceTypeReservedNames() []string
WorkspaceTypeReservedNames defines the set of names that may not be used on user-supplied WorkspaceTypes. TODO(hasheddan): tie this definition of reserved names to the patches used to apply the same restrictions to the OpenAPISchema.
Types ¶
type APIExportReference ¶
type APIExportReference struct {
// path is the fully-qualified path to the workspace containing the APIExport. If it is
// empty, the current workspace is assumed.
//
// +optional
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Pattern:="^[a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
Path string `json:"path,omitempty"`
// export is the name of the APIExport.
//
// +required
// +kubebuilder:validation:Required
// +kube:validation:MinLength=1
Export string `json:"export"`
}
APIExportReference provides the fields necessary to resolve an APIExport.
func (*APIExportReference) DeepCopy ¶
func (in *APIExportReference) DeepCopy() *APIExportReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIExportReference.
func (*APIExportReference) DeepCopyInto ¶
func (in *APIExportReference) DeepCopyInto(out *APIExportReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Mount ¶ added in v0.22.0
type Mount struct {
// MountSpec is the spec of the mount.
MountSpec MountSpec `json:"spec,omitempty"`
// MountStatus is the status of the mount.
MountStatus MountStatus `json:"status,omitempty"`
}
Mount is a workspace mount that can be used to mount a workspace into another workspace or resource. Mounting itself is done at front proxy level.
func ParseTenancyMountAnnotation ¶ added in v0.22.0
ParseTenancyMountAnnotation parses the value of the annotation into a Mount.
func (*Mount) DeepCopy ¶ added in v0.22.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mount.
func (*Mount) DeepCopyInto ¶ added in v0.22.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MountPhaseType ¶ added in v0.22.0
type MountPhaseType string
MountPhaseType is the type of the current phase of the mount (Initializing, Connecting, Ready, Unknown).
+kubebuilder:validation:Enum=Initializing;Connecting;Ready;Unknown
const ( // Initializing means the cluster proxy is being initialized. MountPhaseInitializing MountPhaseType = "Initializing" // Connecting means the cluster proxy is waiting for the agent to connect. MountPhaseConnecting MountPhaseType = "Connecting" // Ready means the cluster proxy is ready, and agent connected. MountPhaseReady MountPhaseType = "Ready" // Unknown means the cluster proxy status is unknown. MountPhaseUnknown MountPhaseType = "Unknown" )
type MountSpec ¶ added in v0.22.0
type MountSpec struct {
// Reference is an ObjectReference to the object that is mounted.
Reference *corev1.ObjectReference `json:"ref,omitempty"`
}
func (*MountSpec) DeepCopy ¶ added in v0.22.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountSpec.
func (*MountSpec) DeepCopyInto ¶ added in v0.22.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MountStatus ¶ added in v0.22.0
type MountStatus struct {
// Phase of the mount (Initializing, Connecting, Ready, Unknown).
//
// +kubebuilder:default=Initializing
Phase MountPhaseType `json:"phase,omitempty"`
// Conditions is a list of conditions and their status.
// Current processing state of the Mount.
// +optional
Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`
// URL is the URL of the mount. Mount is considered mountable when URL is set.
// +optional
URL string `json:"url,omitempty"`
}
MountStatus is the status of a mount. It is used to indicate the status of a mount, potentially managed outside of the core API.
func (*MountStatus) DeepCopy ¶ added in v0.22.0
func (in *MountStatus) DeepCopy() *MountStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountStatus.
func (*MountStatus) DeepCopyInto ¶ added in v0.22.0
func (in *MountStatus) DeepCopyInto(out *MountStatus)
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 WorkspaceType 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.
type Workspace ¶
type Workspace struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkspaceSpec `json:"spec"`
// +optional
Status WorkspaceStatus `json:"status,omitempty"`
}
Workspace defines a generic Kubernetes-cluster-like endpoint, with standard Kubernetes discovery APIs, OpenAPI and resource API endpoints.
A workspace can be backed by different concrete types of workspace implementation, depending on access pattern. All workspace implementations share the characteristic that the URL that serves a given workspace can be used with standard Kubernetes API machinery and client libraries and command line tools.
+crd +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=kcp,shortName=ws +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type.name`,description="Type of the workspace" +kubebuilder:printcolumn:name="Region",type=string,JSONPath=`.metadata.labels['region']`,description="The region this workspace is in" +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.metadata.labels['tenancy\.kcp\.io/phase']`,description="The current phase (e.g. Scheduling, Initializing, Ready, Deleting)" +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.spec.URL`,description="URL to access the workspace" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Workspace) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace.
func (*Workspace) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workspace) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Workspace) GetConditions ¶
func (in *Workspace) GetConditions() conditionsv1alpha1.Conditions
func (*Workspace) SetConditions ¶
func (in *Workspace) SetConditions(c conditionsv1alpha1.Conditions)
type WorkspaceList ¶
type WorkspaceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Workspace `json:"items"`
}
WorkspaceList is a list of Workspaces
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkspaceList) DeepCopy ¶
func (in *WorkspaceList) DeepCopy() *WorkspaceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceList.
func (*WorkspaceList) DeepCopyInto ¶
func (in *WorkspaceList) DeepCopyInto(out *WorkspaceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceList) DeepCopyObject ¶
func (in *WorkspaceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspaceLocation ¶
type WorkspaceLocation struct {
// selector is a label selector that filters workspace scheduling targets.
//
// +optional
Selector *metav1.LabelSelector `json:"selector,omitempty"`
}
func (*WorkspaceLocation) DeepCopy ¶
func (in *WorkspaceLocation) DeepCopy() *WorkspaceLocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceLocation.
func (*WorkspaceLocation) DeepCopyInto ¶
func (in *WorkspaceLocation) DeepCopyInto(out *WorkspaceLocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceSpec ¶
type WorkspaceSpec struct {
// 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 WorkspaceType in the listed workspace, but
// lower-cased. The WorkspaceType existence is validated at admission during
// creation. The type is immutable after creation. The use of a type is gated via
// the RBAC workspacetypes/use resource permission.
//
// +optional
// +kubebuilder:validation:XValidation:rule="self.name == oldSelf.name",message="name is immutable"
// +kubebuilder:validation:XValidation:rule="has(oldSelf.path) == has(self.path)",message="path is immutable"
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.path) || !has(self.path) || self.path == oldSelf.path",message="path is immutable"
Type WorkspaceTypeReference `json:"type,omitempty"`
// location constraints where this workspace can be scheduled to.
//
// If the no location is specified, an arbitrary location is chosen.
//
// +optional
Location *WorkspaceLocation `json:"location,omitempty"`
// cluster is the name of the logical cluster this workspace is stored under.
//
// Set by the system.
//
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cluster is immutable"
Cluster string `json:"cluster,omitempty"`
// URL is the address under which the Kubernetes-cluster-like endpoint
// can be found. This URL can be used to access the workspace with standard Kubernetes
// client libraries and command line tools.
//
// Set by the system.
//
// +kubebuilder:format:uri
URL string `json:"URL,omitempty"`
}
WorkspaceSpec holds the desired state of the Workspace. +kubebuilder:validation:XValidation:rule="!has(oldSelf.URL) || has(self.URL)",message="URL cannot be unset" +kubebuilder:validation:XValidation:rule="!has(oldSelf.cluster) || has(self.cluster)",message="cluster cannot be unset"
func (*WorkspaceSpec) DeepCopy ¶
func (in *WorkspaceSpec) DeepCopy() *WorkspaceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceSpec.
func (*WorkspaceSpec) DeepCopyInto ¶
func (in *WorkspaceSpec) DeepCopyInto(out *WorkspaceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceStatus ¶
type WorkspaceStatus struct {
// Phase of the workspace (Scheduling, Initializing, Ready).
//
// +kubebuilder:default=Scheduling
Phase corev1alpha1.LogicalClusterPhaseType `json:"phase,omitempty"`
// Current processing state of the Workspace.
// +optional
Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`
// initializers must be cleared by a controller before the workspace is ready
// and can be used.
//
// +optional
Initializers []corev1alpha1.LogicalClusterInitializer `json:"initializers,omitempty"`
}
WorkspaceStatus communicates the observed state of the Workspace.
func (*WorkspaceStatus) DeepCopy ¶
func (in *WorkspaceStatus) DeepCopy() *WorkspaceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus.
func (*WorkspaceStatus) DeepCopyInto ¶
func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceType ¶
type WorkspaceType struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// +optional
Spec WorkspaceTypeSpec `json:"spec,omitempty"`
// +optional
Status WorkspaceTypeStatus `json:"status,omitempty"`
}
WorkspaceType 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 (*WorkspaceType) DeepCopy ¶
func (in *WorkspaceType) DeepCopy() *WorkspaceType
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceType.
func (*WorkspaceType) DeepCopyInto ¶
func (in *WorkspaceType) DeepCopyInto(out *WorkspaceType)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceType) DeepCopyObject ¶
func (in *WorkspaceType) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*WorkspaceType) GetConditions ¶
func (in *WorkspaceType) GetConditions() conditionsv1alpha1.Conditions
func (*WorkspaceType) SetConditions ¶
func (in *WorkspaceType) SetConditions(conditions conditionsv1alpha1.Conditions)
type WorkspaceTypeExtension ¶
type WorkspaceTypeExtension struct {
// with are WorkspaceTypes 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 []WorkspaceTypeReference `json:"with,omitempty"`
}
WorkspaceTypeExtension defines how other WorkspaceTypes are composed together to add functionality to the owning WorkspaceType.
func (*WorkspaceTypeExtension) DeepCopy ¶
func (in *WorkspaceTypeExtension) DeepCopy() *WorkspaceTypeExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTypeExtension.
func (*WorkspaceTypeExtension) DeepCopyInto ¶
func (in *WorkspaceTypeExtension) DeepCopyInto(out *WorkspaceTypeExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceTypeList ¶
type WorkspaceTypeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []WorkspaceType `json:"items"`
}
WorkspaceTypeList is a list of workspace types
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkspaceTypeList) DeepCopy ¶
func (in *WorkspaceTypeList) DeepCopy() *WorkspaceTypeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTypeList.
func (*WorkspaceTypeList) DeepCopyInto ¶
func (in *WorkspaceTypeList) DeepCopyInto(out *WorkspaceTypeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceTypeList) DeepCopyObject ¶
func (in *WorkspaceTypeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspaceTypeName ¶
type WorkspaceTypeName string
WorkspaceTypeName is a name of a WorkspaceType
+kubebuilder:validation:Pattern=`^[a-z]([a-z0-9-]{0,61}[a-z0-9])?`
func TypeName ¶
func TypeName(objectName string) WorkspaceTypeName
TypeName converts the metadata.name of a WorkspaceType to the proper name of a type, as users interact with it.
type WorkspaceTypeReference ¶
type WorkspaceTypeReference struct {
// name is the name of the WorkspaceType
//
// +required
// +kubebuilder:validation:Required
Name WorkspaceTypeName `json:"name"`
// path is an absolute reference to the workspace that owns this type, e.g. root:org:ws.
//
// +optional
// +kubebuilder:validation:Pattern:="^[a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
Path string `json:"path,omitempty"`
}
WorkspaceTypeReference is a globally unique, fully qualified reference to a workspace type.
func (*WorkspaceTypeReference) DeepCopy ¶
func (in *WorkspaceTypeReference) DeepCopy() *WorkspaceTypeReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTypeReference.
func (*WorkspaceTypeReference) DeepCopyInto ¶
func (in *WorkspaceTypeReference) DeepCopyInto(out *WorkspaceTypeReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (WorkspaceTypeReference) String ¶
func (r WorkspaceTypeReference) String() string
type WorkspaceTypeSelector ¶
type WorkspaceTypeSelector struct {
// none means that no type matches.
//
// +kuberbuilders:Enum=true
None bool `json:"none,omitempty"`
// types is a list of WorkspaceTypes 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 []WorkspaceTypeReference `json:"types,omitempty"`
}
WorkspaceTypeSelector describes a set of types.
func (*WorkspaceTypeSelector) DeepCopy ¶
func (in *WorkspaceTypeSelector) DeepCopy() *WorkspaceTypeSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTypeSelector.
func (*WorkspaceTypeSelector) DeepCopyInto ¶
func (in *WorkspaceTypeSelector) DeepCopyInto(out *WorkspaceTypeSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceTypeSpec ¶
type WorkspaceTypeSpec struct {
// initializer determines if this WorkspaceType has an associated initializing
// controller. These controllers are used to add functionality to a Workspace;
// all controllers must finish their work before the Workspace becomes ready
// for use.
//
// One initializing controller is supported per WorkspaceType; the identifier
// for this initializer will be a colon-delimited string using the workspace in which
// the WorkspaceType is defined, and the type's name. For example, if a
// WorkspaceType `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 WorkspaceTypes whose initializers and limitAllowedChildren
// and limitAllowedParents this WorkspaceType is inheriting. By (transitively) extending
// another WorkspaceType, this WorkspaceType will be considered as that
// other type in evaluation of limitAllowedChildren and limitAllowedParents constraints.
//
// A dependency cycle stop this WorkspaceType from being admitted as the type
// of a Workspace.
//
// A non-existing dependency stop this WorkspaceType from being admitted as the type
// of a Workspace.
//
// +optional
Extend WorkspaceTypeExtension `json:"extend,omitempty"`
// additionalWorkspaceLabels are a set of labels that will be added to a
// Workspace on creation.
//
// +optional
AdditionalWorkspaceLabels map[string]string `json:"additionalWorkspaceLabels,omitempty"`
// defaultChildWorkspaceType is the WorkspaceType that will be used
// by default if another, nested Workspace 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 WorkspaceType does
// not inherit its defaultChildWorkspaceType.
//
// +optional
DefaultChildWorkspaceType *WorkspaceTypeReference `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 *WorkspaceTypeSelector `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 *WorkspaceTypeSelector `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
DefaultAPIBindings []APIExportReference `json:"defaultAPIBindings,omitempty"`
}
func (*WorkspaceTypeSpec) DeepCopy ¶
func (in *WorkspaceTypeSpec) DeepCopy() *WorkspaceTypeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTypeSpec.
func (*WorkspaceTypeSpec) DeepCopyInto ¶
func (in *WorkspaceTypeSpec) DeepCopyInto(out *WorkspaceTypeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceTypeStatus ¶
type WorkspaceTypeStatus 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"`
}
WorkspaceTypeStatus defines the observed state of WorkspaceType.
func (*WorkspaceTypeStatus) DeepCopy ¶
func (in *WorkspaceTypeStatus) DeepCopy() *WorkspaceTypeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceTypeStatus.
func (*WorkspaceTypeStatus) DeepCopyInto ¶
func (in *WorkspaceTypeStatus) DeepCopyInto(out *WorkspaceTypeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.