Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the bcrds v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=bcrds.cmss.com
Package v1alpha1 contains API Schema definitions for the bcrds v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=bcrds.cmss.com
Index ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type ClusterPhase
- type ConditionType
- type MaxValue
- type Metric
- type PeriodType
- type PortName
- type Proxy
- type Rule
- type ServerlessDB
- type ServerlessDBCondition
- type ServerlessDBList
- type ServerlessDBSpec
- type ServerlessDBStatus
- type Storage
- type StorageType
- type StorageUse
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "bcrds.cmss.com", Version: "v1alpha1"} // SchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // AddToScheme applies all the stored functions to the scheme. AddToScheme = localSchemeBuilder.AddToScheme // Scheme is the scheme instance of operator Scheme *runtime.Scheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns back a Group qualified GroupResource
Types ¶
type ClusterPhase ¶
type ClusterPhase string
ClusterPhase is the current state of tidb
const ( // Creating represents normal state of cluster. PhaseCreating ClusterPhase = "Creating" // Indicates cluster is being recovering or going to recover. PhaseRecovering ClusterPhase = "Recovering" // PhaseAvailable indicates that the cluster status is normal and available PhaseAvailable ClusterPhase = "Available" PhaseUnavailable ClusterPhase = "Unavailable" // PhaseFailed indicates that the cluster completely failed, unable to recover PhaseFailed ClusterPhase = "Failed" )
type ConditionType ¶
type ConditionType string
ConditionType represents a cluster condition value.
const ( // Ready indicates that the cluster is ready or not. // This is defined as: // - All Components reach usable level // todo: add condition type Ready ConditionType = "Ready" // TiDBInitial: waiting tidb initial successful, // status.phase will still be Creating if condition exist TiDBInitial type TiDBInitial ConditionType = "TiDBInitial" TiDBRestart ConditionType = "TiDBRestart" TiDBSilence ConditionType = "TiDBSilence" TiDBReadonly ConditionType = "TiDBReadonly" )
type MaxValue ¶
func (*MaxValue) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MaxValue.
func (*MaxValue) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Metric ¶
type Metric struct {
HashRate string `json:"hashRate,omitempty"`
}
func (*Metric) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metric.
func (*Metric) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PeriodType ¶
type PeriodType string
const ( CUSTOMIZE PeriodType = "" DAY PeriodType = "day" WEEK PeriodType = "week" MONTH PeriodType = "month" )
type Proxy ¶
type Proxy struct { // Defaults to "0". // +optional // +kubebuilder:default=0 SilentPeriod string `json:"silentPeriod,omitempty"` }
func (*Proxy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy.
func (*Proxy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rule ¶
type Rule struct { StartTime *metav1.Time `json:"startTime,omitempty"` EndTime *metav1.Time `json:"endTime,omitempty"` Metric Metric `json:"metric,omitempty"` Period PeriodType `json:"period,omitempty"` }
func (*Rule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerlessDB ¶
type ServerlessDB struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ServerlessDBSpec `json:"spec"` Status ServerlessDBStatus `json:"status"` }
ServerlessDB is the Schema for the serverlessdbs API +kubebuilder:subresource:status +kubebuilder:resource:path=serverlessdbs,scope=Namespaced
func (*ServerlessDB) DeepCopy ¶
func (in *ServerlessDB) DeepCopy() *ServerlessDB
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessDB.
func (*ServerlessDB) DeepCopyInto ¶
func (in *ServerlessDB) DeepCopyInto(out *ServerlessDB)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServerlessDB) DeepCopyObject ¶
func (in *ServerlessDB) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ServerlessDBCondition ¶
type ServerlessDBCondition struct { // Type of the condition. Type ConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` // The last time this condition was updated. LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // The reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // A human readable message indicating details about the transition. // +optional Message string `json:"message,omitempty"` }
ServerlessDBCondition describes the state of a cluster at a certain point.
func (*ServerlessDBCondition) DeepCopy ¶
func (in *ServerlessDBCondition) DeepCopy() *ServerlessDBCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessDBCondition.
func (*ServerlessDBCondition) DeepCopyInto ¶
func (in *ServerlessDBCondition) DeepCopyInto(out *ServerlessDBCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerlessDBList ¶
type ServerlessDBList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []ServerlessDB `json:"items"` }
ServerlessDBList contains a list of ServerlessDB
func (*ServerlessDBList) DeepCopy ¶
func (in *ServerlessDBList) DeepCopy() *ServerlessDBList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessDBList.
func (*ServerlessDBList) DeepCopyInto ¶
func (in *ServerlessDBList) DeepCopyInto(out *ServerlessDBList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServerlessDBList) DeepCopyObject ¶
func (in *ServerlessDBList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ServerlessDBSpec ¶
type ServerlessDBSpec struct { // Indicates that the severlessdb is paused and will not be processed by // the controller. // +optional Paused bool `json:"paused,omitempty"` // Prevent external connections to tidb server // +optional Freeze bool `json:"freeze,omitempty"` // +optional // +kubebuilder:default=IfNotPresent ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy"` Proxy Proxy `json:"proxy,omitempty"` MaxValue MaxValue `json:"maxValue,omitempty"` // Indicates that the tiflash cluster is used and will not be processed by // the controller. // +optional UseTiFlash bool `json:"useTiFlash,omitempty"` ScaleOut string `json:"scaleOut,omitempty"` ScaleIn string `json:"scaleIn,omitempty"` RateOfScaleDown string `json:"rateOfScaleDown,omitempty"` TimeToScaleDown string `json:"timeToScaleDown,omitempty"` NormalResource corev1.ResourceRequirements `json:"normalResource,omitempty"` MinResource corev1.ResourceRequirements `json:"minResource,omitempty"` Rule map[string]Rule `json:"rule,omitempty"` }
ServerlessDBSpec defines the desired state of ServerlessDB +k8s:openapi-gen=true
func (*ServerlessDBSpec) DeepCopy ¶
func (in *ServerlessDBSpec) DeepCopy() *ServerlessDBSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessDBSpec.
func (*ServerlessDBSpec) DeepCopyInto ¶
func (in *ServerlessDBSpec) DeepCopyInto(out *ServerlessDBSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerlessDBStatus ¶
type ServerlessDBStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html // Rule is the Currently triggered rule Rule []string `json:"rule,omitempty"` // Represents the latest phase Phase ClusterPhase `json:"phase,omitempty"` // Node port for sldb NodePort map[PortName]int32 `json:"nodePort,omitempty"` // storage usage StorageUsage map[StorageUse]resource.Quantity `json:"storageUsage,omitempty"` // Represents the latest available observations of a cluster's state. // +optional Conditions []ServerlessDBCondition `json:"conditions,omitempty"` }
ServerlessDBStatus defines the observed state of ServerlessDB
func (*ServerlessDBStatus) DeepCopy ¶
func (in *ServerlessDBStatus) DeepCopy() *ServerlessDBStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerlessDBStatus.
func (*ServerlessDBStatus) DeepCopyInto ¶
func (in *ServerlessDBStatus) DeepCopyInto(out *ServerlessDBStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Storage ¶
type Storage struct { // StorageSize is the request storage size for backup job StorageType StorageType `json:"type,omitempty"` // The storageClassName of the persistent volume for Backup data storage. // Defaults to Kubernetes default storage class. // +optional StorageClassName *string `json:"storageClassName,omitempty"` // StorageSize is the request storage size StorageSize string `json:"storageSize,omitempty"` }
func (*Storage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
func (*Storage) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageType ¶
type StorageType string
const ( CLOUD StorageType = "cloud" LOCAL StorageType = "local" )
type StorageUse ¶
type StorageUse string
const ( TiKVSingleStoreMax StorageUse = "TiKVSingleStoreMax" TiKVTotalStoreUsage StorageUse = "TiKVTotalStoreUsage" )