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 APIBindingLifecycleMode
- type APIExportReference
- type AudienceMatchPolicyType
- type AuthenticationConfigurationReference
- type ClaimMappings
- type ClaimOrExpression
- type ClaimValidationRule
- type ExtraMapping
- type Issuer
- type JWTAuthenticator
- type Mount
- type MountPhaseType
- type ObjectReference
- type PrefixedClaimOrExpression
- type UserValidationRule
- type VirtualWorkspace
- type Workspace
- type WorkspaceAuthenticationConfiguration
- type WorkspaceAuthenticationConfigurationList
- func (in *WorkspaceAuthenticationConfigurationList) DeepCopy() *WorkspaceAuthenticationConfigurationList
- func (in *WorkspaceAuthenticationConfigurationList) DeepCopyInto(out *WorkspaceAuthenticationConfigurationList)
- func (in *WorkspaceAuthenticationConfigurationList) DeepCopyObject() runtime.Object
- type WorkspaceAuthenticationConfigurationSpec
- 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 ( // MountConditionReady is the condition type for MountReady. MountConditionReady conditionsv1alpha1.ConditionType = "WorkspaceMountReady" // MountAnnotationInvalidReason is the reason for the mount annotation being invalid. MountAnnotationInvalidReason = "MountAnnotationInvalid" // MountObjectNotFoundReason is the reason for the mount object not being found. MountObjectNotFoundReason = "MountObjectNotFound" // MountObjectNotReadyReason is the reason for the mount object not being in ready phase. MountObjectNotReadyReason = "MountObjectNotReady" )
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" )
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" // WorkspaceAPIBindingsReconciled represents the status of the reconcile APIBindings for the workspace. WorkspaceAPIBindingsReconciled conditionsv1alpha1.ConditionType = "APIBindingsReconciled" // WorkspaceInitializedWaitingOnAPIBindings is a reason for the APIBindingsInitialized condition that indicates // at least one APIBinding is not ready. WorkspaceReconciledWaitingOnAPIBindings = WorkspaceInitializedWaitingOnAPIBindings // 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). WorkspaceReconciledWorkspaceTypeInvalid = WorkspaceInitializedWorkspaceTypeInvalid // WorkspaceInitializedAPIBindingErrors is a reason for the APIBindingsInitialized condition that indicates there // were errors trying to initialize APIBindings for the workspace. WorkspaceReconciledAPIBindingErrors = WorkspaceInitializedAPIBindingErrors )
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/" // WorkspaceTerminatorLabelPrefix is the prefix for labels which match Workspace.Status.Terminators, // and the set of labels with this prefix is enforced to match the set of terminator by a mutating admission // webhook. WorkspaceTerminatorLabelPrefix = "terminator.internal.kcp.io/" )
const ( // ExperimentalDefaultAPIBindingLifecycleAnnotationKey is used to configure the maintenance mode of the defaultAPIBindings. ExperimentalDefaultAPIBindingLifecycleAnnotationKey string = "experimental.tenancy.kcp.io/default-api-binding-lifecycle" )
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 APIBindingLifecycleMode ¶
type APIBindingLifecycleMode string
APIBindingLifecycleMode defines how the lifecycle of an APIBinding is managed.
const ( // APIBindingLifecycleModeInitializeOnly defines that the APIBinding is // only initialized once upon workspace creation. APIBindingLifecycleModeInitializeOnly APIBindingLifecycleMode = "InitializeOnly" // APIBindingLifecycleModeInitializeOnly defines that the APIBinding is // continuously reconciled. APIBindingLifecycleModeMaintain APIBindingLifecycleMode = "Maintain" )
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 AudienceMatchPolicyType ¶
type AudienceMatchPolicyType string
AudienceMatchPolicyType is a set of valid values for Issuer.AudienceMatchPolicy.
const (
AudienceMatchPolicyMatchAny AudienceMatchPolicyType = "MatchAny"
)
Valid types for AudienceMatchPolicyType.
type AuthenticationConfigurationReference ¶
type AuthenticationConfigurationReference struct {
// name is the name of the WorkspaceAuthenticationConfiguration.
//
// +required
// +kubebuilder:validation:Required
// +kube:validation:MinLength=1
Name string `json:"name"`
}
AuthenticationConfigurationReference provides the fields necessary to resolve a WorkspaceAuthenticationConfiguration.
func (*AuthenticationConfigurationReference) DeepCopy ¶
func (in *AuthenticationConfigurationReference) DeepCopy() *AuthenticationConfigurationReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationConfigurationReference.
func (*AuthenticationConfigurationReference) DeepCopyInto ¶
func (in *AuthenticationConfigurationReference) DeepCopyInto(out *AuthenticationConfigurationReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClaimMappings ¶
type ClaimMappings struct {
Username PrefixedClaimOrExpression `json:"username,omitempty"`
Groups PrefixedClaimOrExpression `json:"groups,omitempty"`
// +optional
UID ClaimOrExpression `json:"uid,omitempty"`
// +optional
Extra []ExtraMapping `json:"extra,omitempty"`
}
ClaimMappings provides the configuration for claim mapping.
func (*ClaimMappings) DeepCopy ¶
func (in *ClaimMappings) DeepCopy() *ClaimMappings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimMappings.
func (*ClaimMappings) DeepCopyInto ¶
func (in *ClaimMappings) DeepCopyInto(out *ClaimMappings)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClaimOrExpression ¶
type ClaimOrExpression struct {
// +optional
// +kubebuilder:validation:MinLength=1
Claim string `json:"claim,omitempty"`
// +optional
// +kubebuilder:validation:MinLength=1
Expression string `json:"expression,omitempty"`
}
ClaimOrExpression provides the configuration for a single claim or expression. +kubebuilder:validation:XValidation:rule="!(has(self.claim) && has(self.expression))",message="claim and expression cannot both be specified"
func (*ClaimOrExpression) DeepCopy ¶
func (in *ClaimOrExpression) DeepCopy() *ClaimOrExpression
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimOrExpression.
func (*ClaimOrExpression) DeepCopyInto ¶
func (in *ClaimOrExpression) DeepCopyInto(out *ClaimOrExpression)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClaimValidationRule ¶
type ClaimValidationRule struct {
// +optional
// +kubebuilder:validation:MinLength=1
Claim string `json:"claim,omitempty"`
// +optional
// +kubebuilder:validation:MinLength=1
RequiredValue string `json:"requiredValue,omitempty"`
// +optional
// +kubebuilder:validation:MinLength=1
Expression string `json:"expression,omitempty"`
// +optional
// +kubebuilder:validation:MinLength=1
Message string `json:"message,omitempty"`
}
ClaimValidationRule provides the configuration for a single claim validation rule. +kubebuilder:validation:XValidation:rule="has(self.claim) || has(self.expression)",message="either claim or expression must be specified" +kubebuilder:validation:XValidation:rule="!(has(self.claim) && has(self.expression))",message="claim and expression cannot both be specified" +kubebuilder:validation:XValidation:rule="(has(self.expression) && !has(self.requiredValue)) || (has(self.claim) && has(self.requiredValue))",message="requiredValue can only be specified when claim is specified" +kubebuilder:validation:XValidation:rule="(has(self.expression) && has(self.message)) || (has(self.claim) && !has(self.message))",message="message can only be specified when expression is specified"
func (*ClaimValidationRule) DeepCopy ¶
func (in *ClaimValidationRule) DeepCopy() *ClaimValidationRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimValidationRule.
func (*ClaimValidationRule) DeepCopyInto ¶
func (in *ClaimValidationRule) DeepCopyInto(out *ClaimValidationRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExtraMapping ¶
type ExtraMapping struct {
Key string `json:"key"`
ValueExpression string `json:"valueExpression"`
}
ExtraMapping provides the configuration for a single extra mapping.
func (*ExtraMapping) DeepCopy ¶
func (in *ExtraMapping) DeepCopy() *ExtraMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraMapping.
func (*ExtraMapping) DeepCopyInto ¶
func (in *ExtraMapping) DeepCopyInto(out *ExtraMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Issuer ¶
type Issuer struct {
// url points to the issuer URL in a format https://url or https://url/path.
// This must match the "iss" claim in the presented JWT, and the issuer returned from discovery.
// Same value as the --oidc-issuer-url flag.
// Discovery information is fetched from "{url}/.well-known/openid-configuration" unless overridden by discoveryURL.
// Required to be unique across all JWT authenticators.
// Note that egress selection configuration is not used for this network connection.
// +required
URL string `json:"url"`
// discoveryURL, if specified, overrides the URL used to fetch discovery
// information instead of using "{url}/.well-known/openid-configuration".
// The exact value specified is used, so "/.well-known/openid-configuration"
// must be included in discoveryURL if needed.
//
// The "issuer" field in the fetched discovery information must match the "issuer.url" field
// in the AuthenticationConfiguration and will be used to validate the "iss" claim in the presented JWT.
// This is for scenarios where the well-known and jwks endpoints are hosted at a different
// location than the issuer (such as locally in the cluster).
//
// Example:
// A discovery url that is exposed using kubernetes service 'oidc' in namespace 'oidc-namespace'
// and discovery information is available at '/.well-known/openid-configuration'.
// discoveryURL: "https://oidc.oidc-namespace/.well-known/openid-configuration"
// certificateAuthority is used to verify the TLS connection and the hostname on the leaf certificate
// must be set to 'oidc.oidc-namespace'.
//
// curl https://oidc.oidc-namespace/.well-known/openid-configuration (.discoveryURL field)
// {
// issuer: "https://oidc.example.com" (.url field)
// }
//
// discoveryURL must be different from url.
// Required to be unique across all JWT authenticators.
// Note that egress selection configuration is not used for this network connection.
// +optional
DiscoveryURL string `json:"discoveryURL,omitempty"`
// +optional
CertificateAuthority string `json:"certificateAuthority,omitempty"`
// +optional
Audiences []string `json:"audiences,omitempty"`
// +optional
AudienceMatchPolicy AudienceMatchPolicyType `json:"audienceMatchPolicy,omitempty"`
}
Issuer provides the configuration for an external provider's specific settings.
func (*Issuer) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Issuer.
func (*Issuer) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JWTAuthenticator ¶
type JWTAuthenticator struct {
Issuer Issuer `json:"issuer"`
// +optional
ClaimValidationRules []ClaimValidationRule `json:"claimValidationRules,omitempty"`
ClaimMappings ClaimMappings `json:"claimMappings"`
// +optional
UserValidationRules []UserValidationRule `json:"userValidationRules,omitempty"`
}
func (*JWTAuthenticator) DeepCopy ¶
func (in *JWTAuthenticator) DeepCopy() *JWTAuthenticator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTAuthenticator.
func (*JWTAuthenticator) DeepCopyInto ¶
func (in *JWTAuthenticator) DeepCopyInto(out *JWTAuthenticator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Mount ¶
type Mount struct {
// Reference is an ObjectReference to the object that is mounted.
//
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="has(oldSelf.apiVersion) == has(self.apiVersion)",message="apiVersion is immutable"
// +kubebuilder:validation:XValidation:rule="has(oldSelf.kind) == has(self.kind)",message="kind is immutable"
// +kubebuilder:validation:XValidation:rule="has(oldSelf.name) == has(self.name)",message="name is immutable"
Reference ObjectReference `json:"ref"`
}
Mount is a reference to an object implementing a mounting feature. It is used to orchestrate where the traffic, intended for the workspace, is sent.
func (*Mount) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mount.
func (*Mount) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MountPhaseType ¶
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 ( // MountPhaseInitializing means the cluster proxy is being initialized. MountPhaseInitializing MountPhaseType = "Initializing" // MountPhaseConnecting means the cluster proxy is waiting for the agent to connect. MountPhaseConnecting MountPhaseType = "Connecting" // MountPhaseReady means the cluster proxy is ready, and agent connected. MountPhaseReady MountPhaseType = "Ready" // MountPhaseUnknown means the cluster proxy status is unknown. MountPhaseUnknown MountPhaseType = "Unknown" )
type ObjectReference ¶
type ObjectReference struct {
// APIVersion is the API group and version of the object.
//
// +required
APIVersion string `json:"apiVersion"`
// Kind is the kind of the object.
//
// +required
Kind string `json:"kind"`
// Name is the name of the object.
//
// +required
Name string `json:"name"`
// Namespace is the namespace of the object.
//
// +optional
Namespace string `json:"namespace,omitempty"`
}
func (*ObjectReference) DeepCopy ¶
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ObjectReference) GroupVersionKind ¶
func (r ObjectReference) GroupVersionKind() schema.GroupVersionKind
type PrefixedClaimOrExpression ¶
type PrefixedClaimOrExpression struct {
// +optional
// +kubebuilder:validation:MinLength=1
Claim string `json:"claim,omitempty"`
// +optional
Prefix *string `json:"prefix,omitempty"`
// +optional
// +kubebuilder:validation:MinLength=1
Expression string `json:"expression,omitempty"`
}
PrefixedClaimOrExpression provides the configuration for a single prefixed claim or expression. +kubebuilder:validation:XValidation:rule="has(self.claim) || has(self.expression)",message="either claim or expression must be specified" +kubebuilder:validation:XValidation:rule="!(has(self.claim) && has(self.expression))",message="claim and expression cannot both be specified" +kubebuilder:validation:XValidation:rule="!(has(self.prefix)) || has(self.claim)",message="prefix can only be specified when claim is specified"
func (*PrefixedClaimOrExpression) DeepCopy ¶
func (in *PrefixedClaimOrExpression) DeepCopy() *PrefixedClaimOrExpression
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrefixedClaimOrExpression.
func (*PrefixedClaimOrExpression) DeepCopyInto ¶
func (in *PrefixedClaimOrExpression) DeepCopyInto(out *PrefixedClaimOrExpression)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserValidationRule ¶
type UserValidationRule struct {
Expression string `json:"expression"`
Message string `json:"message"`
}
UserValidationRule provides the configuration for a single user validation rule.
func (*UserValidationRule) DeepCopy ¶
func (in *UserValidationRule) DeepCopy() *UserValidationRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserValidationRule.
func (*UserValidationRule) DeepCopyInto ¶
func (in *UserValidationRule) DeepCopyInto(out *UserValidationRule)
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.
Workspaces supports mounting, by specifying an Mount object in the spec. If a Mount is specified, the workspace will be mounted to the specified mount object and LogicalCluster will not be created.
+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=`.status.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 WorkspaceAuthenticationConfiguration ¶
type WorkspaceAuthenticationConfiguration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec WorkspaceAuthenticationConfigurationSpec `json:"spec"`
}
WorkspaceAuthenticationConfiguration specifies additional authentication options for workspaces.
+crd +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster,categories=kcp
func (*WorkspaceAuthenticationConfiguration) DeepCopy ¶
func (in *WorkspaceAuthenticationConfiguration) DeepCopy() *WorkspaceAuthenticationConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceAuthenticationConfiguration.
func (*WorkspaceAuthenticationConfiguration) DeepCopyInto ¶
func (in *WorkspaceAuthenticationConfiguration) DeepCopyInto(out *WorkspaceAuthenticationConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceAuthenticationConfiguration) DeepCopyObject ¶
func (in *WorkspaceAuthenticationConfiguration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspaceAuthenticationConfigurationList ¶
type WorkspaceAuthenticationConfigurationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []WorkspaceAuthenticationConfiguration `json:"items"`
}
WorkspaceAuthenticationConfigurationList is a list of WorkspaceAuthenticationConfigurations.
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*WorkspaceAuthenticationConfigurationList) DeepCopy ¶
func (in *WorkspaceAuthenticationConfigurationList) DeepCopy() *WorkspaceAuthenticationConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceAuthenticationConfigurationList.
func (*WorkspaceAuthenticationConfigurationList) DeepCopyInto ¶
func (in *WorkspaceAuthenticationConfigurationList) DeepCopyInto(out *WorkspaceAuthenticationConfigurationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceAuthenticationConfigurationList) DeepCopyObject ¶
func (in *WorkspaceAuthenticationConfigurationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspaceAuthenticationConfigurationSpec ¶
type WorkspaceAuthenticationConfigurationSpec struct {
JWT []JWTAuthenticator `json:"jwt"`
}
func (*WorkspaceAuthenticationConfigurationSpec) DeepCopy ¶
func (in *WorkspaceAuthenticationConfigurationSpec) DeepCopy() *WorkspaceAuthenticationConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceAuthenticationConfigurationSpec.
func (*WorkspaceAuthenticationConfigurationSpec) DeepCopyInto ¶
func (in *WorkspaceAuthenticationConfigurationSpec) DeepCopyInto(out *WorkspaceAuthenticationConfigurationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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"`
// Mount is a reference to an object implementing a mounting feature. It is used to orchestrate
// where the traffic, intended for the workspace, is sent.
// If specified, logicalcluster will not be created and the workspace will be mounted
// using reference mount object.
//
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="mount is immutable"
Mount *Mount `json:"mount,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"`
// terminators must be cleared by a controller before the workspace is being
// deleted.
//
// +optional
Terminators []corev1alpha1.LogicalClusterTerminator `json:"terminators,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"`
// Terminator determines if this WorkspaceType has an associated terminating
// controller. These controllers are used to add functionality to a Workspace;
// all controllers must finish their work before the Workspace is being deleted.
//
// One terminating controller is supported per WorkspaceType; the identifier
// for this terminator 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
// terminator name is `root:org:example`.
//
// +optional
Terminator bool `json:"terminator,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"`
// Configure the lifecycle behaviour of defaultAPIBindings.
//
// +optional
// +kubebuilder:validation:Enum=InitializeOnly;Maintain
DefaultAPIBindingLifecycle *APIBindingLifecycleMode `json:"defaultAPIBindingLifecycle,omitempty"`
// authenticationConfigurations are additional authentication options that should apply to any
// workspace using this workspace type.
//
// +optional
AuthenticationConfigurations []AuthenticationConfigurationReference `json:"authenticationConfigurations,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.