Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the oss v1 API group +kubebuilder:object:generate=true +groupName=oss.laf.dev
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "oss.laf.dev", 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 Bucket ¶
type Bucket struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BucketSpec `json:"spec,omitempty"` Status BucketStatus `json:"status,omitempty"` }
Bucket is the Schema for the buckets API
func (*Bucket) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bucket.
func (*Bucket) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Bucket) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BucketCapacity ¶
type BucketCapacity struct { // Storage space of this bucket. MaxStorage resource.Quantity `json:"maxStorage,omitempty"` // The used storage space. UsedStorage resource.Quantity `json:"storage,omitempty"` // The user's number of objects. //+optional //+kubebuilder:validation:Minimum=0 //+kubebuilder:default=0 ObjectCount int64 `json:"objectCount,omitempty"` }
func (*BucketCapacity) DeepCopy ¶
func (in *BucketCapacity) DeepCopy() *BucketCapacity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketCapacity.
func (*BucketCapacity) DeepCopyInto ¶
func (in *BucketCapacity) DeepCopyInto(out *BucketCapacity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BucketList ¶
type BucketList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Bucket `json:"items"` }
BucketList contains a list of Bucket
func (*BucketList) DeepCopy ¶
func (in *BucketList) DeepCopy() *BucketList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketList.
func (*BucketList) DeepCopyInto ¶
func (in *BucketList) DeepCopyInto(out *BucketList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BucketList) DeepCopyObject ¶
func (in *BucketList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BucketPolicy ¶
type BucketPolicy string
BucketPolicy mode
const ( BucketPolicyPrivate BucketPolicy = "private" BucketPolicyReadOnly BucketPolicy = "readonly" BucketPolicyPublic BucketPolicy = "readwrite" )
type BucketSpec ¶
type BucketSpec struct { // Policy of bucket in oss, defaults to 'private'. //+kubebuilder:validation:Enum=private;readonly;readwrite //+kubebuilder:validation:Default=private //+optional Policy BucketPolicy `json:"policy"` // Storage space of this bucket. //+kubebuilder:validation:Required Storage resource.Quantity `json:"storage"` }
BucketSpec defines the desired state of Bucket
func (*BucketSpec) DeepCopy ¶
func (in *BucketSpec) DeepCopy() *BucketSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketSpec.
func (*BucketSpec) DeepCopyInto ¶
func (in *BucketSpec) DeepCopyInto(out *BucketSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BucketStatus ¶
type BucketStatus struct { // Username of bucket in oss. User string `json:"user"` // Policy of bucket in oss. Policy BucketPolicy `json:"policy"` // Versioning of bucket in oss. Versioning bool `json:"versioning"` // Capacity of this bucket. Capacity BucketCapacity `json:"capacity"` // Conditions // - Type: Ready Conditions []metav1.Condition `json:"conditions,omitempty"` }
BucketStatus defines the observed state of Bucket
func (*BucketStatus) DeepCopy ¶
func (in *BucketStatus) DeepCopy() *BucketStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketStatus.
func (*BucketStatus) DeepCopyInto ¶
func (in *BucketStatus) DeepCopyInto(out *BucketStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Store ¶
type Store struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec StoreSpec `json:"spec,omitempty"` Status StoreStatus `json:"status,omitempty"` }
Store is the Schema for the stores API
func (*Store) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Store.
func (*Store) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Store) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StoreCapacity ¶
type StoreCapacity struct { // The user count of a store. //+optional UserCount int64 `json:"userCount,omitempty"` // The storage space. The unit is MB. // The default value is 0 which means unlimited. //+optional Storage resource.Quantity `json:"storage,omitempty"` // The number of objects. The default value is 0 which means unlimited. //+optional //+kubebuilder:validation:Minimum=0 //+kubebuilder:default=0 ObjectCount int64 `json:"objectCount,omitempty"` // The number of buckets. The default value is 0 which means unlimited. //+kubebuilder:validation:Minimum=0 //+kubebuilder:default=0 //+optional BucketCount int64 `json:"bucketCount,omitempty"` }
StoreCapacity is the capacity data of a store.
func (*StoreCapacity) DeepCopy ¶
func (in *StoreCapacity) DeepCopy() *StoreCapacity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoreCapacity.
func (*StoreCapacity) DeepCopyInto ¶
func (in *StoreCapacity) DeepCopyInto(out *StoreCapacity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StoreList ¶
type StoreList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Store `json:"items"` }
StoreList contains a list of Store
func (*StoreList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoreList.
func (*StoreList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StoreList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StoreSpec ¶
type StoreSpec struct { // The region name identifies the location of the store. This is a required field and default value is "default" //+kubebuilder:validation:Required //+kubebuilder:validation:MinLength=2 //+kubebuilder:validation:MaxLength=64 //+kubebuilder:default=default //+kubebuilder:validation:Pattern=[a-z0-9-]+ //+kubebuilder:printcolumn:name="Region",type="string",JSONPath=".spec.region" Region string `json:"region,omitempty"` // Provider identifies the store provider. This is readonly, cannot be modified after creation. // This value could be the following: // - "minio" for a minio cluster, **`laf` would only implement minio controller by default.** // - "aws-s3" for aws s3 service // - "qiniu" for qiniu service // - "google-cloud-storage" for google cloud storage // - "azure-blob-storage" for azure blob storage // - "aliyun-oss" for aliyun oss // - ... (more could be added) //+kubebuilder:validation:Required //+kubebuilder:validation:MinLength=2 //+kubebuilder:validation:MaxLength=64 //+kubebuilder:validation:Pattern=[a-zA-Z0-9-]+ //+kubebuilder:printcolumn:name="Provider",type="string",JSONPath=".spec.provider" Provider string `json:"provider,omitempty"` // Endpoint is the store service endpoint. // This is url string, like "http://minio-service:9000" //+kubebuilder:validation:Required Endpoint string `json:"endpoint"` // UseSSL indicates whether to use ssl to connect to the store service. //+kubebuilder:validation:Required //+kubebuilder:default=false UseSSL bool `json:"useSSL,omitempty"` // AccessKey is the access key which have admin rights of the store service. //+kubebuilder:validation:Required AccessKey string `json:"accessKey,omitempty"` // SecretKey is the secret key which have admin rights of the store service. //+kubebuilder:validation:Required SecretKey string `json:"secretKey,omitempty"` // Capacity is the maximum capacity of the store. //+optional Capacity StoreCapacity `json:"capacity,omitempty"` // Priority is used to guide the allocation of resources. // The higher the priority, the first to allocate resources in. // If this value is 0, this store will not be selected for allocating new user. //+kubebuilder:validation:Minimum=0 //+kubebuilder:validation:Maximum=100 //+kubebuilder:default=10 //+optional Priority int `json:"priority,omitempty"` }
StoreSpec defines the desired state of Store
func (*StoreSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoreSpec.
func (*StoreSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StoreStatus ¶
type StoreStatus struct { // The observed capacity of Store. //+optional Capacity StoreCapacity `json:"capacity,omitempty"` // Conditions // - Type: Ready Conditions []metav1.Condition `json:"conditions,omitempty"` }
StoreStatus defines the observed state of Store
func (*StoreStatus) DeepCopy ¶
func (in *StoreStatus) DeepCopy() *StoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoreStatus.
func (*StoreStatus) DeepCopyInto ¶
func (in *StoreStatus) DeepCopyInto(out *StoreStatus)
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"` }
User is the Schema for the users 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.
type UserCapacity ¶
type UserCapacity struct { // The user's storage space. // The default value is 0 which means unlimited. //+optional Storage resource.Quantity `json:"storage,omitempty"` // The user's number of objects. //+optional //+kubebuilder:validation:Minimum=0 //+kubebuilder:default=0 ObjectCount int64 `json:"objectCount,omitempty"` // The user's number of buckets. //+kubebuilder:validation:Minimum=0 //+kubebuilder:default=0 //+optional BucketCount int64 `json:"bucketCount,omitempty"` }
UserCapacity is used to obtain the user's used capacity.
func (*UserCapacity) DeepCopy ¶
func (in *UserCapacity) DeepCopy() *UserCapacity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserCapacity.
func (*UserCapacity) DeepCopyInto ¶
func (in *UserCapacity) DeepCopyInto(out *UserCapacity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
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 UserSpec ¶
type UserSpec struct { // AppId is the unique identifier for the app, usually used as the username of this User. //+kubebuilder:validation:MinLength=3 //+kubebuilder:validation:MaxLength=32 //+kubebuilder:validation:Required AppId string `json:"appid"` // Region of oss store. //+kubebuilder:validation:Required Region string `json:"region"` // Password is the secret name of the user, which is used to authenticate the user. //+kubebuilder:validation:MinLength=3 //+kubebuilder:validation:MaxLength=64 //+kubebuilder:validation:Required Password string `json:"password"` // Provider name of a oss store. It's read-only after creation. // The controller will create the corresponding storage resources based on this provider. //+kubebuilder:validation:Required Provider string `json:"provider"` // Capacity that user desired. Capacity UserCapacity `json:"capacity,omitempty"` }
UserSpec defines the desired state of User
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 { // StoreName of the oss store. It's read-only after creation. // The controller has created the corresponding storage resources based on this store. //+kubebuilder:validation:Required StoreName string `json:"storeName,omitempty"` //+kubebuilder:validation:Required StoreNamespace string `json:"storeNamespace,omitempty"` // AccessKey is the access key of the user AccessKey string `json:"accessKey,omitempty"` // SecretKey is the secret key of the user SecretKey string `json:"secretKey,omitempty"` // Endpoint is the store service endpoint. //+kubebuilder:validation:Required Endpoint string `json:"endpoint,omitempty"` // Region of oss store. //+kubebuilder:validation:Required Region string `json:"region"` // The user's capacity observed by the controller. Capacity UserCapacity `json:"capacity,omitempty"` // Conditions // - Type: Ready Conditions []metav1.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.