Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +kubebuilder:object:generate=true +groupName=core.openmcp.cloud
Index ¶
- Constants
- Variables
- type Condition
- type ConditionReason
- type ConditionStatus
- type ConditionType
- type MemberOverride
- type MemberOverrides
- type MemberOverridesList
- type MemberOverridesSpec
- type MemberOverridesStatus
- type OverrideResource
- type OverrideRole
- type Project
- func (in *Project) DeepCopy() *Project
- func (in *Project) DeepCopyInto(out *Project)
- func (in *Project) DeepCopyObject() runtime.Object
- func (p *Project) RemoveCondition(conditionType ConditionType)
- func (p *Project) SetOrUpdateCondition(condition Condition)
- func (p *Project) SetupWebhookWithManager(ctx context.Context, mgr ctrl.Manager, memberOverridesName, identity string) error
- func (p *Project) TypeIdentifier() string
- func (p *Project) UserInfoHasRole(userInfo authv1.UserInfo, role ProjectMemberRole) bool
- func (p *Project) UserInfoRoles(userInfo authv1.UserInfo) []ProjectMemberRole
- type ProjectConfig
- type ProjectList
- type ProjectMember
- type ProjectMemberRole
- type ProjectSpec
- type ProjectStatus
- type ProjectWebhook
- func (p *ProjectWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (v *ProjectWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
- func (v *ProjectWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
- func (v *ProjectWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)
- type ProjectWorkspaceConfig
- func (in *ProjectWorkspaceConfig) DeepCopy() *ProjectWorkspaceConfig
- func (in *ProjectWorkspaceConfig) DeepCopyInto(out *ProjectWorkspaceConfig)
- func (in *ProjectWorkspaceConfig) DeepCopyObject() runtime.Object
- func (pwc *ProjectWorkspaceConfig) SetDefaults()
- func (pwc *ProjectWorkspaceConfig) Validate() error
- type ProjectWorkspaceConfigList
- type ProjectWorkspaceConfigSpec
- type RemainingContentResource
- type Subject
- type WebhookConfig
- type Workspace
- func (in *Workspace) DeepCopy() *Workspace
- func (in *Workspace) DeepCopyInto(out *Workspace)
- func (in *Workspace) DeepCopyObject() runtime.Object
- func (ws *Workspace) RemoveCondition(conditionType ConditionType)
- func (ws *Workspace) SetOrUpdateCondition(condition Condition)
- func (r *Workspace) SetupWebhookWithManager(ctx context.Context, mgr ctrl.Manager, memberOverridesName, identity string) error
- func (ws *Workspace) TypeIdentifier() string
- func (ws *Workspace) UserInfoHasRole(userInfo authv1.UserInfo, role WorkspaceMemberRole) bool
- func (ws *Workspace) UserInfoRoles(userInfo authv1.UserInfo) []WorkspaceMemberRole
- type WorkspaceConfig
- type WorkspaceList
- type WorkspaceMember
- type WorkspaceMemberRole
- type WorkspaceSpec
- type WorkspaceStatus
- type WorkspaceWebhook
- func (w *WorkspaceWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (v *WorkspaceWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
- func (v *WorkspaceWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
- func (v *WorkspaceWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)
Constants ¶
const ( // ConditionTypeContentRemaining is a condition type that indicates that there is content in a project/workspace // that is preventing the deletion. ConditionTypeContentRemaining ConditionType = "ContentRemaining" // ConditionReasonResourcesRemaining is a condition reason that indicates that there are remaining resources in a // project/workspace that are preventing the deletion. ConditionReasonResourcesRemaining ConditionReason = "SomeResourcesRemain" // ConditionStatusTrue indicates that the condition is currently active. ConditionStatusTrue ConditionStatus = "True" // ConditionStatusFalse indicates that the condition is not currently active. ConditionStatusFalse ConditionStatus = "False" // ConditionStatusUnknown indicates that the condition status is unknown. ConditionStatusUnknown ConditionStatus = "Unknown" )
const GroupName = "core.openmcp.cloud"
Variables ¶
var ( CreatedByAnnotation = fmt.Sprintf("%s/created-by", GroupVersion.Group) DisplayNameAnnotation = fmt.Sprintf("%s/display-name", GroupVersion.Group) )
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: GroupName, 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 )
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
// Type is the type of the condition.
Type ConditionType `json:"type"`
// Status is the status of the condition.
// +kubebuilder:validation:Enum=True;False;Unknown
Status ConditionStatus `json:"status"`
// LastTransitionTime is the time when the condition last transitioned from one status to another.
// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// Reason is the reason for the condition.
// +optional
Reason ConditionReason `json:"reason"`
// Message is a human-readable message indicating details about the condition.
// +optional
Message string `json:"message,omitempty"`
// Details is an object that can contain additional information about the condition.
// The content is specific to the condition type.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
// +optional
Details json.RawMessage `json:"details,omitempty"`
}
Condition is part of all conditions that a project/ workspace can have.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionReason ¶
type ConditionReason string
ConditionReason is a reason for why a condition is set.
type MemberOverride ¶
type MemberOverride struct {
Subject `json:",inline"`
// Roles defines a list of roles that this override subject should have.
Roles []OverrideRole `json:"roles"`
// Resources defines an optional list of projects/workspaces that this override applies to.
Resources []OverrideResource `json:"resources,omitempty"`
}
func (*MemberOverride) DeepCopy ¶
func (in *MemberOverride) DeepCopy() *MemberOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberOverride.
func (*MemberOverride) DeepCopyInto ¶
func (in *MemberOverride) DeepCopyInto(out *MemberOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MemberOverride) Username ¶
func (m *MemberOverride) Username() (string, bool)
type MemberOverrides ¶
type MemberOverrides struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MemberOverridesSpec `json:"spec,omitempty"`
Status MemberOverridesStatus `json:"status,omitempty"`
}
MemberOverrides is a resource used to Manage admin access to the Project/Workspace operator resources. +kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster +kubebuilder:metadata:labels="openmcp.cloud/cluster=onboarding"
func (*MemberOverrides) DeepCopy ¶
func (in *MemberOverrides) DeepCopy() *MemberOverrides
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberOverrides.
func (*MemberOverrides) DeepCopyInto ¶
func (in *MemberOverrides) DeepCopyInto(out *MemberOverrides)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MemberOverrides) DeepCopyObject ¶
func (in *MemberOverrides) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MemberOverrides) HasAdminOverrideForResource ¶
func (m *MemberOverrides) HasAdminOverrideForResource(userInfo *authv1.UserInfo, resourceName, resourceKind string) bool
type MemberOverridesList ¶
type MemberOverridesList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MemberOverrides `json:"items"`
}
+kubebuilder:object:root=true
func (*MemberOverridesList) DeepCopy ¶
func (in *MemberOverridesList) DeepCopy() *MemberOverridesList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberOverridesList.
func (*MemberOverridesList) DeepCopyInto ¶
func (in *MemberOverridesList) DeepCopyInto(out *MemberOverridesList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MemberOverridesList) DeepCopyObject ¶
func (in *MemberOverridesList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MemberOverridesSpec ¶
type MemberOverridesSpec struct {
MemberOverrides []MemberOverride `json:"memberOverrides"`
}
func (*MemberOverridesSpec) DeepCopy ¶
func (in *MemberOverridesSpec) DeepCopy() *MemberOverridesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberOverridesSpec.
func (*MemberOverridesSpec) DeepCopyInto ¶
func (in *MemberOverridesSpec) DeepCopyInto(out *MemberOverridesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemberOverridesStatus ¶
type MemberOverridesStatus struct{}
func (*MemberOverridesStatus) DeepCopy ¶
func (in *MemberOverridesStatus) DeepCopy() *MemberOverridesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberOverridesStatus.
func (*MemberOverridesStatus) DeepCopyInto ¶
func (in *MemberOverridesStatus) DeepCopyInto(out *MemberOverridesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OverrideResource ¶
type OverrideResource struct {
// +kubebuilder:validation:Enum=project;workspace
Kind string `json:"kind"`
// Name of the object being referenced.
Name string `json:"name"`
}
func (*OverrideResource) DeepCopy ¶
func (in *OverrideResource) DeepCopy() *OverrideResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OverrideResource.
func (*OverrideResource) DeepCopyInto ¶
func (in *OverrideResource) DeepCopyInto(out *OverrideResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OverrideRole ¶
type OverrideRole string
+kubebuilder:validation:Enum=admin;view
const ( OverrideRoleAdmin OverrideRole = "admin" OverrideRoleView OverrideRole = "view" )
type Project ¶
type Project struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ProjectSpec `json:"spec,omitempty"`
Status ProjectStatus `json:"status,omitempty"`
}
Project is the Schema for the projects API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster +kubebuilder:printcolumn:name="Display Name",type="string",JSONPath=".metadata.annotations.openmcp\\.cloud/display-name" +kubebuilder:printcolumn:name="Resulting Namespace",type="string",JSONPath=".status.namespace" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:validation:XValidation:rule="size(self.metadata.name) <= 25",message="Name must not be longer than 25 characters" +kubebuilder:metadata:labels="openmcp.cloud/cluster=onboarding"
func (*Project) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project.
func (*Project) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Project) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Project) RemoveCondition ¶
func (p *Project) RemoveCondition(conditionType ConditionType)
func (*Project) SetOrUpdateCondition ¶
func (*Project) SetupWebhookWithManager ¶
func (*Project) TypeIdentifier ¶
TypeIdentifier implements AccessEntity.
func (*Project) UserInfoHasRole ¶
func (p *Project) UserInfoHasRole(userInfo authv1.UserInfo, role ProjectMemberRole) bool
func (*Project) UserInfoRoles ¶
func (p *Project) UserInfoRoles(userInfo authv1.UserInfo) []ProjectMemberRole
type ProjectConfig ¶ added in v1.0.0
type ProjectConfig struct {
// +optional
ResourcesBlockingDeletion []metav1.GroupVersionKind `json:"resourcesBlockingDeletion,omitempty"`
// AdditionalPermissions defines additional permissions users should have in a project, depending on their role.
// +optional
AdditionalPermissions map[ProjectMemberRole][]rbacv1.PolicyRule `json:"additionalPermissions,omitempty"`
}
ProjectConfig contains the configuration for projects.
func (*ProjectConfig) DeepCopy ¶ added in v1.0.0
func (in *ProjectConfig) DeepCopy() *ProjectConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectConfig.
func (*ProjectConfig) DeepCopyInto ¶ added in v1.0.0
func (in *ProjectConfig) DeepCopyInto(out *ProjectConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectList ¶
type ProjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Project `json:"items"`
}
ProjectList contains a list of Project
func (*ProjectList) DeepCopy ¶
func (in *ProjectList) DeepCopy() *ProjectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList.
func (*ProjectList) DeepCopyInto ¶
func (in *ProjectList) DeepCopyInto(out *ProjectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectList) DeepCopyObject ¶
func (in *ProjectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectMember ¶
type ProjectMember struct {
Subject `json:""`
// Roles defines a list of roles that this project member should have.
Roles []ProjectMemberRole `json:"roles"`
}
func (*ProjectMember) DeepCopy ¶
func (in *ProjectMember) DeepCopy() *ProjectMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMember.
func (*ProjectMember) DeepCopyInto ¶
func (in *ProjectMember) DeepCopyInto(out *ProjectMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectMember) Username ¶
func (pm *ProjectMember) Username() (string, bool)
type ProjectMemberRole ¶
type ProjectMemberRole string
+kubebuilder:validation:Enum=admin;view
const ( ProjectRoleAdmin ProjectMemberRole = "admin" ProjectRoleView ProjectMemberRole = "view" )
func (ProjectMemberRole) EntityType ¶
func (ProjectMemberRole) EntityType() entities.AccessEntity
EntityType implements AccessRole.
func (ProjectMemberRole) Identifier ¶
func (p ProjectMemberRole) Identifier() string
Identifier implements AccessRole.
type ProjectSpec ¶
type ProjectSpec struct {
// Members is a list of project members.
Members []ProjectMember `json:"members,omitempty"`
}
ProjectSpec defines the desired state of Project
func (*ProjectSpec) DeepCopy ¶
func (in *ProjectSpec) DeepCopy() *ProjectSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.
func (*ProjectSpec) DeepCopyInto ¶
func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectStatus ¶
type ProjectStatus struct {
Namespace string `json:"namespace"`
// +optional
Conditions []Condition `json:"conditions,omitempty"`
}
ProjectStatus defines the observed state of Project
func (*ProjectStatus) DeepCopy ¶
func (in *ProjectStatus) DeepCopy() *ProjectStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus.
func (*ProjectStatus) DeepCopyInto ¶
func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectWebhook ¶ added in v1.0.0
type ProjectWebhook struct {
client.Client
// Identity is the name of the entity (usually a service account) the project-workspace-operator uses to access the onboarding cluster.
// It is required to exclude the operator's own identity from validation checks.
Identity string
OverrideName string
}
+kubebuilder:object:generate=false
func (*ProjectWebhook) Default ¶ added in v1.0.0
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*ProjectWebhook) ValidateCreate ¶ added in v1.0.0
func (v *ProjectWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*ProjectWebhook) ValidateDelete ¶ added in v1.0.0
func (v *ProjectWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*ProjectWebhook) ValidateUpdate ¶ added in v1.0.0
func (v *ProjectWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type
type ProjectWorkspaceConfig ¶ added in v1.0.0
type ProjectWorkspaceConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec ProjectWorkspaceConfigSpec `json:"spec"`
}
ProjectWorkspaceConfig is the Schema for the ProjectWorkspaceConfigs API +kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,shortName=pwcfg +kubebuilder:metadata:labels="openmcp.cloud/cluster=platform"
func (*ProjectWorkspaceConfig) DeepCopy ¶ added in v1.0.0
func (in *ProjectWorkspaceConfig) DeepCopy() *ProjectWorkspaceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectWorkspaceConfig.
func (*ProjectWorkspaceConfig) DeepCopyInto ¶ added in v1.0.0
func (in *ProjectWorkspaceConfig) DeepCopyInto(out *ProjectWorkspaceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectWorkspaceConfig) DeepCopyObject ¶ added in v1.0.0
func (in *ProjectWorkspaceConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ProjectWorkspaceConfig) SetDefaults ¶ added in v1.0.0
func (pwc *ProjectWorkspaceConfig) SetDefaults()
SetDefaults sets the default values for the project workspace configuration when not set.
func (*ProjectWorkspaceConfig) Validate ¶ added in v1.0.0
func (pwc *ProjectWorkspaceConfig) Validate() error
Validate validates the project workspace configuration.
type ProjectWorkspaceConfigList ¶ added in v1.0.0
type ProjectWorkspaceConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []ProjectWorkspaceConfig `json:"items"`
}
ProjectWorkspaceConfigList contains a list of ProjectWorkspaceConfig
func (*ProjectWorkspaceConfigList) DeepCopy ¶ added in v1.0.0
func (in *ProjectWorkspaceConfigList) DeepCopy() *ProjectWorkspaceConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectWorkspaceConfigList.
func (*ProjectWorkspaceConfigList) DeepCopyInto ¶ added in v1.0.0
func (in *ProjectWorkspaceConfigList) DeepCopyInto(out *ProjectWorkspaceConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProjectWorkspaceConfigList) DeepCopyObject ¶ added in v1.0.0
func (in *ProjectWorkspaceConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProjectWorkspaceConfigSpec ¶ added in v1.0.0
type ProjectWorkspaceConfigSpec struct {
// +optional
Project ProjectConfig `json:"project"`
// +optional
Workspace WorkspaceConfig `json:"workspace"`
// MemberOverridesName is the name of the MemberOverrides resource that should be used to manage admin access to the projects and workspaces.
// Leave empty to disable.
// +optional
MemberOverridesName string `json:"memberOverridesName,omitempty"`
// Webhook contains the configuration for the webhooks.
// +optional
Webhook WebhookConfig `json:"webhook"`
}
ProjectWorkspaceConfigSpec defines the desired state of ProjectWorkspaceConfig
func (*ProjectWorkspaceConfigSpec) DeepCopy ¶ added in v1.0.0
func (in *ProjectWorkspaceConfigSpec) DeepCopy() *ProjectWorkspaceConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectWorkspaceConfigSpec.
func (*ProjectWorkspaceConfigSpec) DeepCopyInto ¶ added in v1.0.0
func (in *ProjectWorkspaceConfigSpec) DeepCopyInto(out *ProjectWorkspaceConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemainingContentResource ¶
type RemainingContentResource struct {
// APIGroup is the group of the resource.
APIGroup string `json:"apiGroup"`
// Kind is the kind of the resource.
Kind string `json:"kind"`
// Name is the name of the resource.
Name string `json:"name"`
// Namespace is the namespace of the resource.
Namespace string `json:"namespace"`
}
RemainingContentResource is a resource used to track remaining content in a workspace. It is solely used as an information resource to inform the user about remaining content.
func (*RemainingContentResource) DeepCopy ¶
func (in *RemainingContentResource) DeepCopy() *RemainingContentResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemainingContentResource.
func (*RemainingContentResource) DeepCopyInto ¶
func (in *RemainingContentResource) DeepCopyInto(out *RemainingContentResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Subject ¶
type Subject struct {
// Kind of object being referenced. Can be "User", "Group", or "ServiceAccount".
// +kubebuilder:validation:Enum=User;Group;ServiceAccount
Kind string `json:"kind"`
// Name of the object being referenced.
Name string `json:"name"`
// Namespace of the referenced object. Required if Kind is "ServiceAccount". Must not be specified if Kind is "User" or "Group".
// +optional
Namespace string `json:"namespace,omitempty"`
}
Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. +kubebuilder:validation:XValidation:rule="self.kind == 'ServiceAccount' || !has(self.__namespace__)",message="Namespace must not be specified if Kind is User or Group" +kubebuilder:validation:XValidation:rule="self.kind != 'ServiceAccount' || has(self.__namespace__)",message="Namespace is required for ServiceAccount"
func (*Subject) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subject.
func (*Subject) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebhookConfig ¶ added in v1.0.0
type WebhookConfig struct {
// Disabled specifies whether the webhooks should be disabled.
// +optional
Disabled bool `json:"disabled"`
}
func (*WebhookConfig) DeepCopy ¶ added in v1.0.0
func (in *WebhookConfig) DeepCopy() *WebhookConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConfig.
func (*WebhookConfig) DeepCopyInto ¶ added in v1.0.0
func (in *WebhookConfig) DeepCopyInto(out *WebhookConfig)
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"`
}
Workspace is the Schema for the workspaces API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=ws +kubebuilder:printcolumn:name="Display Name",type="string",JSONPath=".metadata.annotations.openmcp\\.cloud/display-name" +kubebuilder:printcolumn:name="Resulting Namespace",type="string",JSONPath=".status.namespace" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:validation:XValidation:rule="size(self.metadata.name) <= 25",message="Name must not be longer than 25 characters" +kubebuilder:metadata:labels="openmcp.cloud/cluster=onboarding"
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) RemoveCondition ¶
func (ws *Workspace) RemoveCondition(conditionType ConditionType)
func (*Workspace) SetOrUpdateCondition ¶
func (*Workspace) SetupWebhookWithManager ¶
func (*Workspace) TypeIdentifier ¶
TypeIdentifier implements AccessEntity.
func (*Workspace) UserInfoHasRole ¶
func (ws *Workspace) UserInfoHasRole(userInfo authv1.UserInfo, role WorkspaceMemberRole) bool
func (*Workspace) UserInfoRoles ¶
func (ws *Workspace) UserInfoRoles(userInfo authv1.UserInfo) []WorkspaceMemberRole
type WorkspaceConfig ¶ added in v1.0.0
type WorkspaceConfig struct {
// +optional
ResourcesBlockingDeletion []metav1.GroupVersionKind `json:"resourcesBlockingDeletion,omitempty"`
// AdditionalPermissions defines additional permissions users should have in a workspace, depending on their role.
// +optional
AdditionalPermissions map[WorkspaceMemberRole][]rbacv1.PolicyRule `json:"additionalPermissions,omitempty"`
}
WorkspaceConfig contains the configuration for workspaces.
func (*WorkspaceConfig) DeepCopy ¶ added in v1.0.0
func (in *WorkspaceConfig) DeepCopy() *WorkspaceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceConfig.
func (*WorkspaceConfig) DeepCopyInto ¶ added in v1.0.0
func (in *WorkspaceConfig) DeepCopyInto(out *WorkspaceConfig)
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,omitempty"`
Items []Workspace `json:"items"`
}
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 WorkspaceMember ¶
type WorkspaceMember struct {
Subject `json:""`
// Roles defines a list of roles that this workspace member should have.
Roles []WorkspaceMemberRole `json:"roles"`
}
func (*WorkspaceMember) DeepCopy ¶
func (in *WorkspaceMember) DeepCopy() *WorkspaceMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceMember.
func (*WorkspaceMember) DeepCopyInto ¶
func (in *WorkspaceMember) DeepCopyInto(out *WorkspaceMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceMember) Username ¶
func (wm *WorkspaceMember) Username() (string, bool)
type WorkspaceMemberRole ¶
type WorkspaceMemberRole string
+kubebuilder:validation:Enum=admin;view
const ( WorkspaceRoleAdmin WorkspaceMemberRole = "admin" WorkspaceRoleView WorkspaceMemberRole = "view" )
func (WorkspaceMemberRole) EntityType ¶
func (w WorkspaceMemberRole) EntityType() entities.AccessEntity
EntityType implements AccessRole.
func (WorkspaceMemberRole) Identifier ¶
func (w WorkspaceMemberRole) Identifier() string
Identifier implements AccessRole.
type WorkspaceSpec ¶
type WorkspaceSpec struct {
// Members is a list of workspace members.
Members []WorkspaceMember `json:"members,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 {
Namespace string `json:"namespace"`
// +optional
Conditions []Condition `json:"conditions,omitempty"`
}
WorkspaceStatus defines the observed state 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.
type WorkspaceWebhook ¶ added in v1.0.0
type WorkspaceWebhook struct {
client.Client
// Identity is the name of the entity (usually a service account) the project-workspace-operator uses to access the onboarding cluster.
// It is required to exclude the operator's own identity from validation checks.
Identity string
OverrideName string
}
+kubebuilder:object:generate=false
func (*WorkspaceWebhook) Default ¶ added in v1.0.0
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*WorkspaceWebhook) ValidateCreate ¶ added in v1.0.0
func (v *WorkspaceWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*WorkspaceWebhook) ValidateDelete ¶ added in v1.0.0
func (v *WorkspaceWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*WorkspaceWebhook) ValidateUpdate ¶ added in v1.0.0
func (v *WorkspaceWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type