v1alpha1

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the s3 v1alpha1 API group +kubebuilder:object:generate=true +groupName=s3.snappcloud.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "s3.snappcloud.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
)
View Source
var (
	ValidationTimeout time.Duration
)

Functions

This section is empty.

Types

type S3Bucket

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

	Spec   S3BucketSpec   `json:"spec,omitempty"`
	Status S3BucketStatus `json:"status,omitempty"`
}

S3 Bucket Instance

func (*S3Bucket) DeepCopy

func (in *S3Bucket) DeepCopy() *S3Bucket

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

func (*S3Bucket) DeepCopyInto

func (in *S3Bucket) DeepCopyInto(out *S3Bucket)

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

func (*S3Bucket) DeepCopyObject

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

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

func (*S3Bucket) SetupWebhookWithManager

func (sb *S3Bucket) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*S3Bucket) ValidateCreate

func (sb *S3Bucket) ValidateCreate() error

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

func (*S3Bucket) ValidateDelete

func (sb *S3Bucket) ValidateDelete() error

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

func (*S3Bucket) ValidateUpdate

func (sb *S3Bucket) ValidateUpdate(old runtime.Object) error

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

type S3BucketList

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

S3BucketList contains a list of S3Bucket

func (*S3BucketList) DeepCopy

func (in *S3BucketList) DeepCopy() *S3BucketList

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

func (*S3BucketList) DeepCopyInto

func (in *S3BucketList) DeepCopyInto(out *S3BucketList)

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

func (*S3BucketList) DeepCopyObject

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

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

type S3BucketSpec

type S3BucketSpec struct {
	// +kubebuilder:validation:Required
	S3UserRef string `json:"s3UserRef"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Enum=delete;retain
	// +kubebuilder:default=delete
	S3DeletionPolicy string `json:"s3DeletionPolicy,omitempty"`

	// +kubebuilder:validation:Optional
	S3SubuserBinding []SubuserBinding `json:"s3SubuserBinding,omitempty"`
}

S3BucketSpec defines the desired state of S3Bucket

func (*S3BucketSpec) DeepCopy

func (in *S3BucketSpec) DeepCopy() *S3BucketSpec

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

func (*S3BucketSpec) DeepCopyInto

func (in *S3BucketSpec) DeepCopyInto(out *S3BucketSpec)

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

type S3BucketStatus

type S3BucketStatus struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=false
	Created bool `json:"created,omitempty"`

	// +kubebuilder:validation:Optional
	Reason string `json:"reason,omitempty"`

	// +kubebuilder:validation:Optional
	Policy string `json:"policy,omitempty"`
}

S3BucketStatus defines the observed state of S3Bucket

func (*S3BucketStatus) DeepCopy

func (in *S3BucketStatus) DeepCopy() *S3BucketStatus

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

func (*S3BucketStatus) DeepCopyInto

func (in *S3BucketStatus) DeepCopyInto(out *S3BucketStatus)

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

type S3User

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

	Spec   S3UserSpec   `json:"spec,omitempty"`
	Status S3UserStatus `json:"status,omitempty"`
}

S3 User is created by the S3 User Claim instance. It's not applicable for the operator user.

func (*S3User) DeepCopy

func (in *S3User) DeepCopy() *S3User

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

func (*S3User) DeepCopyInto

func (in *S3User) DeepCopyInto(out *S3User)

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

func (*S3User) DeepCopyObject

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

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

func (*S3User) GetS3UserClass

func (suc *S3User) GetS3UserClass() string

type S3UserClaim

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

	Spec   S3UserClaimSpec   `json:"spec,omitempty"`
	Status S3UserClaimStatus `json:"status,omitempty"`
}

S3 User Claim Instance

func (*S3UserClaim) DeepCopy

func (in *S3UserClaim) DeepCopy() *S3UserClaim

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

func (*S3UserClaim) DeepCopyInto

func (in *S3UserClaim) DeepCopyInto(out *S3UserClaim)

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

func (*S3UserClaim) DeepCopyObject

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

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

func (*S3UserClaim) GetS3UserClass

func (suc *S3UserClaim) GetS3UserClass() string

func (*S3UserClaim) SetupWebhookWithManager

func (suc *S3UserClaim) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*S3UserClaim) ValidateCreate

func (suc *S3UserClaim) ValidateCreate() error

func (*S3UserClaim) ValidateDelete

func (suc *S3UserClaim) ValidateDelete() error

func (*S3UserClaim) ValidateUpdate

func (suc *S3UserClaim) ValidateUpdate(old runtime.Object) error

type S3UserClaimList

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

S3UserClaimList contains a list of S3UserClaim

func (*S3UserClaimList) DeepCopy

func (in *S3UserClaimList) DeepCopy() *S3UserClaimList

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

func (*S3UserClaimList) DeepCopyInto

func (in *S3UserClaimList) DeepCopyInto(out *S3UserClaimList)

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

func (*S3UserClaimList) DeepCopyObject

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

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

type S3UserClaimSpec

type S3UserClaimSpec struct {
	// +kubebuilder:validation:Optional
	S3UserClass string `json:"s3UserClass,omitempty"`

	// +kubebuilder:validation:Required
	ReadonlySecret string `json:"readonlySecret"`

	// +kubebuilder:validation:Required
	AdminSecret string `json:"adminSecret"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={"maxSize":"5368709120", "maxObjects":"1000", "maxBuckets": 2}
	Quota *UserQuota `json:"quota,omitempty"`

	// +kubebuilder:validation:Optional
	Subusers []Subuser `json:"subusers,omitempty"`
}

S3UserClaimSpec defines the desired state of S3UserClaim

func (*S3UserClaimSpec) DeepCopy

func (in *S3UserClaimSpec) DeepCopy() *S3UserClaimSpec

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

func (*S3UserClaimSpec) DeepCopyInto

func (in *S3UserClaimSpec) DeepCopyInto(out *S3UserClaimSpec)

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

type S3UserClaimStatus

type S3UserClaimStatus struct {
	// +kubebuilder:validation:Optional
	Quota *UserQuota `json:"quota,omitempty"`

	// +kubebuilder:validation:Optional
	S3UserName string `json:"s3UserName,omitempty"`

	// +kubebuilder:validation:Optional
	Subusers []Subuser `json:"subusers,omitempty"`
}

S3UserClaimStatus defines the observed state of S3UserClaim

func (*S3UserClaimStatus) DeepCopy

func (in *S3UserClaimStatus) DeepCopy() *S3UserClaimStatus

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

func (*S3UserClaimStatus) DeepCopyInto

func (in *S3UserClaimStatus) DeepCopyInto(out *S3UserClaimStatus)

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

type S3UserList

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

S3UserList contains a list of S3User

func (*S3UserList) DeepCopy

func (in *S3UserList) DeepCopy() *S3UserList

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

func (*S3UserList) DeepCopyInto

func (in *S3UserList) DeepCopyInto(out *S3UserList)

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

func (*S3UserList) DeepCopyObject

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

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

type S3UserSpec

type S3UserSpec struct {
	// +kubebuilder:validation:Optional
	S3UserClass string `json:"s3UserClass,omitempty"`

	// +kubebuilder:validation:Optional
	Quota *UserQuota `json:"quota,omitempty"`

	// +kubebuilder:validation:Optional
	ClaimRef *v1.ObjectReference `json:"claimRef,omitempty"`
}

S3UserSpec defines the desired state of S3User

func (*S3UserSpec) DeepCopy

func (in *S3UserSpec) DeepCopy() *S3UserSpec

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

func (*S3UserSpec) DeepCopyInto

func (in *S3UserSpec) DeepCopyInto(out *S3UserSpec)

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

type S3UserStatus

type S3UserStatus struct {
}

S3UserStatus defines the observed state of S3User

func (*S3UserStatus) DeepCopy

func (in *S3UserStatus) DeepCopy() *S3UserStatus

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

func (*S3UserStatus) DeepCopyInto

func (in *S3UserStatus) DeepCopyInto(out *S3UserStatus)

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

type Subuser

type Subuser string

+kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$

type SubuserBinding

type SubuserBinding struct {
	// name of the subuser
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// access of the subuser which can be read or write
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=read
	// +kubebuilder:validation:Enum=read;write
	Access string `json:"access,omitempty"`
}

func (*SubuserBinding) DeepCopy

func (in *SubuserBinding) DeepCopy() *SubuserBinding

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

func (*SubuserBinding) DeepCopyInto

func (in *SubuserBinding) DeepCopyInto(out *SubuserBinding)

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

type UserQuota

type UserQuota struct {
	// max number of bytes the user can store
	MaxSize resource.Quantity `json:"maxSize,omitempty"`
	// max number of objects the user can store
	MaxObjects resource.Quantity `json:"maxObjects,omitempty"`
	// max number of buckets the user can create
	MaxBuckets int64 `json:"maxBuckets,omitempty"`
}

UserQuota specifies the quota for a user in Ceph

func CalculateClusterUsedQuota

func CalculateClusterUsedQuota(ctx context.Context, runtimeClient client.Client,
	suc *S3UserClaim, addCurrentQuota bool) (*UserQuota, string, error)

func CalculateNamespaceUsedQuota

func CalculateNamespaceUsedQuota(ctx context.Context, uncachedReader client.Reader,
	suc *S3UserClaim, namespace string, addCurrentQuota bool) (*UserQuota, error)

func (*UserQuota) DeepCopy

func (in *UserQuota) DeepCopy() *UserQuota

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

func (*UserQuota) DeepCopyInto

func (in *UserQuota) DeepCopyInto(out *UserQuota)

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