Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=pingcap.com
Index ¶
- Constants
- Variables
- func IsBackupClean(backup *Backup) bool
- func IsBackupComplete(backup *Backup) bool
- func IsBackupFailed(backup *Backup) bool
- func IsBackupScheduled(backup *Backup) bool
- func IsRestoreComplete(restore *Restore) bool
- func IsRestoreScheduled(restore *Restore) bool
- func Resource(resource string) schema.GroupResource
- func UpdateBackupCondition(status *BackupStatus, condition *BackupCondition) bool
- func UpdateRestoreCondition(status *RestoreStatus, condition *RestoreCondition) bool
- type Backup
- type BackupCondition
- type BackupConditionType
- type BackupList
- type BackupSchedule
- type BackupScheduleList
- type BackupScheduleSpec
- type BackupScheduleStatus
- type BackupSpec
- type BackupStatus
- type BackupStorageType
- type BackupType
- type CephStorageProvider
- type ContainerSpec
- type MemberPhase
- type MemberType
- type PDFailureMember
- type PDMember
- type PDSpec
- type PDStatus
- type PodAttributesSpec
- type ResourceRequirement
- type Restore
- type RestoreCondition
- type RestoreConditionType
- type RestoreList
- type RestoreSpec
- type RestoreStatus
- type Service
- type StorageProvider
- type TiDBFailureMember
- type TiDBMember
- type TiDBSlowLogTailerSpec
- type TiDBSpec
- type TiDBStatus
- type TiKVFailureStore
- type TiKVPromGatewaySpec
- type TiKVSpec
- type TiKVStatus
- type TiKVStore
- type TidbCluster
- func (in *TidbCluster) DeepCopy() *TidbCluster
- func (in *TidbCluster) DeepCopyInto(out *TidbCluster)
- func (in *TidbCluster) DeepCopyObject() runtime.Object
- func (tc *TidbCluster) GetClusterID() string
- func (tc *TidbCluster) PDAllMembersReady() bool
- func (tc *TidbCluster) PDAllPodsStarted() bool
- func (tc *TidbCluster) PDAutoFailovering() bool
- func (tc *TidbCluster) PDIsAvailable() bool
- func (tc *TidbCluster) PDRealReplicas() int32
- func (tc *TidbCluster) PDUpgrading() bool
- func (tc *TidbCluster) TiDBAllMembersReady() bool
- func (tc *TidbCluster) TiDBAllPodsStarted() bool
- func (tc *TidbCluster) TiDBRealReplicas() int32
- func (tc *TidbCluster) TiDBUpgrading() bool
- func (tc *TidbCluster) TiKVAllPodsStarted() bool
- func (tc *TidbCluster) TiKVAllStoresReady() bool
- func (tc *TidbCluster) TiKVIsAvailable() bool
- func (tc *TidbCluster) TiKVRealReplicas() int32
- func (tc *TidbCluster) TiKVUpgrading() bool
- type TidbClusterList
- type TidbClusterSpec
- type TidbClusterStatus
Constants ¶
const ( // TiKVStateUp represents status of Up of TiKV TiKVStateUp string = "Up" // TiKVStateDown represents status of Down of TiKV TiKVStateDown string = "Down" // TiKVStateOffline represents status of Offline of TiKV TiKVStateOffline string = "Offline" // TiKVStateTombstone represents status of Tombstone of TiKV TiKVStateTombstone string = "Tombstone" )
Variables ¶
var ( // 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 )
var SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func IsBackupClean ¶
IsBackupClean returns true if a Backup has successfully clean
func IsBackupComplete ¶
IsBackupComplete returns true if a Backup has successfully completed
func IsBackupFailed ¶
IsBackupFailed returns true if a Backup has failed
func IsBackupScheduled ¶
IsBackupScheduled returns true if a Backup has successfully scheduled
func IsRestoreComplete ¶
IsRestoreComplete returns true if a Restore has successfully completed
func IsRestoreScheduled ¶
IsRestoreScheduled returns true if a Restore has successfully scheduled
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns back a Group qualified GroupResource
func UpdateBackupCondition ¶
func UpdateBackupCondition(status *BackupStatus, condition *BackupCondition) bool
UpdateBackupCondition updates existing Backup condition or creates a new one. Sets LastTransitionTime to now if the status has changed. Returns true if Backup condition has changed or has been added.
func UpdateRestoreCondition ¶
func UpdateRestoreCondition(status *RestoreStatus, condition *RestoreCondition) bool
UpdateRestoreCondition updates existing Restore condition or creates a new one. Sets LastTransitionTime to now if the status has changed. Returns true if Restore condition has changed or has been added.
Types ¶
type Backup ¶
type Backup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec BackupSpec `json:"spec"` Status BackupStatus `json:"status"` }
Backup is a backup of tidb cluster.
func (*Backup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backup.
func (*Backup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Backup) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Backup) GetBackupJobName ¶
GetBackupJobName return the backup job name
func (*Backup) GetBackupPVCName ¶
GetBackupPVCName return the backup pvc name
func (*Backup) GetCleanJobName ¶
GetCleanJobName return the clean job name
type BackupCondition ¶
type BackupCondition struct { Type BackupConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` LastTransitionTime metav1.Time `json:"lastTransitionTime"` Reason string `json:"reason"` Message string `json:"message"` }
BackupCondition describes the observed state of a Backup at a certain point.
func GetBackupCondition ¶
func GetBackupCondition(status *BackupStatus, conditionType BackupConditionType) (int, *BackupCondition)
GetBackupCondition get the specify type's BackupCondition from the given BackupStatus
func (*BackupCondition) DeepCopy ¶
func (in *BackupCondition) DeepCopy() *BackupCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupCondition.
func (*BackupCondition) DeepCopyInto ¶
func (in *BackupCondition) DeepCopyInto(out *BackupCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupConditionType ¶
type BackupConditionType string
BackupConditionType represents a valid condition of a Backup.
const ( // BackupScheduled means the backup related job has been created BackupScheduled BackupConditionType = "Scheduled" // BackupRunning means the backup is currently being executed. BackupRunning BackupConditionType = "Running" // BackupComplete means the backup has successfully executed and the // resulting artifact has been stored in backend storage. BackupComplete BackupConditionType = "Complete" // BackupClean means the clean job has been created to clean backup data BackupClean BackupConditionType = "Clean" // BackupFailed means the backup has failed. BackupFailed BackupConditionType = "Failed" )
type BackupList ¶
type BackupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Backup `json:"items"` }
BackupList contains a list of Backup.
func (*BackupList) DeepCopy ¶
func (in *BackupList) DeepCopy() *BackupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupList.
func (*BackupList) DeepCopyInto ¶
func (in *BackupList) DeepCopyInto(out *BackupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupList) DeepCopyObject ¶
func (in *BackupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupSchedule ¶
type BackupSchedule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec BackupScheduleSpec `json:"spec"` Status BackupScheduleStatus `json:"status,omitempty"` }
BackupSchedule is a backup schedule of tidb cluster.
func (*BackupSchedule) DeepCopy ¶
func (in *BackupSchedule) DeepCopy() *BackupSchedule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSchedule.
func (*BackupSchedule) DeepCopyInto ¶
func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupSchedule) DeepCopyObject ¶
func (in *BackupSchedule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*BackupSchedule) GetBackupCRDName ¶
func (bs *BackupSchedule) GetBackupCRDName(timestamp time.Time) string
type BackupScheduleList ¶
type BackupScheduleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []BackupSchedule `json:"items"` }
BackupScheduleList contains a list of BackupSchedule.
func (*BackupScheduleList) DeepCopy ¶
func (in *BackupScheduleList) DeepCopy() *BackupScheduleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleList.
func (*BackupScheduleList) DeepCopyInto ¶
func (in *BackupScheduleList) DeepCopyInto(out *BackupScheduleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupScheduleList) DeepCopyObject ¶
func (in *BackupScheduleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupScheduleSpec ¶
type BackupScheduleSpec struct { // Schedule specifies the cron string used for backup scheduling. Schedule string `json:"schedule"` // MaxBackups is to specify how many backups we want to keep. MaxBackups int `json:"maxBackups"` // BackupTemplate is the specification of the backup structure to get scheduled. BackupTemplate BackupSpec `json:"backupTemplate"` // StorageClassName is the storage class for backup job's PV. StorageClassName string `json:"storageClassName"` // StorageSize is the request storage size for backup job StorageSize string `json:"storageSize"` }
BackupScheduleSpec contains the backup schedule specification for a tidb cluster.
func (*BackupScheduleSpec) DeepCopy ¶
func (in *BackupScheduleSpec) DeepCopy() *BackupScheduleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleSpec.
func (*BackupScheduleSpec) DeepCopyInto ¶
func (in *BackupScheduleSpec) DeepCopyInto(out *BackupScheduleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupScheduleStatus ¶
type BackupScheduleStatus struct { // LastBackup represents the last backup. LastBackup string `json:"lastBackup"` // LastBackupTime represents the last time the backup was successfully created. LastBackupTime *metav1.Time `json:"lastBackupTime"` }
BackupScheduleStatus represents the current state of a BackupSchedule.
func (*BackupScheduleStatus) DeepCopy ¶
func (in *BackupScheduleStatus) DeepCopy() *BackupScheduleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleStatus.
func (*BackupScheduleStatus) DeepCopyInto ¶
func (in *BackupScheduleStatus) DeepCopyInto(out *BackupScheduleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupSpec ¶
type BackupSpec struct { // Cluster is the Cluster to backup. Cluster string `json:"cluster"` // TidbSecretName is the name of secret which stores // tidb cluster's username and password. TidbSecretName string `json:"tidbSecretName"` // Type is the backup type for tidb cluster. Type BackupType `json:"backupType"` // StorageType is the backup storage type. StorageType BackupStorageType `json:"storageType"` // StorageProvider configures where and how backups should be stored. StorageProvider `json:",inline"` // StorageClassName is the storage class for backup job's PV. StorageClassName string `json:"storageClassName"` // StorageSize is the request storage size for backup job StorageSize string `json:"storageSize"` }
BackupSpec contains the backup specification for a tidb cluster.
func (*BackupSpec) DeepCopy ¶
func (in *BackupSpec) DeepCopy() *BackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec.
func (*BackupSpec) DeepCopyInto ¶
func (in *BackupSpec) DeepCopyInto(out *BackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStatus ¶
type BackupStatus struct { // BackupPath is the location of the backup. BackupPath string `json:"backupPath"` // TimeStarted is the time at which the backup was started. TimeStarted metav1.Time `json:"timeStarted"` // TimeCompleted is the time at which the backup was completed. TimeCompleted metav1.Time `json:"timeCompleted"` // BackupSize is the data size of the backup. BackupSize int64 `json:"backupSize"` // CommitTs is the snapshot time point of tidb cluster. CommitTs string `json:"commitTs"` Conditions []BackupCondition `json:"conditions"` }
BackupStatus represents the current status of a backup.
func (*BackupStatus) DeepCopy ¶
func (in *BackupStatus) DeepCopy() *BackupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStatus.
func (*BackupStatus) DeepCopyInto ¶
func (in *BackupStatus) DeepCopyInto(out *BackupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStorageType ¶
type BackupStorageType string
BackupStorageType represents the backend storage type of backup.
const ( // BackupStorageTypeCeph represents the backend storage type is ceph. BackupStorageTypeCeph BackupStorageType = "ceph" )
type BackupType ¶
type BackupType string
BackupType represents the backup type.
const ( // BackupTypeFull represents the full backup of tidb cluster. BackupTypeFull BackupType = "full" // BackupTypeInc represents the incremental backup of tidb cluster. BackupTypeInc BackupType = "incremental" )
type CephStorageProvider ¶
type CephStorageProvider struct { // Region in which the ceph bucket is located. Region string `json:"region"` // Bucket in which to store the Backup. Bucket string `json:"bucket"` // Endpoint is the access address of the ceph object storage. Endpoint string `json:"endpoint"` // SecretName is the name of secret which stores // ceph object store access key and secret key. SecretName string `json:"secretName"` }
cephStorageProvider represents an ceph compatible bucket for storing backups.
func (*CephStorageProvider) DeepCopy ¶
func (in *CephStorageProvider) DeepCopy() *CephStorageProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CephStorageProvider.
func (*CephStorageProvider) DeepCopyInto ¶
func (in *CephStorageProvider) DeepCopyInto(out *CephStorageProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerSpec ¶
type ContainerSpec struct { Image string `json:"image"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` Requests *ResourceRequirement `json:"requests,omitempty"` Limits *ResourceRequirement `json:"limits,omitempty"` }
ContainerSpec is the container spec of a pod
func (*ContainerSpec) DeepCopy ¶
func (in *ContainerSpec) DeepCopy() *ContainerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSpec.
func (*ContainerSpec) DeepCopyInto ¶
func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemberPhase ¶
type MemberPhase string
MemberPhase is the current state of member
const ( // NormalPhase represents normal state of TiDB cluster. NormalPhase MemberPhase = "Normal" // UpgradePhase represents the upgrade state of TiDB cluster. UpgradePhase MemberPhase = "Upgrade" )
type MemberType ¶
type MemberType string
MemberType represents member type
const ( // PDMemberType is pd container type PDMemberType MemberType = "pd" // TiDBMemberType is tidb container type TiDBMemberType MemberType = "tidb" // TiKVMemberType is tikv container type TiKVMemberType MemberType = "tikv" // SlowLogTailerMemberType is tidb log tailer container type SlowLogTailerMemberType MemberType = "slowlog" // UnknownMemberType is unknown container type UnknownMemberType MemberType = "unknown" )
func (MemberType) String ¶
func (mt MemberType) String() string
type PDFailureMember ¶ added in v0.2.0
type PDFailureMember struct { PodName string `json:"podName,omitempty"` MemberID string `json:"memberID,omitempty"` PVCUID types.UID `json:"pvcUID,omitempty"` MemberDeleted bool `json:"memberDeleted,omitempty"` CreatedAt metav1.Time `json:"createdAt,omitempty"` }
PDFailureMember is the pd failure member information
func (*PDFailureMember) DeepCopy ¶ added in v0.2.0
func (in *PDFailureMember) DeepCopy() *PDFailureMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PDFailureMember.
func (*PDFailureMember) DeepCopyInto ¶ added in v0.2.0
func (in *PDFailureMember) DeepCopyInto(out *PDFailureMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PDMember ¶
type PDMember struct { Name string `json:"name"` // member id is actually a uint64, but apimachinery's json only treats numbers as int64/float64 // so uint64 may overflow int64 and thus convert to float64 ID string `json:"id"` ClientURL string `json:"clientURL"` Health bool `json:"health"` // Last time the health transitioned from one to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
PDMember is PD member
func (*PDMember) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PDMember.
func (*PDMember) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PDSpec ¶
type PDSpec struct { ContainerSpec PodAttributesSpec Replicas int32 `json:"replicas"` StorageClassName string `json:"storageClassName,omitempty"` }
PDSpec contains details of PD member
func (*PDSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PDSpec.
func (*PDSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PDStatus ¶
type PDStatus struct { Synced bool `json:"synced,omitempty"` Phase MemberPhase `json:"phase,omitempty"` StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"` Members map[string]PDMember `json:"members,omitempty"` Leader PDMember `json:"leader,omitempty"` FailureMembers map[string]PDFailureMember `json:"failureMembers,omitempty"` }
PDStatus is PD status
func (*PDStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PDStatus.
func (*PDStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodAttributesSpec ¶ added in v1.0.4
type PodAttributesSpec struct { Affinity *corev1.Affinity `json:"affinity,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` HostNetwork bool `json:"hostNetwork,omitempty"` PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` }
PodAttributesControlSpec is a spec of some general attributes of TiKV, TiDB and PD Pods
func (*PodAttributesSpec) DeepCopy ¶ added in v1.0.4
func (in *PodAttributesSpec) DeepCopy() *PodAttributesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodAttributesSpec.
func (*PodAttributesSpec) DeepCopyInto ¶ added in v1.0.4
func (in *PodAttributesSpec) DeepCopyInto(out *PodAttributesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRequirement ¶
type ResourceRequirement struct { // CPU is how many cores a pod requires CPU string `json:"cpu,omitempty"` // Memory is how much memory a pod requires Memory string `json:"memory,omitempty"` // Storage is storage size a pod requires Storage string `json:"storage,omitempty"` }
ResourceRequirement is resource requirements for a pod
func (*ResourceRequirement) DeepCopy ¶
func (in *ResourceRequirement) DeepCopy() *ResourceRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirement.
func (*ResourceRequirement) DeepCopyInto ¶
func (in *ResourceRequirement) DeepCopyInto(out *ResourceRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Restore ¶
type Restore struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec RestoreSpec `json:"spec"` Status RestoreStatus `json:"status"` }
Restore represents the restoration of backup of a tidb cluster.
func (*Restore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restore.
func (*Restore) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Restore) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Restore) GetRestoreJobName ¶
GetRestoreJobName return the backup job name
func (*Restore) GetRestorePVCName ¶
GetRestorePVCName return the backup pvc name
type RestoreCondition ¶
type RestoreCondition struct { Type RestoreConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` LastTransitionTime metav1.Time `json:"lastTransitionTime"` Reason string `json:"reason"` Message string `json:"message"` }
RestoreCondition describes the observed state of a Restore at a certain point.
func GetRestoreCondition ¶
func GetRestoreCondition(status *RestoreStatus, conditionType RestoreConditionType) (int, *RestoreCondition)
GetRestoreCondition get the specify type's RestoreCondition from the given RestoreStatus
func (*RestoreCondition) DeepCopy ¶
func (in *RestoreCondition) DeepCopy() *RestoreCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreCondition.
func (*RestoreCondition) DeepCopyInto ¶
func (in *RestoreCondition) DeepCopyInto(out *RestoreCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreConditionType ¶
type RestoreConditionType string
RestoreConditionType represents a valid condition of a Restore.
const ( // RestoreScheduled means the restore job has been created to do tidb cluster restore RestoreScheduled RestoreConditionType = "Scheduled" // RestoreRunning means the Restore is currently being executed. RestoreRunning RestoreConditionType = "Running" // RestoreComplete means the Restore has successfully executed and the // backup data has been loaded into tidb cluster. RestoreComplete RestoreConditionType = "Complete" // RestoreFailed means the Restore has failed. RestoreFailed RestoreConditionType = "Failed" )
type RestoreList ¶
type RestoreList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Restore `json:"items"` }
RestoreList contains a list of Restore.
func (*RestoreList) DeepCopy ¶
func (in *RestoreList) DeepCopy() *RestoreList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreList.
func (*RestoreList) DeepCopyInto ¶
func (in *RestoreList) DeepCopyInto(out *RestoreList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RestoreList) DeepCopyObject ¶
func (in *RestoreList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RestoreSpec ¶
type RestoreSpec struct { // Cluster represents the tidb cluster to be restored. Cluster string `json:"cluster"` // Backup represents the backup object to be restored. Backup string `json:"backup"` // Namespace is the namespace of the backup. BackupNamespace string `json:"backupNamespace"` // SecretName is the name of the secret which stores // tidb cluster's username and password. SecretName string `json:"secretName"` // StorageClassName is the storage class for restore job's PV. StorageClassName string `json:"storageClassName"` // StorageSize is the request storage size for restore job StorageSize string `json:"storageSize"` }
RestoreSpec contains the specification for a restore of a tidb cluster backup.
func (*RestoreSpec) DeepCopy ¶
func (in *RestoreSpec) DeepCopy() *RestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreSpec.
func (*RestoreSpec) DeepCopyInto ¶
func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreStatus ¶
type RestoreStatus struct { // TimeStarted is the time at which the restore was started. TimeStarted metav1.Time `json:"timeStarted"` // TimeCompleted is the time at which the restore was completed. TimeCompleted metav1.Time `json:"timeCompleted"` Conditions []RestoreCondition `json:"conditions"` }
RestoreStatus represents the current status of a tidb cluster restore.
func (*RestoreStatus) DeepCopy ¶
func (in *RestoreStatus) DeepCopy() *RestoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreStatus.
func (*RestoreStatus) DeepCopyInto ¶
func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Service ¶
Service represent service type used in TidbCluster
func (*Service) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageProvider ¶
type StorageProvider struct {
Ceph *CephStorageProvider `json:"ceph"`
}
StorageProvider defines the configuration for storing a backup in backend storage.
func (*StorageProvider) DeepCopy ¶
func (in *StorageProvider) DeepCopy() *StorageProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageProvider.
func (*StorageProvider) DeepCopyInto ¶
func (in *StorageProvider) DeepCopyInto(out *StorageProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiDBFailureMember ¶ added in v0.2.0
type TiDBFailureMember struct { PodName string `json:"podName,omitempty"` CreatedAt metav1.Time `json:"createdAt,omitempty"` }
TiDBFailureMember is the tidb failure member information
func (*TiDBFailureMember) DeepCopy ¶ added in v0.2.0
func (in *TiDBFailureMember) DeepCopy() *TiDBFailureMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBFailureMember.
func (*TiDBFailureMember) DeepCopyInto ¶ added in v0.2.0
func (in *TiDBFailureMember) DeepCopyInto(out *TiDBFailureMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiDBMember ¶
type TiDBMember struct { Name string `json:"name"` Health bool `json:"health"` // Last time the health transitioned from one to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // Node hosting pod of this TiDB member. NodeName string `json:"node,omitempty"` }
TiDBMember is TiDB member
func (*TiDBMember) DeepCopy ¶
func (in *TiDBMember) DeepCopy() *TiDBMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBMember.
func (*TiDBMember) DeepCopyInto ¶
func (in *TiDBMember) DeepCopyInto(out *TiDBMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiDBSlowLogTailerSpec ¶ added in v1.0.0
type TiDBSlowLogTailerSpec struct {
ContainerSpec
}
TiDBSlowLogTailerSpec represents an optional log tailer sidecar with TiDB
func (*TiDBSlowLogTailerSpec) DeepCopy ¶ added in v1.0.0
func (in *TiDBSlowLogTailerSpec) DeepCopy() *TiDBSlowLogTailerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBSlowLogTailerSpec.
func (*TiDBSlowLogTailerSpec) DeepCopyInto ¶ added in v1.0.0
func (in *TiDBSlowLogTailerSpec) DeepCopyInto(out *TiDBSlowLogTailerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiDBSpec ¶
type TiDBSpec struct { ContainerSpec PodAttributesSpec Replicas int32 `json:"replicas"` StorageClassName string `json:"storageClassName,omitempty"` BinlogEnabled bool `json:"binlogEnabled,omitempty"` MaxFailoverCount int32 `json:"maxFailoverCount,omitempty"` SeparateSlowLog bool `json:"separateSlowLog,omitempty"` SlowLogTailer TiDBSlowLogTailerSpec `json:"slowLogTailer,omitempty"` }
TiDBSpec contains details of PD member
func (*TiDBSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBSpec.
func (*TiDBSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiDBStatus ¶
type TiDBStatus struct { Phase MemberPhase `json:"phase,omitempty"` StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"` Members map[string]TiDBMember `json:"members,omitempty"` FailureMembers map[string]TiDBFailureMember `json:"failureMembers,omitempty"` ResignDDLOwnerRetryCount int32 `json:"resignDDLOwnerRetryCount,omitempty"` }
TiDBStatus is TiDB status
func (*TiDBStatus) DeepCopy ¶
func (in *TiDBStatus) DeepCopy() *TiDBStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiDBStatus.
func (*TiDBStatus) DeepCopyInto ¶
func (in *TiDBStatus) DeepCopyInto(out *TiDBStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiKVFailureStore ¶ added in v0.2.0
type TiKVFailureStore struct { PodName string `json:"podName,omitempty"` StoreID string `json:"storeID,omitempty"` CreatedAt metav1.Time `json:"createdAt,omitempty"` }
TiKVFailureStore is the tikv failure store information
func (*TiKVFailureStore) DeepCopy ¶ added in v0.2.0
func (in *TiKVFailureStore) DeepCopy() *TiKVFailureStore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVFailureStore.
func (*TiKVFailureStore) DeepCopyInto ¶ added in v0.2.0
func (in *TiKVFailureStore) DeepCopyInto(out *TiKVFailureStore)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiKVPromGatewaySpec ¶
type TiKVPromGatewaySpec struct {
ContainerSpec
}
TiKVPromGatewaySpec runs as a sidecar with TiKVSpec
func (*TiKVPromGatewaySpec) DeepCopy ¶
func (in *TiKVPromGatewaySpec) DeepCopy() *TiKVPromGatewaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVPromGatewaySpec.
func (*TiKVPromGatewaySpec) DeepCopyInto ¶
func (in *TiKVPromGatewaySpec) DeepCopyInto(out *TiKVPromGatewaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiKVSpec ¶
type TiKVSpec struct { ContainerSpec PodAttributesSpec Replicas int32 `json:"replicas"` Privileged bool `json:"privileged,omitempty"` StorageClassName string `json:"storageClassName,omitempty"` }
TiKVSpec contains details of PD member
func (*TiKVSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVSpec.
func (*TiKVSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiKVStatus ¶
type TiKVStatus struct { Synced bool `json:"synced,omitempty"` Phase MemberPhase `json:"phase,omitempty"` StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"` Stores map[string]TiKVStore `json:"stores,omitempty"` TombstoneStores map[string]TiKVStore `json:"tombstoneStores,omitempty"` FailureStores map[string]TiKVFailureStore `json:"failureStores,omitempty"` }
TiKVStatus is TiKV status
func (*TiKVStatus) DeepCopy ¶
func (in *TiKVStatus) DeepCopy() *TiKVStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVStatus.
func (*TiKVStatus) DeepCopyInto ¶
func (in *TiKVStatus) DeepCopyInto(out *TiKVStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TiKVStore ¶
type TiKVStore struct { // store id is also uint64, due to the same reason as pd id, we store id as string ID string `json:"id"` PodName string `json:"podName"` IP string `json:"ip"` LeaderCount int32 `json:"leaderCount"` State string `json:"state"` LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime"` // Last time the health transitioned from one to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
TiKVStores is either Up/Down/Offline/Tombstone
func (*TiKVStore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVStore.
func (*TiKVStore) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TidbCluster ¶
type TidbCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` // Spec defines the behavior of a tidb cluster Spec TidbClusterSpec `json:"spec"` // Most recently observed status of the tidb cluster Status TidbClusterStatus `json:"status"` }
TidbCluster is the control script's spec
func (*TidbCluster) DeepCopy ¶
func (in *TidbCluster) DeepCopy() *TidbCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbCluster.
func (*TidbCluster) DeepCopyInto ¶
func (in *TidbCluster) DeepCopyInto(out *TidbCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TidbCluster) DeepCopyObject ¶
func (in *TidbCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TidbCluster) GetClusterID ¶ added in v1.0.0
func (tc *TidbCluster) GetClusterID() string
func (*TidbCluster) PDAllMembersReady ¶ added in v0.2.1
func (tc *TidbCluster) PDAllMembersReady() bool
func (*TidbCluster) PDAllPodsStarted ¶ added in v0.2.1
func (tc *TidbCluster) PDAllPodsStarted() bool
func (*TidbCluster) PDAutoFailovering ¶ added in v0.2.1
func (tc *TidbCluster) PDAutoFailovering() bool
func (*TidbCluster) PDIsAvailable ¶ added in v1.0.0
func (tc *TidbCluster) PDIsAvailable() bool
func (*TidbCluster) PDRealReplicas ¶ added in v0.2.1
func (tc *TidbCluster) PDRealReplicas() int32
func (*TidbCluster) PDUpgrading ¶
func (tc *TidbCluster) PDUpgrading() bool
func (*TidbCluster) TiDBAllMembersReady ¶ added in v0.2.1
func (tc *TidbCluster) TiDBAllMembersReady() bool
func (*TidbCluster) TiDBAllPodsStarted ¶ added in v0.2.1
func (tc *TidbCluster) TiDBAllPodsStarted() bool
func (*TidbCluster) TiDBRealReplicas ¶ added in v0.2.1
func (tc *TidbCluster) TiDBRealReplicas() int32
func (*TidbCluster) TiDBUpgrading ¶ added in v1.0.0
func (tc *TidbCluster) TiDBUpgrading() bool
func (*TidbCluster) TiKVAllPodsStarted ¶ added in v0.2.1
func (tc *TidbCluster) TiKVAllPodsStarted() bool
func (*TidbCluster) TiKVAllStoresReady ¶ added in v0.2.1
func (tc *TidbCluster) TiKVAllStoresReady() bool
func (*TidbCluster) TiKVIsAvailable ¶ added in v1.0.0
func (tc *TidbCluster) TiKVIsAvailable() bool
func (*TidbCluster) TiKVRealReplicas ¶ added in v0.2.1
func (tc *TidbCluster) TiKVRealReplicas() int32
func (*TidbCluster) TiKVUpgrading ¶
func (tc *TidbCluster) TiKVUpgrading() bool
type TidbClusterList ¶
type TidbClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []TidbCluster `json:"items"` }
TidbClusterList is TidbCluster list
func (*TidbClusterList) DeepCopy ¶
func (in *TidbClusterList) DeepCopy() *TidbClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbClusterList.
func (*TidbClusterList) DeepCopyInto ¶
func (in *TidbClusterList) DeepCopyInto(out *TidbClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TidbClusterList) DeepCopyObject ¶
func (in *TidbClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TidbClusterSpec ¶
type TidbClusterSpec struct { SchedulerName string `json:"schedulerName,omitempty"` PD PDSpec `json:"pd,omitempty"` TiDB TiDBSpec `json:"tidb,omitempty"` TiKV TiKVSpec `json:"tikv,omitempty"` TiKVPromGateway TiKVPromGatewaySpec `json:"tikvPromGateway,omitempty"` // Services list non-headless services type used in TidbCluster Services []Service `json:"services,omitempty"` PVReclaimPolicy corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy,omitempty"` Timezone string `json:"timezone,omitempty"` }
TidbClusterSpec describes the attributes that a user creates on a tidb cluster
func (*TidbClusterSpec) DeepCopy ¶
func (in *TidbClusterSpec) DeepCopy() *TidbClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbClusterSpec.
func (*TidbClusterSpec) DeepCopyInto ¶
func (in *TidbClusterSpec) DeepCopyInto(out *TidbClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TidbClusterStatus ¶
type TidbClusterStatus struct { ClusterID string `json:"clusterID,omitempty"` PD PDStatus `json:"pd,omitempty"` TiKV TiKVStatus `json:"tikv,omitempty"` TiDB TiDBStatus `json:"tidb,omitempty"` }
TidbClusterStatus represents the current status of a tidb cluster.
func (*TidbClusterStatus) DeepCopy ¶
func (in *TidbClusterStatus) DeepCopy() *TidbClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TidbClusterStatus.
func (*TidbClusterStatus) DeepCopyInto ¶
func (in *TidbClusterStatus) DeepCopyInto(out *TidbClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.