Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=tenancy.kcp.dev +k8s:openapi-gen=true
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type ClusterWorkspace
- func (in *ClusterWorkspace) DeepCopy() *ClusterWorkspace
- func (in *ClusterWorkspace) DeepCopyInto(out *ClusterWorkspace)
- func (in *ClusterWorkspace) DeepCopyObject() runtime.Object
- func (in *ClusterWorkspace) GetConditions() conditionsv1alpha1.Conditions
- func (in *ClusterWorkspace) SetConditions(c conditionsv1alpha1.Conditions)
- type ClusterWorkspaceInitializer
- type ClusterWorkspaceList
- type ClusterWorkspaceLocation
- type ClusterWorkspacePhaseType
- type ClusterWorkspaceShard
- func (in *ClusterWorkspaceShard) DeepCopy() *ClusterWorkspaceShard
- func (in *ClusterWorkspaceShard) DeepCopyInto(out *ClusterWorkspaceShard)
- func (in *ClusterWorkspaceShard) DeepCopyObject() runtime.Object
- func (in *ClusterWorkspaceShard) GetConditions() conditionsv1alpha1.Conditions
- func (in *ClusterWorkspaceShard) SetConditions(c conditionsv1alpha1.Conditions)
- type ClusterWorkspaceShardList
- type ClusterWorkspaceShardSpec
- type ClusterWorkspaceShardStatus
- type ClusterWorkspaceSpec
- type ClusterWorkspaceStatus
- type ClusterWorkspaceType
- type ClusterWorkspaceTypeList
- type ClusterWorkspaceTypeSpec
Constants ¶
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" // 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" )
These are valid conditions of workspace.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var RootCluster = logicalcluster.New("root")
RootCluster is the root of ClusterWorkspace based logical clusters.
var SchemeGroupVersion = schema.GroupVersion{Group: tenancy.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
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="Type",type=string,JSONPath=`.spec.type`,description="Type of the workspace" +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The current phase (e.g. Scheduling, Initializing, Ready)" +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.status.baseURL`,description="URL to access the workspace"
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.
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 ¶
func (in *ClusterWorkspaceList) DeepCopy() *ClusterWorkspaceList
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 ¶
func (in *ClusterWorkspaceLocation) DeepCopy() *ClusterWorkspaceLocation
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"
func (*ClusterWorkspaceShard) DeepCopy ¶
func (in *ClusterWorkspaceShard) DeepCopy() *ClusterWorkspaceShard
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 (in *ClusterWorkspaceShard) GetConditions() conditionsv1alpha1.Conditions
func (*ClusterWorkspaceShard) SetConditions ¶
func (in *ClusterWorkspaceShard) SetConditions(c conditionsv1alpha1.Conditions)
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 ¶
func (in *ClusterWorkspaceShardList) DeepCopy() *ClusterWorkspaceShardList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceShardList.
func (*ClusterWorkspaceShardList) DeepCopyInto ¶
func (in *ClusterWorkspaceShardList) DeepCopyInto(out *ClusterWorkspaceShardList)
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. // // This will be defaulted to the shard's external address if not specified. Note that this // is only sensible in single-shards setups. // // +kubebuilder:validation:Format=uri // +kubebuilder:validation:MinLength=1 // +optional 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. // // +kubebuilder:validation:Format=uri // +kubebuilder:validation:MinLength=1 // +kubebuilder:Required // +required ExternalURL string `json:"externalURL"` }
ClusterWorkspaceShardSpec holds the desired state of the ClusterWorkspaceShard.
func (*ClusterWorkspaceShardSpec) DeepCopy ¶
func (in *ClusterWorkspaceShardSpec) DeepCopy() *ClusterWorkspaceShardSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceShardSpec.
func (*ClusterWorkspaceShardSpec) DeepCopyInto ¶
func (in *ClusterWorkspaceShardSpec) DeepCopyInto(out *ClusterWorkspaceShardSpec)
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 ¶
func (in *ClusterWorkspaceShardStatus) DeepCopy() *ClusterWorkspaceShardStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWorkspaceShardStatus.
func (*ClusterWorkspaceShardStatus) DeepCopyInto ¶
func (in *ClusterWorkspaceShardStatus) DeepCopyInto(out *ClusterWorkspaceShardStatus)
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). // // The type is a reference to a ClusterWorkspaceType in the same workspace // with the same name, but lower-cased. The ClusterWorkspaceType existence is // validated at admission during creation, with the exception of the // "Universal" type whose existence is not required but respected if it exists. // The type is immutable after creation. The use of a type is gated via // the RBAC clusterworkspacetypes/use resource permission. // // +optional // +kubebuilder:default:="Universal" // +kubebuilder:validation:Pattern=`^[A-Z][a-zA-Z0-9]+$` Type string `json:"type,omitempty"` }
ClusterWorkspaceSpec holds the desired state of the ClusterWorkspace.
func (*ClusterWorkspaceSpec) DeepCopy ¶
func (in *ClusterWorkspaceSpec) DeepCopy() *ClusterWorkspaceSpec
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 ¶
func (in *ClusterWorkspaceStatus) DeepCopy() *ClusterWorkspaceStatus
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"` }
ClusterWorkspaceType specifies behaviour of workspaces of this type.
+crd +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster,categories=kcp
func (*ClusterWorkspaceType) DeepCopy ¶
func (in *ClusterWorkspaceType) DeepCopy() *ClusterWorkspaceType
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.
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 ¶
func (in *ClusterWorkspaceTypeList) DeepCopy() *ClusterWorkspaceTypeList
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 ClusterWorkspaceTypeSpec ¶
type ClusterWorkspaceTypeSpec struct { // initializers are set of a ClusterWorkspace on creation 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. // // +optional Initializers []ClusterWorkspaceInitializer `json:"initializers,omitempty"` // additionalWorkspaceLabels are a set of labels that will be added to a // ClusterWorkspace on creation. // // +optional AdditionalWorkspaceLabels map[string]string `json:"additionalWorkspaceLabels,omitempty"` }
func (*ClusterWorkspaceTypeSpec) DeepCopy ¶
func (in *ClusterWorkspaceTypeSpec) DeepCopy() *ClusterWorkspaceTypeSpec
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.