Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the database v1 API group +kubebuilder:object:generate=true +groupName=database.laf.dev
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "database.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 Database ¶
type Database struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DatabaseSpec `json:"spec,omitempty"`
Status DatabaseStatus `json:"status,omitempty"`
}
Database is the Schema for the databases API
func (*Database) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Database.
func (*Database) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Database) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatabaseCapacity ¶
type DatabaseCapacity struct {
// The storage space of database.
//+optional
Storage resource.Quantity `json:"storage,omitempty"`
}
func (*DatabaseCapacity) DeepCopy ¶
func (in *DatabaseCapacity) DeepCopy() *DatabaseCapacity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseCapacity.
func (*DatabaseCapacity) DeepCopyInto ¶
func (in *DatabaseCapacity) DeepCopyInto(out *DatabaseCapacity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseList ¶
type DatabaseList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Database `json:"items"`
}
DatabaseList contains a list of Database
func (*DatabaseList) DeepCopy ¶
func (in *DatabaseList) DeepCopy() *DatabaseList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseList.
func (*DatabaseList) DeepCopyInto ¶
func (in *DatabaseList) DeepCopyInto(out *DatabaseList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatabaseList) DeepCopyObject ¶
func (in *DatabaseList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatabaseSpec ¶
type DatabaseSpec struct {
// Provider name of the database.
// The controller will create the corresponding storage resources based on this provider.
//+kubebuilder:validation:Required
Provider string `json:"provider"`
// Region of the database.
//+kubebuilder:validation:Required
Region string `json:"region"`
// Capacity desired.
//+kubebuilder:validation:Required
Capacity DatabaseCapacity `json:"capacity"`
// Username of the database.
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=6
//+kubebuilder:validation:MaxLength=32
Username string `json:"username"`
// Password of the database.
//+kubebuilder:validation:Required
//+kubebuilder:validation:MinLength=16
//+kubebuilder:validation:MaxLength=64
Password string `json:"password"`
}
DatabaseSpec defines the desired state of Database
func (*DatabaseSpec) DeepCopy ¶
func (in *DatabaseSpec) DeepCopy() *DatabaseSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseSpec.
func (*DatabaseSpec) DeepCopyInto ¶
func (in *DatabaseSpec) DeepCopyInto(out *DatabaseSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseStatus ¶
type DatabaseStatus struct {
// Store name of this database.
// 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"`
// ConnectionUri of the database.
ConnectionUri string `json:"connectionUri"`
// Capacity observed by the controller
Capacity DatabaseCapacity `json:"capacity,omitempty"`
// Conditions of the database
// - type: Ready
// status: True
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
DatabaseStatus defines the observed state of Database
func (*DatabaseStatus) DeepCopy ¶
func (in *DatabaseStatus) DeepCopy() *DatabaseStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseStatus.
func (*DatabaseStatus) DeepCopyInto ¶
func (in *DatabaseStatus) DeepCopyInto(out *DatabaseStatus)
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.
//+optional
Storage resource.Quantity `json:"storage,omitempty"`
// The number of databases. The default value is 0 which means unlimited.
//+optional
//+kubebuilder:validation:Minimum=0
//+kubebuilder:default=0
DatabaseCount int64 `json:"databaseCount,omitempty"`
// The number of collections. The default value is 0 which means unlimited.
//+kubebuilder:validation:Minimum=0
//+kubebuilder:default=0
//+optional
CollectionCount int64 `json:"collectionCount,omitempty"`
}
StoreCapacity defines the capacity 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 of the store, defaults to "default".
//+kubebuilder:validation:MinLength=2
//+kubebuilder:validation:MaxLength=64
//+kubebuilder:validation:Required
//+kubebuilder:validation:Pattern=^[a-z0-9-]+$
//+kubebuilder:default=default
Region string `json:"region"`
// The provider of the store, defaults to "mongodb".
//+kubebuilder:validation:MinLength=2
//+kubebuilder:validation:MaxLength=64
//+kubebuilder:validation:Required
//+kubebuilder:default=mongodb
Provider string `json:"provider"`
// The connection uri of the store.
//+kubebuilder:validation:Required
ConnectionUri string `json:"connectionUri"`
// The capacity of the store.
//+optional
Capacity *StoreCapacity `json:"capacity,omitempty"`
// Priority of the store. The higher the priority, the first to be selected.
// If this value is 0, this store will not be selected for allocating new database.
//+kubebuilder:validation:Minimum=0
//+kubebuilder:validation:Maximum=100
//+kubebuilder:default=10
//+optional
Priority int32 `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 the store.
//+optional
Capacity *StoreCapacity `json:"capacity,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.