Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the cosmo v1alpha1 API group +kubebuilder:object:generate=true +groupName=cosmo-workspace.github.io
Index ¶
- Constants
- Variables
- func GenHost(hostbase, domain, hostprefix string, ws Workspace) string
- func GenURL(protocol, host, path string) string
- func HTTPUniqueKey(host, httpPath string) string
- func HasPrivilegedRole(roles []UserRole) bool
- func MainRuleKey(cfg Config) string
- func SetControllerManaged(obj LabelHolder)
- func UserNameByNamespace(namespace string) string
- func UserNamespace(username string) string
- type ClusterInstance
- func (in *ClusterInstance) DeepCopy() *ClusterInstance
- func (in *ClusterInstance) DeepCopyInto(out *ClusterInstance)
- func (in *ClusterInstance) DeepCopyObject() runtime.Object
- func (i *ClusterInstance) GetScope() meta.RESTScope
- func (i *ClusterInstance) GetSpec() *InstanceSpec
- func (i *ClusterInstance) GetStatus() *InstanceStatus
- type ClusterInstanceList
- type ClusterTemplate
- type ClusterTemplateList
- type Config
- type Instance
- type InstanceList
- type InstanceObject
- type InstanceSpec
- type InstanceStatus
- type Json6902
- type LabelHolder
- type NetworkRule
- type ObjectRef
- func (in *ObjectRef) DeepCopy() *ObjectRef
- func (in *ObjectRef) DeepCopyInto(out *ObjectRef)
- func (r ObjectRef) GetName() string
- func (r ObjectRef) GroupVersionKind() schema.GroupVersionKind
- func (r *ObjectRef) SetGroupVersionKind(gvk schema.GroupVersionKind)
- func (r *ObjectRef) SetName(name string)
- type OverrideSpec
- type RequiredVarSpec
- type Template
- type TemplateList
- type TemplateObject
- type TemplateRef
- type TemplateSpec
- type User
- type UserAddon
- type UserAddonTemplateRef
- type UserAuthType
- type UserList
- type UserRole
- type UserSpec
- type UserStatus
- type Workspace
- type WorkspaceList
- type WorkspaceSpec
- type WorkspaceStatus
Constants ¶
const ( // LabelKeyInstanceName is a instance name label on the each child resources associated with the instance LabelKeyInstanceName = "cosmo-workspace.github.io/instance" // LabelKeyTemplateName is a template name label on the resources created by instance LabelKeyTemplateName = "cosmo-workspace.github.io/template" )
const ( // TemplateLabelKeyType is a label key of additional type infomartion on Template TemplateLabelKeyType = "cosmo-workspace.github.io/type" TemplateLabelEnumTypeWorkspace = "workspace" TemplateLabelEnumTypeUserAddon = "useraddon" // TemplateAnnKeyDisableNamePrefix is an annotation key on Template to notify controller not to add name prefix TemplateAnnKeyDisableNamePrefix = "cosmo-workspace.github.io/disable-nameprefix" // TemplateAnnKeySkipValidation is an annotation key on Template to notify webhook not to validate TemplateAnnKeySkipValidation = "cosmo-workspace.github.io/skip-validation" // TemplateAnnKeyUserRoles is an annotation key on Template for specific UserRoles TemplateAnnKeyUserRoles = "cosmo-workspace.github.io/userroles" // TemplateAnnKeyForbiddenUserRoles is an annotation key on Template which is not for specific UserRoles TemplateAnnKeyForbiddenUserRoles = "cosmo-workspace.github.io/forbidden-userroles" )
const ( // UserPasswordSecretName is a secret name for password secret UserPasswordSecretName = "password" // UserPasswordSecretDataKeyUserPasswordSecret is a secret data key for hashed password value UserPasswordSecretDataKeyUserPasswordSecret = "password" // UserPasswordSecretDataKeyUserPasswordSalt is a secret data key for hashed password salt UserPasswordSecretDataKeyUserPasswordSalt = "salt" // UserPasswordSecretAnnKeyUserPasswordIfDefault is a secret annotation key to notify if password is default UserPasswordSecretAnnKeyUserPasswordIfDefault = "cosmo-workspace.github.io/default-password" )
const ( PrivilegedRoleName string = "cosmo-admin" PrivilegedGroupName string = "cosmo" AdminRoleName string = "admin" )
const ( // WorkspaceTemplateAnnKeys are annotation keys for WorkspaceConfig WorkspaceTemplateAnnKeyDeploymentName = "workspace.cosmo-workspace.github.io/deployment" WorkspaceTemplateAnnKeyServiceName = "workspace.cosmo-workspace.github.io/service" WorkspaceTemplateAnnKeyServiceMainPort = "workspace.cosmo-workspace.github.io/service-main-port" )
const ( // TemplateVars are Template variables to set WorkspaceConfig info on resources in the Template WorkspaceTemplateVarDeploymentName = "{{WORKSPACE_DEPLOYMENT_NAME}}" WorkspaceTemplateVarServiceName = "{{WORKSPACE_SERVICE_NAME}}" WorkspaceTemplateVarServiceMainPortName = "{{WORKSPACE_SERVICE_MAIN_PORT_NAME}}" )
const ( DefaultHostBase = "{{NETRULE}}-{{WORKSPACE}}-{{USER}}" URLVarNetRule = "{{NETRULE}}" URLVarWorkspaceName = "{{WORKSPACE}}" URLVarUserName = "{{USER}}" )
const LabelControllerManaged = "cosmo-workspace.github.io/controller-managed"
LabelControllerManaged is a label on all resources managed by the controllers
const NamespaceLabelKeyUserName = "cosmo-workspace.github.io/user"
NamespaceLabelKeyUserName is a label key on namespace created b User
const TemplateVarUserName = "{{USER_NAME}}"
Var for user addon
const UserAddonTemplateAnnKeyDefaultUserAddon = "useraddon.cosmo-workspace.github.io/default"
UserAddonTemplateAnnKeyDefault is an annotation key on UserAddon Template to notify controller to create the UserAddon for all Users
const UserNamespacePrefix = "cosmo-user-"
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "cosmo-workspace.github.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var (
PrivilegedRole = UserRole{Name: PrivilegedRoleName}
)
Functions ¶
func HTTPUniqueKey ¶ added in v0.10.0
func HasPrivilegedRole ¶
func MainRuleKey ¶ added in v0.10.0
func SetControllerManaged ¶ added in v0.9.0
func SetControllerManaged(obj LabelHolder)
func UserNameByNamespace ¶
func UserNamespace ¶
Types ¶
type ClusterInstance ¶
type ClusterInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InstanceSpec `json:"spec,omitempty"` Status InstanceStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:scope="Cluster",shortName=cinst +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="ClusterTemplate",type=string,JSONPath=`.spec.template.name` +kubebuilder:printcolumn:name="AppliedResources",type=string,JSONPath=`.status.lastAppliedObjectsCount` ClusterInstance is the Schema for the instances API
func (*ClusterInstance) DeepCopy ¶
func (in *ClusterInstance) DeepCopy() *ClusterInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstance.
func (*ClusterInstance) DeepCopyInto ¶
func (in *ClusterInstance) DeepCopyInto(out *ClusterInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterInstance) DeepCopyObject ¶
func (in *ClusterInstance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterInstance) GetScope ¶
func (i *ClusterInstance) GetScope() meta.RESTScope
func (*ClusterInstance) GetSpec ¶
func (i *ClusterInstance) GetSpec() *InstanceSpec
func (*ClusterInstance) GetStatus ¶
func (i *ClusterInstance) GetStatus() *InstanceStatus
type ClusterInstanceList ¶
type ClusterInstanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterInstance `json:"items"` }
+kubebuilder:object:root=true ClusterInstanceList contains a list of ClusterInstance
func (*ClusterInstanceList) DeepCopy ¶
func (in *ClusterInstanceList) DeepCopy() *ClusterInstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInstanceList.
func (*ClusterInstanceList) DeepCopyInto ¶
func (in *ClusterInstanceList) DeepCopyInto(out *ClusterInstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterInstanceList) DeepCopyObject ¶
func (in *ClusterInstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterInstanceList) InstanceObjects ¶
func (l *ClusterInstanceList) InstanceObjects() []InstanceObject
type ClusterTemplate ¶
type ClusterTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TemplateSpec `json:"spec,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:scope="Cluster",shortName=ctmpl +kubebuilder:storageversion +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.metadata.labels.cosmo-workspace\.github\.io/type` ClusterTemplate is the Schema for the Templates API
func (*ClusterTemplate) DeepCopy ¶
func (in *ClusterTemplate) DeepCopy() *ClusterTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplate.
func (*ClusterTemplate) DeepCopyInto ¶
func (in *ClusterTemplate) DeepCopyInto(out *ClusterTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterTemplate) DeepCopyObject ¶
func (in *ClusterTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterTemplate) GetScope ¶
func (t *ClusterTemplate) GetScope() meta.RESTScope
func (*ClusterTemplate) GetSpec ¶
func (t *ClusterTemplate) GetSpec() *TemplateSpec
type ClusterTemplateList ¶
type ClusterTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterTemplate `json:"items"` }
+kubebuilder:object:root=true ClusterTemplateList contains a list of ClusterTemplate
func (*ClusterTemplateList) DeepCopy ¶
func (in *ClusterTemplateList) DeepCopy() *ClusterTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTemplateList.
func (*ClusterTemplateList) DeepCopyInto ¶
func (in *ClusterTemplateList) DeepCopyInto(out *ClusterTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterTemplateList) DeepCopyObject ¶
func (in *ClusterTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Config ¶
type Config struct { DeploymentName string `json:"deploymentName,omitempty"` ServiceName string `json:"serviceName,omitempty"` ServiceMainPortName string `json:"mainServicePortName,omitempty"` }
Config defines workspace-dependent configuration
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Instance ¶
type Instance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InstanceSpec `json:"spec,omitempty"` Status InstanceStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:shortName=inst +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Template",type=string,JSONPath=`.spec.template.name` +kubebuilder:printcolumn:name="AppliedResources",type=string,JSONPath=`.status.lastAppliedObjectsCount` Instance is the Schema for the instances API
func (*Instance) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.
func (*Instance) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Instance) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Instance) GetSpec ¶
func (i *Instance) GetSpec() *InstanceSpec
func (*Instance) GetStatus ¶
func (i *Instance) GetStatus() *InstanceStatus
type InstanceList ¶
type InstanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Instance `json:"items"` }
+kubebuilder:object:root=true InstanceList contains a list of Instance
func (*InstanceList) DeepCopy ¶
func (in *InstanceList) DeepCopy() *InstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceList.
func (*InstanceList) DeepCopyInto ¶
func (in *InstanceList) DeepCopyInto(out *InstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InstanceList) DeepCopyObject ¶
func (in *InstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*InstanceList) InstanceObjects ¶
func (l *InstanceList) InstanceObjects() []InstanceObject
type InstanceObject ¶
type InstanceObject interface { metav1.Object runtime.Object GetSpec() *InstanceSpec GetStatus() *InstanceStatus GetScope() meta.RESTScope }
+kubebuilder:object:generate=false
type InstanceSpec ¶
type InstanceSpec struct { // +kubebuilder:validation:Required Template TemplateRef `json:"template"` Vars map[string]string `json:"vars,omitempty"` Override OverrideSpec `json:"override,omitempty"` }
InstanceSpec defines the desired state of Instance
func (*InstanceSpec) DeepCopy ¶
func (in *InstanceSpec) DeepCopy() *InstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceSpec.
func (*InstanceSpec) DeepCopyInto ¶
func (in *InstanceSpec) DeepCopyInto(out *InstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InstanceStatus ¶
type InstanceStatus struct { TemplateName string `json:"templateName,omitempty"` TemplateResourceVersion string `json:"templateResourceVersion,omitempty"` LastApplied []ObjectRef `json:"lastApplied,omitempty"` LastAppliedObjectsCount int `json:"lastAppliedObjectsCount,omitempty"` TemplateObjectsCount int `json:"templateObjectsCount,omitempty"` }
InstanceStatus has status of Instance
func (*InstanceStatus) DeepCopy ¶
func (in *InstanceStatus) DeepCopy() *InstanceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceStatus.
func (*InstanceStatus) DeepCopyInto ¶
func (in *InstanceStatus) DeepCopyInto(out *InstanceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Json6902 ¶
Json6902 defines JSONPatch specs.
func (*Json6902) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Json6902.
func (*Json6902) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabelHolder ¶ added in v0.9.0
+kubebuilder:object:generate=false
type NetworkRule ¶
type NetworkRule struct { Protocol string `json:"protocol"` PortNumber int32 `json:"portNumber"` CustomHostPrefix string `json:"customHostPrefix,omitempty"` HTTPPath string `json:"httpPath,omitempty"` TargetPortNumber *int32 `json:"targetPortNumber,omitempty"` Public bool `json:"public"` }
NetworkRule is an abstract network configuration rule for workspace
func (*NetworkRule) DeepCopy ¶
func (in *NetworkRule) DeepCopy() *NetworkRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRule.
func (*NetworkRule) DeepCopyInto ¶
func (in *NetworkRule) DeepCopyInto(out *NetworkRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkRule) Default ¶
func (r *NetworkRule) Default()
func (*NetworkRule) HostPrefix ¶ added in v0.10.0
func (r *NetworkRule) HostPrefix() string
func (*NetworkRule) ServicePort ¶
func (r *NetworkRule) ServicePort() corev1.ServicePort
func (*NetworkRule) UniqueKey ¶ added in v0.10.0
func (r *NetworkRule) UniqueKey() string
type ObjectRef ¶
type ObjectRef struct { corev1.ObjectReference `json:",inline"` CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"` }
ObjectRef is a reference of resource which is created by the Instance
func (*ObjectRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectRef.
func (*ObjectRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ObjectRef) GroupVersionKind ¶
func (r ObjectRef) GroupVersionKind() schema.GroupVersionKind
func (*ObjectRef) SetGroupVersionKind ¶
func (r *ObjectRef) SetGroupVersionKind(gvk schema.GroupVersionKind)
type OverrideSpec ¶
type OverrideSpec struct {
PatchesJson6902 []Json6902 `json:"patchesJson6902,omitempty"`
}
OverrideSpec defines overrides to transform built objects
func (*OverrideSpec) DeepCopy ¶
func (in *OverrideSpec) DeepCopy() *OverrideSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OverrideSpec.
func (*OverrideSpec) DeepCopyInto ¶
func (in *OverrideSpec) DeepCopyInto(out *OverrideSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RequiredVarSpec ¶
RequiredVarSpec defines a required var spec for template
func (*RequiredVarSpec) DeepCopy ¶
func (in *RequiredVarSpec) DeepCopy() *RequiredVarSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredVarSpec.
func (*RequiredVarSpec) DeepCopyInto ¶
func (in *RequiredVarSpec) DeepCopyInto(out *RequiredVarSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Template ¶
type Template struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TemplateSpec `json:"spec,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:scope="Cluster",shortName=tmpl +kubebuilder:storageversion +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.metadata.labels.cosmo-workspace\.github\.io/type` Template is the Schema for the Templates API
func (*Template) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.
func (*Template) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Template) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Template) GetSpec ¶
func (t *Template) GetSpec() *TemplateSpec
type TemplateList ¶
type TemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Template `json:"items"` }
+kubebuilder:object:root=true TemplateList contains a list of Template
func (*TemplateList) DeepCopy ¶
func (in *TemplateList) DeepCopy() *TemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateList.
func (*TemplateList) DeepCopyInto ¶
func (in *TemplateList) DeepCopyInto(out *TemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemplateList) DeepCopyObject ¶
func (in *TemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TemplateObject ¶
type TemplateObject interface { metav1.Object runtime.Object SetGroupVersionKind(gvk schema.GroupVersionKind) GetSpec() *TemplateSpec GetScope() meta.RESTScope }
+kubebuilder:object:generate=false
type TemplateRef ¶
type TemplateRef struct { // +kubebuilder:validation:Required Name string `json:"name"` }
TemplateRef defines template to use in Instance creation
func (*TemplateRef) DeepCopy ¶
func (in *TemplateRef) DeepCopy() *TemplateRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateRef.
func (*TemplateRef) DeepCopyInto ¶
func (in *TemplateRef) DeepCopyInto(out *TemplateRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateSpec ¶
type TemplateSpec struct { Description string `json:"description,omitempty"` RequiredVars []RequiredVarSpec `json:"requiredVars,omitempty"` RawYaml string `json:"rawYaml,omitempty"` }
TemplateSpec defines the desired state of Template
func (*TemplateSpec) DeepCopy ¶
func (in *TemplateSpec) DeepCopy() *TemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec.
func (*TemplateSpec) DeepCopyInto ¶
func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type User ¶
type User struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec UserSpec `json:"spec,omitempty"` Status UserStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:scope="Cluster" +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Roles",type=string,JSONPath=`.spec.roles[*].name` +kubebuilder:printcolumn:name="AuthType",type=string,JSONPath=`.spec.authType` +kubebuilder:printcolumn:name="Namespace",type=string,JSONPath=`.status.namespace.name` +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Addons",type=string,JSONPath=`.spec.addons[*].template.name` User is the Schema for the workspaces API
func (*User) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.
func (*User) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*User) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*User) GetGroupRoleMap ¶
type UserAddon ¶
type UserAddon struct { Template UserAddonTemplateRef `json:"template,omitempty"` Vars map[string]string `json:"vars,omitempty"` }
func (*UserAddon) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAddon.
func (*UserAddon) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserAddonTemplateRef ¶
type UserAddonTemplateRef struct { // +kubebuilder:validation:Required Name string `json:"name"` ClusterScoped bool `json:"clusterScoped,omitempty"` }
TemplateRef defines template to use in Instance creation
func (*UserAddonTemplateRef) DeepCopy ¶
func (in *UserAddonTemplateRef) DeepCopy() *UserAddonTemplateRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAddonTemplateRef.
func (*UserAddonTemplateRef) DeepCopyInto ¶
func (in *UserAddonTemplateRef) DeepCopyInto(out *UserAddonTemplateRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserAuthType ¶
type UserAuthType string
+kubebuilder:validation:enum=password-secret;ldap UserAuthType enums
const ( UserAuthTypePasswordSecert UserAuthType = "password-secret" UserAuthTypeLDAP UserAuthType = "ldap" )
func (UserAuthType) IsValid ¶
func (t UserAuthType) IsValid() bool
func (UserAuthType) String ¶
func (t UserAuthType) String() string
type UserList ¶
type UserList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []User `json:"items"` }
+kubebuilder:object:root=true UserList contains a list of User
func (*UserList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList.
func (*UserList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UserList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UserRole ¶
type UserRole struct {
Name string `json:"name"`
}
func (*UserRole) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserRole.
func (*UserRole) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (UserRole) GetGroupAndRole ¶
GetGroupAndRole exclude group and role from UserRole.Name if UserRole is `cosmo-admin`, it returns group: cosmo, role: admin role is one of the [`admin`]
type UserSpec ¶
type UserSpec struct { DisplayName string `json:"displayName,omitempty"` Roles []UserRole `json:"roles,omitempty"` AuthType UserAuthType `json:"authType,omitempty"` Addons []UserAddon `json:"addons,omitempty"` }
func (*UserSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec.
func (*UserSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserStatus ¶
type UserStatus struct { Phase corev1.NamespacePhase `json:"phase,omitempty"` Namespace ObjectRef `json:"namespace,omitempty"` Addons []ObjectRef `json:"addons,omitempty"` }
func (*UserStatus) DeepCopy ¶
func (in *UserStatus) DeepCopy() *UserStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus.
func (*UserStatus) DeepCopyInto ¶
func (in *UserStatus) DeepCopyInto(out *UserStatus)
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"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WorkspaceSpec `json:"spec,omitempty"` Status WorkspaceStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:shortName=ws +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Template",type=string,JSONPath=`.spec.template.name` +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` Workspace is the Schema for the workspaces API
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.
type WorkspaceList ¶
type WorkspaceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Workspace `json:"items"` }
+kubebuilder:object:root=true WorkspaceList contains a list of Workspace
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 WorkspaceSpec ¶
type WorkspaceSpec struct { // +kubebuilder:validation:Required Template TemplateRef `json:"template"` Replicas *int64 `json:"replicas,omitempty"` Vars map[string]string `json:"vars,omitempty"` Network []NetworkRule `json:"network,omitempty"` }
WorkspaceSpec defines the desired state of Workspace
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 { Instance ObjectRef `json:"instance,omitempty"` Phase string `json:"phase,omitempty"` URLs map[string]string `json:"urls,omitempty"` Config Config `json:"config,omitempty"` }
WorkspaceStatus has status of 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.