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) Default(ctx context.Context, obj runtime.Object) error
 - func (p *Project) RemoveCondition(conditionType ConditionType)
 - func (p *Project) SetOrUpdateCondition(condition Condition)
 - func (p *Project) SetupWebhookWithManager(mgr ctrl.Manager, memberOverridesName 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
 - func (p *Project) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
 - func (p *Project) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
 - func (p *Project) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)
 
- type ProjectList
 - type ProjectMember
 - type ProjectMemberRole
 - type ProjectSpec
 - type ProjectStatus
 - type RemainingContentResource
 - type Subject
 - type Workspace
 - func (in *Workspace) DeepCopy() *Workspace
 - func (in *Workspace) DeepCopyInto(out *Workspace)
 - func (in *Workspace) DeepCopyObject() runtime.Object
 - func (w *Workspace) Default(ctx context.Context, obj runtime.Object) error
 - func (ws *Workspace) RemoveCondition(conditionType ConditionType)
 - func (ws *Workspace) SetOrUpdateCondition(condition Condition)
 - func (r *Workspace) SetupWebhookWithManager(mgr ctrl.Manager, memberOverridesName 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
 - func (w *Workspace) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
 - func (w *Workspace) ValidateDelete(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)
 - func (w *Workspace) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)
 
- type WorkspaceList
 - type WorkspaceMember
 - type WorkspaceMemberRole
 - type WorkspaceSpec
 - type WorkspaceStatus
 
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" )
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: "core.openmcp.cloud", 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
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"
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) Default ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
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
func (*Project) ValidateCreate ¶
func (*Project) ValidateDelete ¶
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 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 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"
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) Default ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
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
func (*Workspace) ValidateCreate ¶
func (*Workspace) ValidateDelete ¶
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.