v1

package
v0.0.0-...-e191437 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Overview

Package v1 contains API Schema definitions for the user v1 API group +kubebuilder:object:generate=true +groupName=user.sealos.io

Index

Constants

View Source
const (
	// UserAnnotationCreatorKey refers to the user who created the resource
	UserAnnotationCreatorKey = "user.sealos.io/creator"
	// UserAnnotationOwnerKey refers to the user who owns the resource
	UserAnnotationOwnerKey   = "user.sealos.io/owner"
	UserLabelOwnerKey        = "user.sealos.io/owner"
	UserAnnotationDisplayKey = "user.sealos.io/display-name"
)
View Source
const (
	UgNameLabelKey        = "user.sealos.io/usergroup.name"
	UgRoleLabelKey        = "user.sealos.io/usergroup.role"
	UgBindingKindLabelKey = "user.sealos.io/usergroupbinding.kind"
	UgBindingNameLabelKey = "user.sealos.io/usergroupbinding.name"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "user.sealos.io", Version: "v1"}

	// 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 ActionType

type ActionType string
const (
	Grant   ActionType = "Grant"
	Update  ActionType = "Update"
	Deprive ActionType = "Deprive"
)

type Condition

type Condition struct {
	Type ConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ConditionType"`
	// Status is the status of the condition. One of True, False, Unknown.
	Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
	// LastHeartbeatTime is the last time this condition was updated.
	// +optional
	LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime,omitempty" protobuf:"bytes,3,opt,name=lastHeartbeatTime"`
	// LastTransitionTime is the last time the condition changed from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
	// Reason is a (brief) reason for the condition's last status change.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
	// Message is a human-readable message indicating details about the last status change.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConditionType

type ConditionType string
const (
	Initialized ConditionType = "Initialized"
	Ready       ConditionType = "Ready"
)

type DeleteRequest

type DeleteRequest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DeleteRequestSpec   `json:"spec,omitempty"`
	Status DeleteRequestStatus `json:"status,omitempty"`
}

DeleteRequest is the Schema for the deleterequests API

func (*DeleteRequest) DeepCopy

func (in *DeleteRequest) DeepCopy() *DeleteRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRequest.

func (*DeleteRequest) DeepCopyInto

func (in *DeleteRequest) DeepCopyInto(out *DeleteRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeleteRequest) DeepCopyObject

func (in *DeleteRequest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeleteRequestList

type DeleteRequestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DeleteRequest `json:"items"`
}

DeleteRequestList contains a list of DeleteRequest

func (*DeleteRequestList) DeepCopy

func (in *DeleteRequestList) DeepCopy() *DeleteRequestList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRequestList.

func (*DeleteRequestList) DeepCopyInto

func (in *DeleteRequestList) DeepCopyInto(out *DeleteRequestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeleteRequestList) DeepCopyObject

func (in *DeleteRequestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DeleteRequestSpec

type DeleteRequestSpec struct {
	User string `json:"user,omitempty"`
}

DeleteRequestSpec defines the desired state of DeleteRequest

func (*DeleteRequestSpec) DeepCopy

func (in *DeleteRequestSpec) DeepCopy() *DeleteRequestSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRequestSpec.

func (*DeleteRequestSpec) DeepCopyInto

func (in *DeleteRequestSpec) DeepCopyInto(out *DeleteRequestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeleteRequestStatus

type DeleteRequestStatus struct {
	//+kubebuilder:validation:Enum=Pending;Processing;Completed;Failed
	Phase RequestPhase `json:"phase,omitempty"`
}

DeleteRequestStatus defines the observed state of DeleteRequest

func (*DeleteRequestStatus) DeepCopy

func (in *DeleteRequestStatus) DeepCopy() *DeleteRequestStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteRequestStatus.

func (*DeleteRequestStatus) DeepCopyInto

func (in *DeleteRequestStatus) DeepCopyInto(out *DeleteRequestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Operationrequest

type Operationrequest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   OperationrequestSpec   `json:"spec,omitempty"`
	Status OperationrequestStatus `json:"status,omitempty"`
}

Operationrequest is the Schema for the operation requests API

func (*Operationrequest) DeepCopy

func (in *Operationrequest) DeepCopy() *Operationrequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operationrequest.

func (*Operationrequest) DeepCopyInto

func (in *Operationrequest) DeepCopyInto(out *Operationrequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Operationrequest) DeepCopyObject

func (in *Operationrequest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Operationrequest) SetupWebhookWithManager

func (r *Operationrequest) SetupWebhookWithManager(mgr ctrl.Manager) error

type OperationrequestList

type OperationrequestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Operationrequest `json:"items"`
}

OperationrequestList contains a list of Operationrequest

func (*OperationrequestList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationrequestList.

func (*OperationrequestList) DeepCopyInto

func (in *OperationrequestList) DeepCopyInto(out *OperationrequestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OperationrequestList) DeepCopyObject

func (in *OperationrequestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OperationrequestSpec

type OperationrequestSpec struct {
	User string `json:"user,omitempty"`
	// +kubebuilder:validation:Enum=Owner;Manager;Developer
	Role RoleType `json:"role,omitempty"`
	// +kubebuilder:validation:Enum=Grant;Update;Deprive
	Action ActionType `json:"action,omitempty"`
}

OperationrequestSpec defines the desired state of Operationrequest

func (*OperationrequestSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationrequestSpec.

func (*OperationrequestSpec) DeepCopyInto

func (in *OperationrequestSpec) DeepCopyInto(out *OperationrequestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperationrequestStatus

type OperationrequestStatus struct {
	// Phase is the recently observed lifecycle phase of operationrequest.
	//+kubebuilder:default:=Pending
	//+kubebuilder:validation:Enum=Pending;Processing;Completed;Failed
	Phase RequestPhase `json:"phase,omitempty"`
}

OperationrequestStatus defines the observed state of Operationrequest

func (*OperationrequestStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationrequestStatus.

func (*OperationrequestStatus) DeepCopyInto

func (in *OperationrequestStatus) DeepCopyInto(out *OperationrequestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReqMutator

type ReqMutator struct {
	client.Client
}

func (ReqMutator) Default

func (r ReqMutator) Default(_ context.Context, obj runtime.Object) error

type ReqValidator

type ReqValidator struct {
	client.Client
}

func (ReqValidator) ValidateCreate

func (r ReqValidator) ValidateCreate(ctx context.Context, obj runtime.Object) error

func (ReqValidator) ValidateDelete

func (r ReqValidator) ValidateDelete(_ context.Context, _ runtime.Object) error

func (ReqValidator) ValidateUpdate

func (r ReqValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) error

type RequestPhase

type RequestPhase string
const (
	RequestPending    RequestPhase = "Pending"
	RequestProcessing RequestPhase = "Processing"
	RequestCompleted  RequestPhase = "Completed"
	RequestFailed     RequestPhase = "Failed"
)

These are the valid phases of node.

type RoleType

type RoleType string
const (
	OwnerRoleType     RoleType = "Owner"
	ManagerRoleType   RoleType = "Manager"
	DeveloperRoleType RoleType = "Developer"
)

type User

type User struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   UserSpec   `json:"spec,omitempty"`
	Status UserStatus `json:"status,omitempty"`
}

User is the Schema for the users API

func (*User) DeepCopy

func (in *User) DeepCopy() *User

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.

func (*User) DeepCopyInto

func (in *User) DeepCopyInto(out *User)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*User) DeepCopyObject

func (in *User) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*User) Default

func (r *User) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*User) SetupWebhookWithManager

func (r *User) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*User) ValidateCreate

func (r *User) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*User) ValidateDelete

func (r *User) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*User) ValidateUpdate

func (r *User) ValidateUpdate(_ runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type UserList

type UserList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []User `json:"items"`
}

UserList contains a list of User

func (*UserList) DeepCopy

func (in *UserList) DeepCopy() *UserList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList.

func (*UserList) DeepCopyInto

func (in *UserList) DeepCopyInto(out *UserList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UserList) DeepCopyObject

func (in *UserList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UserPhase

type UserPhase string
const (
	UserPending UserPhase = "Pending"
	UserUnknown UserPhase = "Unknown"
	UserActive  UserPhase = "Active"
)

These are the valid phases of node.

type UserSpec

type UserSpec struct {
	// expirationSeconds is the requested duration of validity of the issued
	// certificate. The certificate signer may issue a certificate with a different
	// validity duration so a client must check the delta between the notBefore and
	// notAfter fields in the issued certificate to determine the actual duration.
	//
	// The minimum valid value for expirationSeconds is 600, i.e. 10 minutes.
	//
	// +optional
	//+kubebuilder:default:=7200
	CSRExpirationSeconds int32 `json:"csrExpirationSeconds,omitempty"`
}

UserSpec defines the desired state of User

func (*UserSpec) DeepCopy

func (in *UserSpec) DeepCopy() *UserSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec.

func (*UserSpec) DeepCopyInto

func (in *UserSpec) DeepCopyInto(out *UserSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserStatus

type UserStatus struct {
	// Phase is the recently observed lifecycle phase of user
	//+kubebuilder:default:=Unknown
	Phase      UserPhase `json:"phase,omitempty"`
	KubeConfig string    `json:"kubeConfig"`
	//+kubebuilder:default:=7200
	ObservedCSRExpirationSeconds int32 `json:"observedCSRExpirationSeconds,omitempty"`
	// The generation observed by the user controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions contains the different condition statuses for this user.
	Conditions []Condition `json:"conditions,omitempty"`
}

UserStatus defines the observed state of User

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL