v1alpha1

package
v1.1.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 20 Imported by: 24

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=pingcap.com

Index

Constants

View Source
const (
	Version   = "v1alpha1"
	GroupName = "pingcap.com"

	TiDBClusterName    = "tidbclusters"
	TiDBClusterKind    = "TidbCluster"
	TiDBClusterKindKey = "tidbcluster"

	BackupName    = "backups"
	BackupKind    = "Backup"
	BackupKindKey = "backup"

	RestoreName    = "restores"
	RestoreKind    = "Restore"
	RestoreKindKey = "restore"

	BackupScheduleName    = "backupschedules"
	BackupScheduleKind    = "BackupSchedule"
	BackupScheduleKindKey = "backupschedule"

	TiDBMonitorName    = "tidbmonitors"
	TiDBMonitorKind    = "TidbMonitor"
	TiDBMonitorKindKey = "tidbmonitor"

	TiDBInitializerName    = "tidbinitializers"
	TiDBInitializerKind    = "TidbInitializer"
	TiDBInitializerKindKey = "tidbinitializer"

	TidbClusterAutoScalerName    = "tidbclusterautoscalers"
	TidbClusterAutoScalerKind    = "TidbClusterAutoScaler"
	TidbClusterAutoScalerKindKey = "tidbclusterautoscaler"

	SpecPath = "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1."
)
View Source
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

View Source
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
)
View Source
var DefaultCrdKinds = CrdKinds{
	KindsString:           "",
	TiDBCluster:           CrdKind{Plural: TiDBClusterName, Kind: TiDBClusterKind, ShortNames: []string{"tc"}, SpecName: SpecPath + TiDBClusterKind},
	Backup:                CrdKind{Plural: BackupName, Kind: BackupKind, ShortNames: []string{"bk"}, SpecName: SpecPath + BackupKind},
	Restore:               CrdKind{Plural: RestoreName, Kind: RestoreKind, ShortNames: []string{"rt"}, SpecName: SpecPath + RestoreKind},
	BackupSchedule:        CrdKind{Plural: BackupScheduleName, Kind: BackupScheduleKind, ShortNames: []string{"bks"}, SpecName: SpecPath + BackupScheduleKind},
	TiDBMonitor:           CrdKind{Plural: TiDBMonitorName, Kind: TiDBMonitorKind, ShortNames: []string{}, SpecName: SpecPath + TiDBMonitorKind},
	TiDBInitializer:       CrdKind{Plural: TiDBInitializerName, Kind: TiDBInitializerKind, ShortNames: []string{"ti"}, SpecName: SpecPath + TiDBInitializerKind},
	TidbClusterAutoScaler: CrdKind{Plural: TidbClusterAutoScalerName, Kind: TidbClusterAutoScalerKind, ShortNames: []string{"ta"}, SpecName: SpecPath + TidbClusterAutoScalerKind},
}
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func HashContents

func HashContents(contents []byte) string

HashContents hashes the contents using FNV hashing. The returned hash will be a safe encoded string to avoid bad words.

func IsBackupClean

func IsBackupClean(backup *Backup) bool

IsBackupClean returns true if a Backup has successfully clean

func IsBackupComplete

func IsBackupComplete(backup *Backup) bool

IsBackupComplete returns true if a Backup has successfully completed

func IsBackupFailed

func IsBackupFailed(backup *Backup) bool

IsBackupFailed returns true if a Backup has failed

func IsBackupInvalid

func IsBackupInvalid(backup *Backup) bool

IsBackupInvalid returns true if a Backup has invalid condition set

func IsBackupScheduled

func IsBackupScheduled(backup *Backup) bool

IsBackupScheduled returns true if a Backup has successfully scheduled

func IsRestoreComplete

func IsRestoreComplete(restore *Restore) bool

IsRestoreComplete returns true if a Restore has successfully completed

func IsRestoreInvalid

func IsRestoreInvalid(restore *Restore) bool

IsRestoreInvalid returns true if a Restore has invalid condition set

func IsRestoreScheduled

func IsRestoreScheduled(restore *Restore) bool

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 BRConfig

type BRConfig struct {
	// PDAddress is the PD address of the tidb cluster
	PDAddress string `json:"pd"`
	// DB is the specific DB which will be backed-up or restored
	DB string `json:"db,omitempty"`
	// Table is the specific table which will be backed-up or restored
	Table string `json:"table,omitempty"`
	// CA is the CA certificate path for TLS connection
	CA string `json:"ca,omitempty"`
	// Cert is the certificate path for TLS connection
	Cert string `json:"cert,omitempty"`
	// Key is the private key path for TLS connection
	Key string `json:"key,omitempty"`
	// LogLevel is the log level
	LogLevel string `json:"logLevel,omitempty"`
	// StatusAddr is the HTTP listening address for the status report service. Set to empty string to disable
	StatusAddr string `json:"statusAddr,omitempty"`
	// Concurrency is the size of thread pool on each node that execute the backup task
	Concurrency *uint32 `json:"concurrency,omitempty"`
	// RateLimit is the rate limit of the backup task, MB/s per node
	RateLimit *uint `json:"rateLimit,omitempty"`
	// TimeAgo is the history version of the backup task, e.g. 1m, 1h
	TimeAgo string `json:"timeAgo,omitempty"`
	// Checksum specifies whether to run checksum after backup
	Checksum *bool `json:"checksum,omitempty"`
	// SendCredToTikv specifies whether to send credentials to TiKV
	SendCredToTikv *bool `json:"sendCredToTikv,omitempty"`
	// OnLine specifies whether online during restore
	OnLine *bool `json:"onLine,omitempty"`
}

+k8s:openapi-gen=true BRConfig contains config for BR

func (*BRConfig) DeepCopy

func (in *BRConfig) DeepCopy() *BRConfig

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

func (*BRConfig) DeepCopyInto

func (in *BRConfig) DeepCopyInto(out *BRConfig)

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

type Backup

type Backup struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`

	Spec BackupSpec `json:"spec"`
	// +k8s:openapi-gen=false
	Status BackupStatus `json:"status"`
}

+k8s:openapi-gen=true Backup is a backup of tidb cluster.

func (*Backup) DeepCopy

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto

func (in *Backup) DeepCopyInto(out *Backup)

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

func (*Backup) DeepCopyObject

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

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

func (*Backup) GetBackupJobName

func (bk *Backup) GetBackupJobName() string

GetBackupJobName return the backup job name

func (*Backup) GetBackupPVCName

func (bk *Backup) GetBackupPVCName() string

GetBackupPVCName return the backup pvc name

func (*Backup) GetCleanJobName

func (bk *Backup) GetCleanJobName() string

GetCleanJobName return the clean job name

func (*Backup) GetInstanceName

func (bk *Backup) GetInstanceName() string

GetInstanceName return the backup instance name

func (*Backup) GetTidbEndpointHash

func (bk *Backup) GetTidbEndpointHash() string

GetTidbEndpointHash return the hash string base on tidb cluster's host and port

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"
	// BackupRetryFailed means this failure can be retried
	BackupRetryFailed BackupConditionType = "RetryFailed"
	// BackupInvalid means invalid backup CR
	BackupInvalid BackupConditionType = "Invalid"
)

type BackupList

type BackupList struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ListMeta `json:"metadata"`

	Items []Backup `json:"items"`
}

+k8s:openapi-gen=true 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"`
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`

	Spec BackupScheduleSpec `json:"spec"`
	// +k8s:openapi-gen=false
	Status BackupScheduleStatus `json:"status,omitempty"`
}

+k8s:openapi-gen=true 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"`
}

+k8s:openapi-gen=true 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"`
	// Pause means paused backupSchedule
	Pause bool `json:"pause,omitempty"`
	// MaxBackups is to specify how many backups we want to keep
	// 0 is magic number to indicate un-limited backups.
	MaxBackups *int32 `json:"maxBackups,omitempty"`
	// MaxReservedTime is to specify how long backups we want to keep.
	MaxReservedTime *string `json:"maxReservedTime,omitempty"`
	// BackupTemplate is the specification of the backup structure to get scheduled.
	BackupTemplate BackupSpec `json:"backupTemplate"`
	// The storageClassName of the persistent volume for Backup data storage if not storage class name set in BackupSpec.
	// Defaults to Kubernetes default storage class.
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`
	// StorageSize is the request storage size for backup job
	StorageSize string `json:"storageSize,omitempty"`
}

+k8s:openapi-gen=true 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"`
	// AllBackupCleanTime represents the time when all backup entries are cleaned up
	AllBackupCleanTime *metav1.Time `json:"allBackupCleanTime"`
}

BackupScheduleStatus represents the current state of a BackupSchedule.

func (*BackupScheduleStatus) DeepCopy

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 {
	// From is the tidb cluster that needs to backup.
	From TiDBAccessConfig `json:"from,omitempty"`
	// Type is the backup type for tidb cluster.
	Type BackupType `json:"backupType,omitempty"`
	// StorageProvider configures where and how backups should be stored.
	StorageProvider `json:",inline"`
	// 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 for backup job
	StorageSize string `json:"storageSize,omitempty"`
	// BRConfig is the configs for BR
	BR *BRConfig `json:"br,omitempty"`
	// Base tolerations of backup Pods, components may add more tolerations upon this respectively
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// Affinity of backup Pods
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
}

+k8s:openapi-gen=true 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

+k8s:openapi-gen=true BackupStorageType represents the backend storage type of backup.

const (
	// BackupStorageTypeS3 represents all storage that compatible with the Amazon S3.
	BackupStorageTypeS3 BackupStorageType = "s3"
	// BackupStorageTypeGcs represents the google cloud storage
	BackupStorageTypeGcs BackupStorageType = "gcs"
	// BackupStorageTypeUnknown represents the unknown storage type
	BackupStorageTypeUnknown BackupStorageType = "unknown"
)

type BackupType

type BackupType string

+k8s:openapi-gen=true 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"
	// BackupTypeDB represents the backup of one DB for the tidb cluster.
	BackupTypeDB BackupType = "db"
	// BackupTypeTable represents the backup of one table for the tidb cluster.
	BackupTypeTable BackupType = "table"
)

type BasicAutoScalerSpec

type BasicAutoScalerSpec struct {
	// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale out.
	// It cannot be less than minReplicas.
	MaxReplicas int32 `json:"maxReplicas"`

	// minReplicas is the lower limit for the number of replicas to which the autoscaler
	// can scale down.  It defaults to 1 pod. Scaling is active as long as at least one metric value is
	// available.
	// +optional
	MinReplicas *int32 `json:"minReplicas,omitempty"`

	// ScaleInIntervalSeconds represents the duration seconds between each auto-scaling-in
	// If not set, the default ScaleInIntervalSeconds will be set to 500
	// +optional
	ScaleInIntervalSeconds *int32 `json:"scaleInIntervalSeconds,omitempty"`

	// ScaleOutIntervalSeconds represents the duration seconds between each auto-scaling-out
	// If not set, the default ScaleOutIntervalSeconds will be set to 300
	// +optional
	ScaleOutIntervalSeconds *int32 `json:"scaleOutIntervalSeconds,omitempty"`

	// metrics contains the specifications for which to use to calculate the
	// desired replica count (the maximum replica count across all metrics will
	// be used).  The desired replica count is calculated multiplying the
	// ratio between the target value and the current value by the current
	// number of pods.  Ergo, metrics used must decrease as the pod count is
	// increased, and vice-versa.  See the individual metric source types for
	// more information about how each type of metric must respond.
	// If not set, the default metric will be set to 80% average CPU utilization.
	// +optional
	Metrics []v2beta2.MetricSpec `json:"metrics,omitempty"`

	// MetricsTimeDuration describe the Time duration to be queried in the Prometheus
	// +optional
	MetricsTimeDuration *string `json:"metricsTimeDuration,omitempty"`

	// ScaleOutThreshold describe the consecutive threshold for the auto-scaling,
	// if the consecutive counts of the scale-out result in auto-scaling reach this number,
	// the auto-scaling would be performed.
	// If not set, the default value is 3.
	// +optional
	ScaleOutThreshold *int32 `json:"scaleOutThreshold,omitempty"`

	// ScaleInThreshold describe the consecutive threshold for the auto-scaling,
	// if the consecutive counts of the scale-in result in auto-scaling reach this number,
	// the auto-scaling would be performed.
	// If not set, the default value is 5.
	// +optional
	ScaleInThreshold *int32 `json:"scaleInThreshold,omitempty"`
}

+k8s:openapi-gen=true BasicAutoScalerSpec describes the basic spec for auto-scaling

func (*BasicAutoScalerSpec) DeepCopy

func (in *BasicAutoScalerSpec) DeepCopy() *BasicAutoScalerSpec

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

func (*BasicAutoScalerSpec) DeepCopyInto

func (in *BasicAutoScalerSpec) DeepCopyInto(out *BasicAutoScalerSpec)

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

type Binlog

type Binlog struct {
	// Optional: Defaults to 15s
	// +optional
	WriteTimeout *string `toml:"write-timeout,omitempty" json:"write-timeout,omitempty"`
	// If IgnoreError is true, when writing binlog meets error, TiDB would
	// ignore the error.
	// +optional
	IgnoreError *bool `toml:"ignore-error,omitempty" json:"ignore-error,omitempty"`
	// Use socket file to write binlog, for compatible with kafka version tidb-binlog.
	// +optional
	BinlogSocket *string `toml:"binlog-socket,omitempty" json:"binlog-socket,omitempty"`
	// The strategy for sending binlog to pump, value can be "range,omitempty" or "hash,omitempty" now.
	// Optional: Defaults to range
	// +optional
	Strategy *string `toml:"strategy,omitempty" json:"strategy,omitempty"`
}

Binlog is the config for binlog. +k8s:openapi-gen=true

func (*Binlog) DeepCopy

func (in *Binlog) DeepCopy() *Binlog

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

func (*Binlog) DeepCopyInto

func (in *Binlog) DeepCopyInto(out *Binlog)

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

type ComponentAccessor

type ComponentAccessor interface {
	ImagePullPolicy() corev1.PullPolicy
	HostNetwork() bool
	Affinity() *corev1.Affinity
	PriorityClassName() *string
	NodeSelector() map[string]string
	Annotations() map[string]string
	Tolerations() []corev1.Toleration
	PodSecurityContext() *corev1.PodSecurityContext
	SchedulerName() string
	DnsPolicy() corev1.DNSPolicy
	ConfigUpdateStrategy() ConfigUpdateStrategy
	BuildPodSpec() corev1.PodSpec
}

ComponentAccessor is the interface to access component details, which respects the cluster-level properties and component-level overrides

type ComponentSpec

type ComponentSpec struct {
	// Image of the component, override baseImage and version if present
	// Deprecated
	// +k8s:openapi-gen=false
	Image string `json:"image,omitempty"`

	// Version of the component. Override the cluster-level version if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	Version *string `json:"version,omitempty"`

	// ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present
	// Optional: Defaults to cluster-level setting
	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present
	// Optional: Defaults to cluster-level setting
	// +optional
	HostNetwork *bool `json:"hostNetwork,omitempty"`

	// Affinity of the component. Override the cluster-level one if present
	// Optional: Defaults to cluster-level setting
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// PriorityClassName of the component. Override the cluster-level one if present
	// Optional: Defaults to cluster-level setting
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// SchedulerName of the component. Override the cluster-level one if present
	// Optional: Defaults to cluster-level setting
	// +optional
	SchedulerName *string `json:"schedulerName,omitempty"`

	// NodeSelector of the component. Merged into the cluster-level nodeSelector if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Annotations of the component. Merged into the cluster-level annotations if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Tolerations of the component. Override the cluster-level tolerations if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// PodSecurityContext of the component
	// +optional
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`

	// ConfigUpdateStrategy of the component. Override the cluster-level updateStrategy if present
	// Optional: Defaults to cluster-level setting
	// +optional
	ConfigUpdateStrategy *ConfigUpdateStrategy `json:"configUpdateStrategy,omitempty"`
}

+k8s:openapi-gen=true ComponentSpec is the base spec of each component, the fields should always accessed by the Basic<Component>Spec() method to respect the cluster-level properties

func (*ComponentSpec) DeepCopy

func (in *ComponentSpec) DeepCopy() *ComponentSpec

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

func (*ComponentSpec) DeepCopyInto

func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)

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

type ConfigUpdateStrategy

type ConfigUpdateStrategy string

ConfigUpdateStrategy represents the strategy to update configuration

const (
	// ConfigUpdateStrategyInPlace update the configmap without changing the name
	ConfigUpdateStrategyInPlace ConfigUpdateStrategy = "InPlace"
	// ConfigUpdateStrategyRollingUpdate generate different configmap on configuration update and
	// try to rolling-update the pod controller (e.g. statefulset) to apply updates.
	ConfigUpdateStrategyRollingUpdate ConfigUpdateStrategy = "RollingUpdate"
)

type CrdKind

type CrdKind struct {
	Kind                    string
	Plural                  string
	SpecName                string
	ShortNames              []string
	AdditionalPrinterColums []extensionsobj.CustomResourceColumnDefinition
}

func (*CrdKind) DeepCopy

func (in *CrdKind) DeepCopy() *CrdKind

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

func (*CrdKind) DeepCopyInto

func (in *CrdKind) DeepCopyInto(out *CrdKind)

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

type CrdKinds

type CrdKinds struct {
	KindsString           string
	TiDBCluster           CrdKind
	Backup                CrdKind
	Restore               CrdKind
	BackupSchedule        CrdKind
	TiDBMonitor           CrdKind
	TiDBInitializer       CrdKind
	TidbClusterAutoScaler CrdKind
}

func (*CrdKinds) DeepCopy

func (in *CrdKinds) DeepCopy() *CrdKinds

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

func (*CrdKinds) DeepCopyInto

func (in *CrdKinds) DeepCopyInto(out *CrdKinds)

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

type DataResource

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

	Data []byte `json:"data"`
}

+k8s:openapi-gen=false DataResource is a generic custom resource for storing custom data

func (*DataResource) DeepCopy

func (in *DataResource) DeepCopy() *DataResource

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

func (*DataResource) DeepCopyInto

func (in *DataResource) DeepCopyInto(out *DataResource)

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

func (*DataResource) DeepCopyObject

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

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

type DataResourceList

type DataResourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []DataResource `json:"items"`
}

+k8s:openapi-gen=false DataResourceList contains a list of DataResource

func (*DataResourceList) DeepCopy

func (in *DataResourceList) DeepCopy() *DataResourceList

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

func (*DataResourceList) DeepCopyInto

func (in *DataResourceList) DeepCopyInto(out *DataResourceList)

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

func (*DataResourceList) DeepCopyObject

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

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

type FileLogConfig

type FileLogConfig struct {
	// Log filename, leave empty to disable file log.
	Filename string `toml:"filename,omitempty" json:"filename,omitempty"`
	// Is log rotate enabled.
	LogRotate bool `toml:"log-rotate,omitempty" json:"log-rotate,omitempty"`
	// Max size for a single file, in MB.
	MaxSize int `toml:"max-size,omitempty" json:"max-size,omitempty"`
	// Max log keep days, default is never deleting.
	MaxDays int `toml:"max-days,omitempty" json:"max-days,omitempty"`
	// Maximum number of old log files to retain.
	MaxBackups int `toml:"max-backups,omitempty" json:"max-backups,omitempty"`
}

+k8s:openapi-gen=true

func (*FileLogConfig) DeepCopy

func (in *FileLogConfig) DeepCopy() *FileLogConfig

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

func (*FileLogConfig) DeepCopyInto

func (in *FileLogConfig) DeepCopyInto(out *FileLogConfig)

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

type GcsStorageProvider

type GcsStorageProvider struct {
	// ProjectId represents the project that organizes all your Google Cloud Platform resources
	ProjectId string `json:"projectId"`
	// Location in which the gcs bucket is located.
	Location string `json:"location,omitempty"`
	// Path is the full path where the backup is saved.
	// The format of the path must be: "<bucket-name>/<path-to-backup-file>"
	Path string `json:"path,omitempty"`
	// Bucket in which to store the backup data.
	Bucket string `json:"bucket,omitempty"`
	// StorageClass represents the storage class
	StorageClass string `json:"storageClass,omitempty"`
	// ObjectAcl represents the access control list for new objects
	ObjectAcl string `json:"objectAcl,omitempty"`
	// BucketAcl represents the access control list for new buckets
	BucketAcl string `json:"bucketAcl,omitempty"`
	// SecretName is the name of secret which stores the
	// gcs service account credentials JSON .
	SecretName string `json:"secretName"`
}

+k8s:openapi-gen=true GcsStorageProvider represents the google cloud storage for storing backups.

func (*GcsStorageProvider) DeepCopy

func (in *GcsStorageProvider) DeepCopy() *GcsStorageProvider

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

func (*GcsStorageProvider) DeepCopyInto

func (in *GcsStorageProvider) DeepCopyInto(out *GcsStorageProvider)

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

type GrafanaSpec

type GrafanaSpec struct {
	MonitorContainer `json:",inline"`

	LogLevel string      `json:"logLevel,omitempty"`
	Service  ServiceSpec `json:"service,omitempty"`
	Username string      `json:"username,omitempty"`
	Password string      `json:"password,omitempty"`
	// +optional
	Envs map[string]string `json:"envs,omitempty"`
}

GrafanaSpec is the desired state of grafana

func (*GrafanaSpec) DeepCopy

func (in *GrafanaSpec) DeepCopy() *GrafanaSpec

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

func (*GrafanaSpec) DeepCopyInto

func (in *GrafanaSpec) DeepCopyInto(out *GrafanaSpec)

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

type HelperSpec

type HelperSpec struct {
	// Image used to tail slow log and set kernel parameters if necessary, must have `tail` and `sysctl` installed
	// Optional: Defaults to busybox:1.26.2
	// +optional
	Image *string `json:"image,omitempty"`

	// ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present
	// Optional: Defaults to the cluster-level setting
	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
}

+k8s:openapi-gen=true HelperSpec contains details of helper component

func (*HelperSpec) DeepCopy

func (in *HelperSpec) DeepCopy() *HelperSpec

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

func (*HelperSpec) DeepCopyInto

func (in *HelperSpec) DeepCopyInto(out *HelperSpec)

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

type InitializePhase

type InitializePhase string
const (
	// InitializePhasePending indicates that the initialization is still pending waiting the cluster to appear
	InitializePhasePending InitializePhase = "Pending"
	// InitializePhaseRunning indicates the the initialization is in progress
	InitializePhaseRunning InitializePhase = "Running"
	// InitializePhaseCompleted indicates the initialization is completed,
	// that is, the target tidb-cluster is fully initialized
	InitializePhaseCompleted InitializePhase = "Completed"
	// InitializePhaseFailed indicates the initialization is failed and need manual intervention
	InitializePhaseFailed InitializePhase = "Failed"
)

type InitializerSpec

type InitializerSpec struct {
	MonitorContainer `json:",inline"`
	// +optional
	Envs map[string]string `json:"envs,omitempty"`
}

InitializerSpec is the desired state of initializer

func (*InitializerSpec) DeepCopy

func (in *InitializerSpec) DeepCopy() *InitializerSpec

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

func (*InitializerSpec) DeepCopyInto

func (in *InitializerSpec) DeepCopyInto(out *InitializerSpec)

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

type Log

type Log struct {
	// Log level.
	// Optional: Defaults to info
	// +optional
	Level *string `toml:"level,omitempty" json:"level,omitempty"`
	// Log format. one of json, text, or console.
	// Optional: Defaults to text
	// +optional
	Format *string `toml:"format,omitempty" json:"format,omitempty"`
	// Disable automatic timestamps in output.
	// +optional
	DisableTimestamp *bool `toml:"disable-timestamp,omitempty" json:"disable-timestamp,omitempty"`
	// File log config.
	// +optional
	File *FileLogConfig `toml:"file,omitempty" json:"file,omitempty"`
	// Optional: Defaults to 300
	// +optional
	SlowThreshold *uint64 `toml:"slow-threshold,omitempty" json:"slow-threshold,omitempty"`
	// Optional: Defaults to 10000
	// +optional
	ExpensiveThreshold *uint `toml:"expensive-threshold,omitempty" json:"expensive-threshold,omitempty"`
	// Optional: Defaults to 2048
	// +optional
	QueryLogMaxLen *uint64 `toml:"query-log-max-len,omitempty" json:"query-log-max-len,omitempty"`
	// Optional: Defaults to 1
	// +optional
	RecordPlanInSlowLog uint32 `toml:"record-plan-in-slow-log,omitempty" json:"record-plan-in-slow-log,omitempty"`
}

Log is the log section of config. +k8s:openapi-gen=true

func (*Log) DeepCopy

func (in *Log) DeepCopy() *Log

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

func (*Log) DeepCopyInto

func (in *Log) DeepCopyInto(out *Log)

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 MonitorComponentAccessor

type MonitorComponentAccessor interface {
	PortName() *string
	ServiceType() corev1.ServiceType
	ImagePullPolicy() *corev1.PullPolicy
}

type MonitorContainer

type MonitorContainer struct {
	Resources corev1.ResourceRequirements `json:",inline"`

	BaseImage string `json:"baseImage,omitempty"`
	Version   string `json:"version,omitempty"`
	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
}

+k8s:openapi-gen=true MonitorContainer is the common attributes of the container of monitoring

func (*MonitorContainer) DeepCopy

func (in *MonitorContainer) DeepCopy() *MonitorContainer

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

func (*MonitorContainer) DeepCopyInto

func (in *MonitorContainer) DeepCopyInto(out *MonitorContainer)

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

type OpenTracing

type OpenTracing struct {
	// Optional: Defaults to false
	// +optional
	Enable *bool `toml:"enable,omitempty" json:"enable,omitempty"`
	// +optional
	Sampler OpenTracingSampler `toml:"sampler,omitempty" json:"sampler,omitempty"`
	// +optional
	Reporter OpenTracingReporter `toml:"reporter,omitempty" json:"reporter,omitempty"`
	// +optional
	RPCMetrics *bool `toml:"rpc-metrics,omitempty" json:"rpc-metrics,omitempty"`
}

OpenTracing is the opentracing section of the config. +k8s:openapi-gen=true

func (*OpenTracing) DeepCopy

func (in *OpenTracing) DeepCopy() *OpenTracing

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

func (*OpenTracing) DeepCopyInto

func (in *OpenTracing) DeepCopyInto(out *OpenTracing)

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

type OpenTracingReporter

type OpenTracingReporter struct {
	// +optional
	QueueSize *int `toml:"queue-size,omitempty" json:"queue-size,omitempty"`
	// +optional
	BufferFlushInterval time.Duration `toml:"buffer-flush-interval,omitempty" json:"buffer-flush-interval,omitempty"`
	// +optional
	LogSpans *bool `toml:"log-spans,omitempty" json:"log-spans,omitempty"`
	// +optional
	LocalAgentHostPort *string `toml:"local-agent-host-port,omitempty" json:"local-agent-host-port,omitempty"`
}

OpenTracingReporter is the config for opentracing reporter. See https://godoc.org/github.com/uber/jaeger-client-go/config#ReporterConfig +k8s:openapi-gen=true

func (*OpenTracingReporter) DeepCopy

func (in *OpenTracingReporter) DeepCopy() *OpenTracingReporter

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

func (*OpenTracingReporter) DeepCopyInto

func (in *OpenTracingReporter) DeepCopyInto(out *OpenTracingReporter)

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

type OpenTracingSampler

type OpenTracingSampler struct {
	// +optional
	Type *string `toml:"type,omitempty" json:"type,omitempty"`
	// +optional
	Param *float64 `toml:"param,omitempty" json:"param,omitempty"`
	// +optional
	SamplingServerURL *string `toml:"sampling-server-url,omitempty" json:"sampling-server-url,omitempty"`
	// +optional
	MaxOperations *int `toml:"max-operations,omitempty" json:"max-operations,omitempty"`
	// +optional
	SamplingRefreshInterval time.Duration `toml:"sampling-refresh-interval,omitempty" json:"sampling-refresh-interval,omitempty"`
}

OpenTracingSampler is the config for opentracing sampler. See https://godoc.org/github.com/uber/jaeger-client-go/config#SamplerConfig +k8s:openapi-gen=true

func (*OpenTracingSampler) DeepCopy

func (in *OpenTracingSampler) DeepCopy() *OpenTracingSampler

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

func (*OpenTracingSampler) DeepCopyInto

func (in *OpenTracingSampler) DeepCopyInto(out *OpenTracingSampler)

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

type PDConfig

type PDConfig struct {

	// +optional
	ForceNewCluster *bool `json:"force-new-cluster,omitempty"`
	// Optional: Defaults to true
	// +optional
	EnableGRPCGateway *bool `json:"enable-grpc-gateway,omitempty"`

	// LeaderLease time, if leader doesn't update its TTL
	// in etcd after lease time, etcd will expire the leader key
	// and other servers can campaign the leader again.
	// Etcd only supports seconds TTL, so here is second too.
	// Optional: Defaults to 3
	// +optional
	LeaderLease *int64 `toml:"lease,omitempty" json:"lease,omitempty"`

	// Log related config.
	// +optional
	Log *PDLogConfig `toml:"log,omitempty" json:"log,omitempty"`

	// Backward compatibility.
	// +optional
	LogFileDeprecated string `toml:"log-file,omitempty" json:"log-file,omitempty"`
	// +optional
	LogLevelDeprecated string `toml:"log-level,omitempty" json:"log-level,omitempty"`

	// TsoSaveInterval is the interval to save timestamp.
	// Optional: Defaults to 3s
	// +optional
	TsoSaveInterval string `toml:"tso-save-interval,omitempty" json:"tso-save-interval,omitempty"`

	// +optional
	Metric *PDMetricConfig `toml:"metric,omitempty" json:"metric,omitempty"`

	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	Schedule *PDScheduleConfig `toml:"schedule,omitempty" json:"schedule,omitempty"`

	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	Replication *PDReplicationConfig `toml:"replication,omitempty" json:"replication,omitempty"`

	// +optional
	Namespace map[string]PDNamespaceConfig `toml:"namespace,omitempty" json:"namespace,omitempty"`

	// +optional
	PDServerCfg *PDServerConfig `toml:"pd-server,omitempty" json:"pd-server,omitempty"`

	// +optional
	ClusterVersion string `toml:"cluster-version,omitempty" json:"cluster-version,omitempty"`

	// QuotaBackendBytes Raise alarms when backend size exceeds the given quota. 0 means use the default quota.
	// the default size is 2GB, the maximum is 8GB.
	// +optional
	QuotaBackendBytes string `toml:"quota-backend-bytes,omitempty" json:"quota-backend-bytes,omitempty"`
	// AutoCompactionMode is either 'periodic' or 'revision'. The default value is 'periodic'.
	// +optional
	AutoCompactionMode string `toml:"auto-compaction-mode,omitempty" json:"auto-compaction-mode,omitempty"`
	// AutoCompactionRetention is either duration string with time unit
	// (e.g. '5m' for 5-minute), or revision unit (e.g. '5000').
	// If no time unit is provided and compaction mode is 'periodic',
	// the unit defaults to hour. For example, '5' translates into 5-hour.
	// The default retention is 1 hour.
	// Before etcd v3.3.x, the type of retention is int. We add 'v2' suffix to make it backward compatible.
	// +optional
	AutoCompactionRetention string `toml:"auto-compaction-retention,omitempty" json:"auto-compaction-retention-v2,omitempty"`

	// TickInterval is the interval for etcd Raft tick.
	// +optional
	TickInterval string `toml:"tick-interval,omitempty" json:"tikv-interval,omitempty"`
	// ElectionInterval is the interval for etcd Raft election.
	// +optional
	ElectionInterval string `toml:"election-interval,omitempty" json:"election-interval,omitempty"`
	// Prevote is true to enable Raft Pre-Vote.
	// If enabled, Raft runs an additional election phase
	// to check whether it would get enough votes to win
	// an election, thus minimizing disruptions.
	// Optional: Defaults to true
	// +optional
	PreVote *bool `toml:"enable-prevote,omitempty" json:"enable-prevote,omitempty"`

	// +optional
	Security *PDSecurityConfig `toml:"security,omitempty" json:"security,omitempty"`

	// +optional
	LabelProperty *PDLabelPropertyConfig `toml:"label-property,omitempty" json:"label-property,omitempty"`

	// NamespaceClassifier is for classifying stores/regions into different
	// namespaces.
	// Optional: Defaults to true
	// +optional
	NamespaceClassifier string `toml:"namespace-classifier,omitempty" json:"namespace-classifier,omitempty"`
}

PDConfig is the configuration of pd-server +k8s:openapi-gen=true

func (*PDConfig) DeepCopy

func (in *PDConfig) DeepCopy() *PDConfig

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

func (*PDConfig) DeepCopyInto

func (in *PDConfig) DeepCopyInto(out *PDConfig)

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

type PDFailureMember

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

func (in *PDFailureMember) DeepCopy() *PDFailureMember

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

func (*PDFailureMember) DeepCopyInto

func (in *PDFailureMember) DeepCopyInto(out *PDFailureMember)

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

type PDLabelPropertyConfig

type PDLabelPropertyConfig map[string]PDStoreLabels

func (PDLabelPropertyConfig) DeepCopy

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

func (PDLabelPropertyConfig) DeepCopyInto

func (in PDLabelPropertyConfig) DeepCopyInto(out *PDLabelPropertyConfig)

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

type PDLogConfig

type PDLogConfig struct {
	// Log level.
	// Optional: Defaults to info
	// +optional
	Level string `toml:"level,omitempty" json:"level,omitempty"`
	// Log format. one of json, text, or console.
	// +optional
	Format string `toml:"format,omitempty" json:"format,omitempty"`
	// Disable automatic timestamps in output.
	// +optional
	DisableTimestamp *bool `toml:"disable-timestamp,omitempty" json:"disable-timestamp,omitempty"`
	// File log config.
	// +optional
	File *FileLogConfig `toml:"file,omitempty" json:"file,omitempty"`
	// Development puts the logger in development mode, which changes the
	// behavior of DPanicLevel and takes stacktraces more liberally.
	// +optional
	Development *bool `toml:"development,omitempty" json:"development,omitempty"`
	// DisableCaller stops annotating logs with the calling function's file
	// name and line number. By default, all logs are annotated.
	// +optional
	DisableCaller *bool `toml:"disable-caller,omitempty" json:"disable-caller,omitempty"`
	// DisableStacktrace completely disables automatic stacktrace capturing. By
	// default, stacktraces are captured for WarnLevel and above logs in
	// development and ErrorLevel and above in production.
	// +optional
	DisableStacktrace *bool `toml:"disable-stacktrace,omitempty" json:"disable-stacktrace,omitempty"`
	// DisableErrorVerbose stops annotating logs with the full verbose error
	// message.
	// +optional
	DisableErrorVerbose *bool `toml:"disable-error-verbose,omitempty" json:"disable-error-verbose,omitempty"`
}

PDLogConfig serializes log related config in toml/json. +k8s:openapi-gen=true

func (*PDLogConfig) DeepCopy

func (in *PDLogConfig) DeepCopy() *PDLogConfig

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

func (*PDLogConfig) DeepCopyInto

func (in *PDLogConfig) DeepCopyInto(out *PDLogConfig)

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

func (in *PDMember) DeepCopy() *PDMember

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

func (*PDMember) DeepCopyInto

func (in *PDMember) DeepCopyInto(out *PDMember)

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

type PDMetricConfig

type PDMetricConfig struct {
	// +optional
	PushJob *string `toml:"job,omitempty" json:"job,omitempty"`
	// +optional
	PushAddress *string `toml:"address,omitempty" json:"address,omitempty"`
	// +optional
	PushInterval *string `toml:"interval,omitempty" json:"interval,omitempty"`
}

+k8s:openapi-gen=true

func (*PDMetricConfig) DeepCopy

func (in *PDMetricConfig) DeepCopy() *PDMetricConfig

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

func (*PDMetricConfig) DeepCopyInto

func (in *PDMetricConfig) DeepCopyInto(out *PDMetricConfig)

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

type PDNamespaceConfig

type PDNamespaceConfig struct {
	// LeaderScheduleLimit is the max coexist leader schedules.
	// +optional
	LeaderScheduleLimit *uint64 `json:"leader-schedule-limit,omitempty" toml:"leader-schedule-limit,omitempty"`
	// RegionScheduleLimit is the max coexist region schedules.
	// +optional
	RegionScheduleLimit *uint64 `json:"region-schedule-limit,omitempty" toml:"region-schedule-limit,omitempty"`
	// ReplicaScheduleLimit is the max coexist replica schedules.
	// +optional
	ReplicaScheduleLimit *uint64 `json:"replica-schedule-limit,omitempty" toml:"replica-schedule-limit,omitempty"`
	// MergeScheduleLimit is the max coexist merge schedules.
	// +optional
	MergeScheduleLimit *uint64 `json:"merge-schedule-limit,omitempty" toml:"merge-schedule-limit,omitempty"`
	// HotRegionScheduleLimit is the max coexist hot region schedules.
	// +optional
	HotRegionScheduleLimit *uint64 `json:"hot-region-schedule-limit,omitempty" toml:"hot-region-schedule-limit,omitempty"`
	// MaxReplicas is the number of replicas for each region.
	// +optional
	MaxReplicas *uint64 `json:"max-replicas,omitempty" toml:"max-replicas,omitempty"`
}

PDNamespaceConfig is to overwrite the global setting for specific namespace +k8s:openapi-gen=true

func (*PDNamespaceConfig) DeepCopy

func (in *PDNamespaceConfig) DeepCopy() *PDNamespaceConfig

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

func (*PDNamespaceConfig) DeepCopyInto

func (in *PDNamespaceConfig) DeepCopyInto(out *PDNamespaceConfig)

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

type PDReplicationConfig

type PDReplicationConfig struct {
	// MaxReplicas is the number of replicas for each region.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 3
	// +optional
	MaxReplicas *uint64 `toml:"max-replicas,omitempty" json:"max-replicas,omitempty"`

	// The label keys specified the location of a store.
	// The placement priorities is implied by the order of label keys.
	// For example, ["zone", "rack"] means that we should place replicas to
	// different zones first, then to different racks if we don't have enough zones.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +k8s:openapi-gen=false
	// +optional
	LocationLabels StringSlice `toml:"location-labels,omitempty" json:"location-labels,omitempty"`
	// StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	StrictlyMatchLabel *bool `toml:"strictly-match-label,omitempty" json:"strictly-match-label,string,omitempty"`
}

PDReplicationConfig is the replication configuration. +k8s:openapi-gen=true

func (*PDReplicationConfig) DeepCopy

func (in *PDReplicationConfig) DeepCopy() *PDReplicationConfig

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

func (*PDReplicationConfig) DeepCopyInto

func (in *PDReplicationConfig) DeepCopyInto(out *PDReplicationConfig)

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

type PDScheduleConfig

type PDScheduleConfig struct {
	// If the snapshot count of one store is greater than this value,
	// it will never be used as a source or target store.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 3
	// +optional
	MaxSnapshotCount *uint64 `toml:"max-snapshot-count,omitempty" json:"max-snapshot-count,omitempty"`
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 16
	// +optional
	MaxPendingPeerCount *uint64 `toml:"max-pending-peer-count,omitempty" json:"max-pending-peer-count,omitempty"`
	// If both the size of region is smaller than MaxMergeRegionSize
	// and the number of rows in region is smaller than MaxMergeRegionKeys,
	// it will try to merge with adjacent regions.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 20
	// +optional
	MaxMergeRegionSize *uint64 `toml:"max-merge-region-size,omitempty" json:"max-merge-region-size,omitempty"`
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 200000
	// +optional
	MaxMergeRegionKeys *uint64 `toml:"max-merge-region-keys,omitempty" json:"max-merge-region-keys,omitempty"`
	// SplitMergeInterval is the minimum interval time to permit merge after split.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 1h
	// +optional
	SplitMergeInterval string `toml:"split-merge-interval,omitempty" json:"split-merge-interval,omitempty"`
	// PatrolRegionInterval is the interval for scanning region during patrol.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	PatrolRegionInterval string `toml:"patrol-region-interval,omitempty" json:"patrol-region-interval,omitempty"`
	// MaxStoreDownTime is the max duration after which
	// a store will be considered to be down if it hasn't reported heartbeats.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 30m
	// +optional
	MaxStoreDownTime string `toml:"max-store-down-time,omitempty" json:"max-store-down-time,omitempty"`
	// LeaderScheduleLimit is the max coexist leader schedules.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 4
	// +optional
	LeaderScheduleLimit *uint64 `toml:"leader-schedule-limit,omitempty" json:"leader-schedule-limit,omitempty"`
	// RegionScheduleLimit is the max coexist region schedules.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 2048
	// +optional
	RegionScheduleLimit *uint64 `toml:"region-schedule-limit,omitempty" json:"region-schedule-limit,omitempty"`
	// ReplicaScheduleLimit is the max coexist replica schedules.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 64
	// +optional
	ReplicaScheduleLimit *uint64 `toml:"replica-schedule-limit,omitempty" json:"replica-schedule-limit,omitempty"`
	// MergeScheduleLimit is the max coexist merge schedules.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 8
	// +optional
	MergeScheduleLimit *uint64 `toml:"merge-schedule-limit,omitempty" json:"merge-schedule-limit,omitempty"`
	// HotRegionScheduleLimit is the max coexist hot region schedules.
	// Immutable, change should be made through pd-ctl after cluster creation
	// Optional: Defaults to 4
	// +optional
	HotRegionScheduleLimit *uint64 `toml:"hot-region-schedule-limit,omitempty" json:"hot-region-schedule-limit,omitempty"`
	// HotRegionCacheHitThreshold is the cache hits threshold of the hot region.
	// If the number of times a region hits the hot cache is greater than this
	// threshold, it is considered a hot region.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	HotRegionCacheHitsThreshold *uint64 `toml:"hot-region-cache-hits-threshold,omitempty" json:"hot-region-cache-hits-threshold,omitempty"`
	// TolerantSizeRatio is the ratio of buffer size for balance scheduler.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	TolerantSizeRatio *float64 `toml:"tolerant-size-ratio,omitempty" json:"tolerant-size-ratio,omitempty"`
	//
	//      high space stage         transition stage           low space stage
	//   |--------------------|-----------------------------|-------------------------|
	//   ^                    ^                             ^                         ^
	//   0       HighSpaceRatio * capacity       LowSpaceRatio * capacity          capacity
	//
	// LowSpaceRatio is the lowest usage ratio of store which regraded as low space.
	// When in low space, store region score increases to very large and varies inversely with available size.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	LowSpaceRatio *float64 `toml:"low-space-ratio,omitempty" json:"low-space-ratio,omitempty"`
	// HighSpaceRatio is the highest usage ratio of store which regraded as high space.
	// High space means there is a lot of spare capacity, and store region score varies directly with used size.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	HighSpaceRatio *float64 `toml:"high-space-ratio,omitempty" json:"high-space-ratio,omitempty"`
	// DisableLearner is the option to disable using AddLearnerNode instead of AddNode
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	DisableLearner *bool `toml:"disable-raft-learner,omitempty" json:"disable-raft-learner,string,omitempty"`

	// DisableRemoveDownReplica is the option to prevent replica checker from
	// removing down replicas.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	DisableRemoveDownReplica *bool `toml:"disable-remove-down-replica,omitempty" json:"disable-remove-down-replica,string,omitempty"`
	// DisableReplaceOfflineReplica is the option to prevent replica checker from
	// repalcing offline replicas.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	DisableReplaceOfflineReplica *bool `toml:"disable-replace-offline-replica,omitempty" json:"disable-replace-offline-replica,string,omitempty"`
	// DisableMakeUpReplica is the option to prevent replica checker from making up
	// replicas when replica count is less than expected.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	DisableMakeUpReplica *bool `toml:"disable-make-up-replica,omitempty" json:"disable-make-up-replica,string,omitempty"`
	// DisableRemoveExtraReplica is the option to prevent replica checker from
	// removing extra replicas.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	DisableRemoveExtraReplica *bool `toml:"disable-remove-extra-replica,omitempty" json:"disable-remove-extra-replica,string,omitempty"`
	// DisableLocationReplacement is the option to prevent replica checker from
	// moving replica to a better location.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	DisableLocationReplacement *bool `toml:"disable-location-replacement,omitempty" json:"disable-location-replacement,string,omitempty"`
	// DisableNamespaceRelocation is the option to prevent namespace checker
	// from moving replica to the target namespace.
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	DisableNamespaceRelocation *bool `toml:"disable-namespace-relocation,omitempty" json:"disable-namespace-relocation,string,omitempty"`

	// Schedulers support for loding customized schedulers
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	Schedulers *PDSchedulerConfigs `toml:"schedulers,omitempty" json:"schedulers-v2,omitempty"` // json v2 is for the sake of compatible upgrade
}

ScheduleConfig is the schedule configuration. +k8s:openapi-gen=true

func (*PDScheduleConfig) DeepCopy

func (in *PDScheduleConfig) DeepCopy() *PDScheduleConfig

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

func (*PDScheduleConfig) DeepCopyInto

func (in *PDScheduleConfig) DeepCopyInto(out *PDScheduleConfig)

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

type PDSchedulerConfig

type PDSchedulerConfig struct {
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	Type string `toml:"type,omitempty" json:"type,omitempty"`
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	Args []string `toml:"args,omitempty" json:"args,omitempty"`
	// Immutable, change should be made through pd-ctl after cluster creation
	// +optional
	Disable *bool `toml:"disable,omitempty" json:"disable,omitempty"`
}

PDSchedulerConfig is customized scheduler configuration +k8s:openapi-gen=true

func (*PDSchedulerConfig) DeepCopy

func (in *PDSchedulerConfig) DeepCopy() *PDSchedulerConfig

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

func (*PDSchedulerConfig) DeepCopyInto

func (in *PDSchedulerConfig) DeepCopyInto(out *PDSchedulerConfig)

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

type PDSchedulerConfigs

type PDSchedulerConfigs []PDSchedulerConfig

func (PDSchedulerConfigs) DeepCopy

func (in PDSchedulerConfigs) DeepCopy() PDSchedulerConfigs

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

func (PDSchedulerConfigs) DeepCopyInto

func (in PDSchedulerConfigs) DeepCopyInto(out *PDSchedulerConfigs)

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

type PDSecurityConfig

type PDSecurityConfig struct {
	// CAPath is the path of file that contains list of trusted SSL CAs. if set, following four settings shouldn't be empty
	// +optional
	CAPath string `toml:"cacert-path,omitempty" json:"cacert-path,omitempty"`
	// CertPath is the path of file that contains X509 certificate in PEM format.
	// +optional
	CertPath string `toml:"cert-path,omitempty" json:"cert-path,omitempty"`
	// KeyPath is the path of file that contains X509 key in PEM format.
	// +optional
	KeyPath string `toml:"key-path,omitempty" json:"key-path,omitempty"`
}

PDSecurityConfig is the configuration for supporting tls. +k8s:openapi-gen=true

func (*PDSecurityConfig) DeepCopy

func (in *PDSecurityConfig) DeepCopy() *PDSecurityConfig

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

func (*PDSecurityConfig) DeepCopyInto

func (in *PDSecurityConfig) DeepCopyInto(out *PDSecurityConfig)

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

type PDServerConfig

type PDServerConfig struct {
	// UseRegionStorage enables the independent region storage.
	// +optional
	UseRegionStorage *bool `toml:"use-region-storage,omitempty" json:"use-region-storage,string,omitempty"`
}

PDServerConfig is the configuration for pd server. +k8s:openapi-gen=true

func (*PDServerConfig) DeepCopy

func (in *PDServerConfig) DeepCopy() *PDServerConfig

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

func (*PDServerConfig) DeepCopyInto

func (in *PDServerConfig) DeepCopyInto(out *PDServerConfig)

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

type PDSpec

type PDSpec struct {
	ComponentSpec               `json:",inline"`
	corev1.ResourceRequirements `json:",inline"`

	// The desired ready replicas
	// +kubebuilder:validation:Minimum=1
	Replicas int32 `json:"replicas"`

	// TODO: remove optional after defaulting introduced
	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/pd
	// +optional
	BaseImage string `json:"baseImage"`

	// Service defines a Kubernetes service of PD cluster.
	// Optional: Defaults to `.spec.services` in favor of backward compatibility
	// +optional
	Service *ServiceSpec `json:"service,omitempty"`

	// The storageClassName of the persistent volume for PD data storage.
	// Defaults to Kubernetes default storage class.
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`

	// Config is the Configuration of pd-servers
	// +optional
	Config *PDConfig `json:"config,omitempty"`
}

+k8s:openapi-gen=true PDSpec contains details of PD members

func (*PDSpec) DeepCopy

func (in *PDSpec) DeepCopy() *PDSpec

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

func (*PDSpec) DeepCopyInto

func (in *PDSpec) DeepCopyInto(out *PDSpec)

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"`
	UnjoinedMembers map[string]UnjoinedMember  `json:"unjoinedMembers,omitempty"`
}

PDStatus is PD status

func (*PDStatus) DeepCopy

func (in *PDStatus) DeepCopy() *PDStatus

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

func (*PDStatus) DeepCopyInto

func (in *PDStatus) DeepCopyInto(out *PDStatus)

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

type PDStoreLabel

type PDStoreLabel struct {
	// +optional
	Key string `toml:"key,omitempty" json:"key,omitempty"`
	// +optional
	Value string `toml:"value,omitempty" json:"value,omitempty"`
}

PDStoreLabel is the config item of LabelPropertyConfig. +k8s:openapi-gen=true

func (*PDStoreLabel) DeepCopy

func (in *PDStoreLabel) DeepCopy() *PDStoreLabel

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

func (*PDStoreLabel) DeepCopyInto

func (in *PDStoreLabel) DeepCopyInto(out *PDStoreLabel)

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

type PDStoreLabels

type PDStoreLabels []PDStoreLabel

func (PDStoreLabels) DeepCopy

func (in PDStoreLabels) DeepCopy() PDStoreLabels

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

func (PDStoreLabels) DeepCopyInto

func (in PDStoreLabels) DeepCopyInto(out *PDStoreLabels)

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

type Performance

type Performance struct {
	// +optional
	MaxProcs *uint `toml:"max-procs,omitempty" json:"max-procs,omitempty"`
	// Optional: Defaults to 0
	// +optional
	MaxMemory *uint64 `toml:"max-memory,omitempty" json:"max-memory,omitempty"`
	// Optional: Defaults to true
	// +optional
	TCPKeepAlive *bool `toml:"tcp-keep-alive,omitempty" json:"tcp-keep-alive,omitempty"`
	// Optional: Defaults to true
	// +optional
	CrossJoin *bool `toml:"cross-join,omitempty" json:"cross-join,omitempty"`
	// Optional: Defaults to 3s
	// +optional
	StatsLease *string `toml:"stats-lease,omitempty" json:"stats-lease,omitempty"`
	// Optional: Defaults to true
	// +optional
	RunAutoAnalyze *bool `toml:"run-auto-analyze,omitempty" json:"run-auto-analyze,omitempty"`
	// Optional: Defaults to 5000
	// +optional
	StmtCountLimit *uint `toml:"stmt-count-limit,omitempty" json:"stmt-count-limit,omitempty"`
	// Optional: Defaults to 0.05
	// +optional
	FeedbackProbability *float64 `toml:"feedback-probability,omitempty" json:"feedback-probability,omitempty"`
	// Optional: Defaults to 1024
	// +optional
	QueryFeedbackLimit *uint `toml:"query-feedback-limit,omitempty" json:"query-feedback-limit,omitempty"`
	// Optional: Defaults to 0.8
	// +optional
	PseudoEstimateRatio *float64 `toml:"pseudo-estimate-ratio,omitempty" json:"pseudo-estimate-ratio,omitempty"`
	// Optional: Defaults to NO_PRIORITY
	// +optional
	ForcePriority *string `toml:"force-priority,omitempty" json:"force-priority,omitempty"`
	// Optional: Defaults to 3s
	// +optional
	BindInfoLease *string `toml:"bind-info-lease,omitempty" json:"bind-info-lease,omitempty"`
	// Optional: Defaults to 300000
	// +optional
	TxnEntryCountLimit *uint64 `toml:"txn-entry-count-limit,omitempty" json:"txn-entry-count-limit,omitempty"`
	// Optional: Defaults to 104857600
	// +optional
	TxnTotalSizeLimit *uint64 `toml:"txn-total-size-limit,omitempty" json:"txn-total-size-limit,omitempty"`
}

Performance is the performance section of the config. +k8s:openapi-gen=true

func (*Performance) DeepCopy

func (in *Performance) DeepCopy() *Performance

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

func (*Performance) DeepCopyInto

func (in *Performance) DeepCopyInto(out *Performance)

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

type PessimisticTxn

type PessimisticTxn struct {
	// Enable must be true for 'begin lock' or session variable to start a pessimistic transaction.
	// Optional: Defaults to true
	// +optional
	Enable *bool `toml:"enable,omitempty" json:"enable,omitempty"`
	// The max count of retry for a single statement in a pessimistic transaction.
	// Optional: Defaults to 256
	// +optional
	MaxRetryCount *uint `toml:"max-retry-count,omitempty" json:"max-retry-count,omitempty"`
}

PessimisticTxn is the config for pessimistic transaction. +k8s:openapi-gen=true

func (*PessimisticTxn) DeepCopy

func (in *PessimisticTxn) DeepCopy() *PessimisticTxn

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

func (*PessimisticTxn) DeepCopyInto

func (in *PessimisticTxn) DeepCopyInto(out *PessimisticTxn)

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

type PlanCache

type PlanCache struct {
	// +optional
	Enabled *bool `toml:"enabled,omitempty" json:"enabled,omitempty"`
	// +optional
	Capacity *uint `toml:"capacity,omitempty" json:"capacity,omitempty"`
	// +optional
	Shards *uint `toml:"shards,omitempty" json:"shards,omitempty"`
}

PlanCache is the PlanCache section of the config. +k8s:openapi-gen=true

func (*PlanCache) DeepCopy

func (in *PlanCache) DeepCopy() *PlanCache

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

func (*PlanCache) DeepCopyInto

func (in *PlanCache) DeepCopyInto(out *PlanCache)

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

type Plugin

type Plugin struct {
	// +optional
	Dir *string `toml:"dir,omitempty" json:"dir,omitempty"`
	// +optional
	Load *string `toml:"load,omitempty" json:"load,omitempty"`
}

Plugin is the config for plugin +k8s:openapi-gen=true

func (*Plugin) DeepCopy

func (in *Plugin) DeepCopy() *Plugin

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

func (*Plugin) DeepCopyInto

func (in *Plugin) DeepCopyInto(out *Plugin)

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

type PreparedPlanCache

type PreparedPlanCache struct {
	// Optional: Defaults to false
	// +optional
	Enabled *bool `toml:"enabled,omitempty" json:"enabled,omitempty"`
	// Optional: Defaults to 100
	// +optional
	Capacity *uint `toml:"capacity,omitempty" json:"capacity,omitempty"`
	// Optional: Defaults to 0.1
	// +optional
	MemoryGuardRatio *float64 `toml:"memory-guard-ratio,omitempty" json:"memory-guard-ratio,omitempty"`
}

PreparedPlanCache is the PreparedPlanCache section of the config. +k8s:openapi-gen=true

func (*PreparedPlanCache) DeepCopy

func (in *PreparedPlanCache) DeepCopy() *PreparedPlanCache

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

func (*PreparedPlanCache) DeepCopyInto

func (in *PreparedPlanCache) DeepCopyInto(out *PreparedPlanCache)

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

type PrometheusSpec

type PrometheusSpec struct {
	MonitorContainer `json:",inline"`

	LogLevel string      `json:"logLevel,omitempty"`
	Service  ServiceSpec `json:"service,omitempty"`
	// +optional
	ReserveDays int `json:"reserveDays,omitempty"`
}

PrometheusSpec is the desired state of prometheus

func (*PrometheusSpec) DeepCopy

func (in *PrometheusSpec) DeepCopy() *PrometheusSpec

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

func (*PrometheusSpec) DeepCopyInto

func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec)

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

type ProxyProtocol

type ProxyProtocol struct {
	// PROXY protocol acceptable client networks.
	// Empty *string means disable PROXY protocol,
	// * means all networks.
	// +optional
	Networks *string `toml:"networks,omitempty" json:"networks,omitempty"`
	// PROXY protocol header read timeout, Unit is second.
	// +optional
	HeaderTimeout *uint `toml:"header-timeout,omitempty" json:"header-timeout,omitempty"`
}

ProxyProtocol is the PROXY protocol section of the config. +k8s:openapi-gen=true

func (*ProxyProtocol) DeepCopy

func (in *ProxyProtocol) DeepCopy() *ProxyProtocol

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

func (*ProxyProtocol) DeepCopyInto

func (in *ProxyProtocol) DeepCopyInto(out *ProxyProtocol)

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

type PumpSpec

type PumpSpec struct {
	ComponentSpec               `json:",inline"`
	corev1.ResourceRequirements `json:",inline"`

	// The desired ready replicas
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas"`

	// TODO: remove optional after defaulting introduced
	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/tidb-binlog
	// +optional
	BaseImage string `json:"baseImage"`

	// The storageClassName of the persistent volume for Pump data storage.
	// Defaults to Kubernetes default storage class.
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`

	// TODO: add schema
	// The configuration of Pump cluster.
	// +optional
	config.GenericConfig `json:",inline"`

	// +k8s:openapi-gen=false
	// For backward compatibility with helm chart
	SetTimeZone *bool `json:"setTimeZone,omitempty"`
}

+k8s:openapi-gen=true PumpSpec contains details of Pump members

func (*PumpSpec) DeepCopy

func (in *PumpSpec) DeepCopy() *PumpSpec

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

func (*PumpSpec) DeepCopyInto

func (in *PumpSpec) DeepCopyInto(out *PumpSpec)

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

type PumpStatus

type PumpStatus struct {
	Phase       MemberPhase             `json:"phase,omitempty"`
	StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"`
}

PumpStatus is Pump status

func (*PumpStatus) DeepCopy

func (in *PumpStatus) DeepCopy() *PumpStatus

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

func (*PumpStatus) DeepCopyInto

func (in *PumpStatus) DeepCopyInto(out *PumpStatus)

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

type ReloaderSpec

type ReloaderSpec struct {
	MonitorContainer `json:",inline"`
	Service          ServiceSpec `json:"service,omitempty"`
}

ReloaderSpec is the desired state of reloader

func (*ReloaderSpec) DeepCopy

func (in *ReloaderSpec) DeepCopy() *ReloaderSpec

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

func (*ReloaderSpec) DeepCopyInto

func (in *ReloaderSpec) DeepCopyInto(out *ReloaderSpec)

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"`
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`

	Spec RestoreSpec `json:"spec"`
	// +k8s:openapi-gen=false
	Status RestoreStatus `json:"status"`
}

+k8s:openapi-gen=true Restore represents the restoration of backup of a tidb cluster.

func (*Restore) DeepCopy

func (in *Restore) DeepCopy() *Restore

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

func (*Restore) DeepCopyInto

func (in *Restore) DeepCopyInto(out *Restore)

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

func (*Restore) DeepCopyObject

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

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

func (*Restore) GetInstanceName

func (rs *Restore) GetInstanceName() string

GetInstanceName return the backup instance name

func (*Restore) GetRestoreJobName

func (rs *Restore) GetRestoreJobName() string

GetRestoreJobName return the backup job name

func (*Restore) GetRestorePVCName

func (rs *Restore) GetRestorePVCName() string

GetRestorePVCName return the backup pvc name

func (*Restore) GetTidbEndpointHash

func (rs *Restore) GetTidbEndpointHash() string

GetTidbEndpointHash return the hash string base on tidb cluster's host and port

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"
	// RestoreRetryFailed means this failure can be retried
	RestoreRetryFailed RestoreConditionType = "RetryFailed"
	// RestoreInvalid means invalid restore CR.
	RestoreInvalid RestoreConditionType = "Invalid"
)

type RestoreList

type RestoreList struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ListMeta `json:"metadata"`

	Items []Restore `json:"items"`
}

+k8s:openapi-gen=true 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 {
	// To is the tidb cluster that needs to restore.
	To TiDBAccessConfig `json:"to,omitempty"`
	// Type is the backup type for tidb cluster.
	Type BackupType `json:"backupType,omitempty"`
	// StorageProvider configures where and how backups should be stored.
	StorageProvider `json:",inline"`
	// The storageClassName of the persistent volume for Restore data storage.
	// Defaults to Kubernetes default storage class.
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`
	// StorageSize is the request storage size for backup job
	StorageSize string `json:"storageSize,omitempty"`
	// BR is the configs for BR.
	BR *BRConfig `json:"br,omitempty"`
	// Base tolerations of restore Pods, components may add more tolerations upon this respectively
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// Affinity of restore Pods
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
}

+k8s:openapi-gen=true 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 S3StorageProvider

type S3StorageProvider struct {
	// Provider represents the specific storage provider that implements the S3 interface
	Provider S3StorageProviderType `json:"provider"`
	// Region in which the S3 compatible bucket is located.
	Region string `json:"region,omitempty"`
	// Path is the full path where the backup is saved.
	// The format of the path must be: "<bucket-name>/<path-to-backup-file>"
	Path string `json:"path,omitempty"`
	// Bucket in which to store the backup data.
	Bucket string `json:"bucket,omitempty"`
	// Endpoint of S3 compatible storage service
	Endpoint string `json:"endpoint,omitempty"`
	// StorageClass represents the storage class
	StorageClass string `json:"storageClass,omitempty"`
	// Acl represents access control permissions for this bucket
	Acl string `json:"acl,omitempty"`
	// SecretName is the name of secret which stores
	// S3 compliant storage access key and secret key.
	SecretName string `json:"secretName"`
	// Prefix for the keys.
	Prefix string `json:"prefix,omitempty"`
	// SSE Sever-Side Encryption.
	SSE string `json:"sse,omitempty"`
}

+k8s:openapi-gen=true S3StorageProvider represents a S3 compliant storage for storing backups.

func (*S3StorageProvider) DeepCopy

func (in *S3StorageProvider) DeepCopy() *S3StorageProvider

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

func (*S3StorageProvider) DeepCopyInto

func (in *S3StorageProvider) DeepCopyInto(out *S3StorageProvider)

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

type S3StorageProviderType

type S3StorageProviderType string

+k8s:openapi-gen=true S3StorageProviderType represents the specific storage provider that implements the S3 interface

const (
	// S3StorageProviderTypeCeph represents the S3 compliant storage provider is ceph
	S3StorageProviderTypeCeph S3StorageProviderType = "ceph"
	// S3StorageProviderTypeAWS represents the S3 compliant storage provider is aws
	S3StorageProviderTypeAWS S3StorageProviderType = "aws"
)

type Security

type Security struct {
	// +optional
	SkipGrantTable *bool `toml:"skip-grant-table,omitempty" json:"skip-grant-table,omitempty"`
	// +optional
	SSLCA *string `toml:"ssl-ca,omitempty" json:"ssl-ca,omitempty"`
	// +optional
	SSLCert *string `toml:"ssl-cert,omitempty" json:"ssl-cert,omitempty"`
	// +optional
	SSLKey *string `toml:"ssl-key,omitempty" json:"ssl-key,omitempty"`
	// +optional
	ClusterSSLCA *string `toml:"cluster-ssl-ca,omitempty" json:"cluster-ssl-ca,omitempty"`
	// +optional
	ClusterSSLCert *string `toml:"cluster-ssl-cert,omitempty" json:"cluster-ssl-cert,omitempty"`
	// +optional
	ClusterSSLKey *string `toml:"cluster-ssl-key,omitempty" json:"cluster-ssl-key,omitempty"`
}

Security is the security section of the config. +k8s:openapi-gen=true

func (*Security) DeepCopy

func (in *Security) DeepCopy() *Security

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

func (*Security) DeepCopyInto

func (in *Security) DeepCopyInto(out *Security)

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

type Service

type Service struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

+k8s:openapi-gen=false Deprecated Service represent service type used in TidbCluster

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

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

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

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

type ServiceSpec

type ServiceSpec struct {
	// Type of the real kubernetes service
	Type corev1.ServiceType `json:"type,omitempty"`

	// Additional annotations of the kubernetes service object
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// LoadBalancerIP is the loadBalancerIP of service
	// Optional: Defaults to omitted
	// +optional
	LoadBalancerIP *string `json:"loadBalancerIP,omitempty"`

	// ClusterIP is the clusterIP of service
	// +optional
	ClusterIP *string `json:"clusterIP,omitempty"`

	// PortName is the name of service port
	// +optional
	PortName *string `json:"portName,omitempty"`
}

+k8s:openapi-gen=true

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

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

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

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

type Status

type Status struct {
	// Optional: Defaults to true
	// +optional
	ReportStatus *bool `toml:"report-status,omitempty" json:"report-status,omitempty"`
	// +optional
	MetricsAddr *string `toml:"metrics-addr,omitempty" json:"metrics-addr,omitempty"`
	// Optional: Defaults to 15
	// +optional
	MetricsInterval *uint `toml:"metrics-interval,omitempty" json:"metrics-interval,omitempty"`
	// Optional: Defaults to false
	// +optional
	RecordQPSbyDB *bool `toml:"record-db-qps,omitempty" json:"record-db-qps,omitempty"`
}

Status is the status section of the config. +k8s:openapi-gen=true

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

type StmtSummary

type StmtSummary struct {
	// The maximum number of statements kept in memory.
	// Optional: Defaults to 100
	// +optional
	MaxStmtCount *uint `toml:"max-stmt-count,omitempty" json:"max-stmt-count,omitempty"`
	// The maximum length of displayed normalized SQL and sample SQL.
	// Optional: Defaults to 4096
	// +optional
	MaxSQLLength *uint `toml:"max-sql-length,omitempty" json:"max-sql-length,omitempty"`
}

StmtSummary is the config for statement summary. +k8s:openapi-gen=true

func (*StmtSummary) DeepCopy

func (in *StmtSummary) DeepCopy() *StmtSummary

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

func (*StmtSummary) DeepCopyInto

func (in *StmtSummary) DeepCopyInto(out *StmtSummary)

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

type StorageProvider

type StorageProvider struct {
	S3  *S3StorageProvider  `json:"s3,omitempty"`
	Gcs *GcsStorageProvider `json:"gcs,omitempty"`
}

+k8s:openapi-gen=true 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 StringSlice

type StringSlice []string

StringSlice is more friendly to json encode/decode

func (StringSlice) DeepCopy

func (in StringSlice) DeepCopy() StringSlice

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

func (StringSlice) DeepCopyInto

func (in StringSlice) DeepCopyInto(out *StringSlice)

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

func (StringSlice) MarshalJSON

func (s StringSlice) MarshalJSON() ([]byte, error)

MarshalJSON returns the size as a JSON string.

func (*StringSlice) UnmarshalJSON

func (s *StringSlice) UnmarshalJSON(text []byte) error

UnmarshalJSON parses a JSON string into the bytesize.

type TiDBAccessConfig

type TiDBAccessConfig struct {
	// Host is the tidb cluster access address
	Host string `json:"host"`
	// Port is the port number to use for connecting tidb cluster
	Port int32 `json:"port,omitempty"`
	// User is the user for login tidb cluster
	User string `json:"user,omitempty"`
	// SecretName is the name of secret which stores tidb cluster's password.
	SecretName string `json:"secretName"`
}

+k8s:openapi-gen=true TiDBAccessConfig defines the configuration for access tidb cluster

func (*TiDBAccessConfig) DeepCopy

func (in *TiDBAccessConfig) DeepCopy() *TiDBAccessConfig

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

func (*TiDBAccessConfig) DeepCopyInto

func (in *TiDBAccessConfig) DeepCopyInto(out *TiDBAccessConfig)

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

func (*TiDBAccessConfig) GetTidbEndpoint

func (tac *TiDBAccessConfig) GetTidbEndpoint() string

GetTidbEndpoint return the tidb endpoint for access tidb cluster directly

func (*TiDBAccessConfig) GetTidbPort

func (tac *TiDBAccessConfig) GetTidbPort() int32

GetTidbPort return the tidb port

func (*TiDBAccessConfig) GetTidbUser

func (tac *TiDBAccessConfig) GetTidbUser() string

GetTidbUser return the tidb user

type TiDBAutoGeneratedCertificate

type TiDBAutoGeneratedCertificate struct {
	// Extra SAN IP list
	// +optional
	ExtraSANIPList []string `json:"extraSANIPList,omitempty"`

	// Extra SAN Domain list
	// +optional
	ExtraSANDomainList []string `json:"extraSANDomainList,omitempty"`
}

TiDBAutoGeneratedCertificate is TiDB auto-generated certificate

func (*TiDBAutoGeneratedCertificate) DeepCopy

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

func (*TiDBAutoGeneratedCertificate) DeepCopyInto

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

type TiDBConfig

type TiDBConfig struct {
	// +optional
	Cors *string `toml:"cors,omitempty" json:"cors,omitempty"`
	// +optional
	Socket *string `toml:"socket,omitempty" json:"socket,omitempty"`
	// Optional: Defaults to 45s
	// +optional
	Lease *string `toml:"lease,omitempty" json:"lease,omitempty"`
	// Optional: Defaults to true
	// +optional
	RunDDL *bool `toml:"run-ddl,omitempty" json:"run-ddl,omitempty"`
	// Optional: Defaults to true
	// +optional
	SplitTable *bool `toml:"split-table,omitempty" json:"split-table,omitempty"`
	// Optional: Defaults to 1000
	// +optional
	TokenLimit *uint `toml:"token-limit,omitempty" json:"token-limit,omitempty"`
	// Optional: Defaults to log
	// +optional
	OOMAction *string `toml:"oom-action,omitempty" json:"oom-action,omitempty"`
	// Optional: Defaults to 34359738368
	// +optional
	MemQuotaQuery *int64 `toml:"mem-quota-query,omitempty" json:"mem-quota-query,omitempty"`
	// Optional: Defaults to false
	// +optional
	EnableStreaming *bool `toml:"enable-streaming,omitempty" json:"enable-streaming,omitempty"`
	// Optional: Defaults to false
	// +optional
	EnableBatchDML *bool `toml:"enable-batch-dml,omitempty" json:"enable-batch-dml,omitempty"`
	// +optional
	TxnLocalLatches *TxnLocalLatches `toml:"txn-local-latches,omitempty" json:"txn-local-latches,omitempty"`
	// +optional
	LowerCaseTableNames *int `toml:"lower-case-table-names,omitempty" json:"lower-case-table-names,omitempty"`
	// +optional
	Log *Log `toml:"log,omitempty" json:"log,omitempty"`
	// +optional
	Security *Security `toml:"security,omitempty" json:"security,omitempty"`
	// +optional
	Status *Status `toml:"status,omitempty" json:"status,omitempty"`
	// +optional
	Performance *Performance `toml:"performance,omitempty" json:"performance,omitempty"`
	// +optional
	PreparedPlanCache *PreparedPlanCache `toml:"prepared-plan-cache,omitempty" json:"prepared-plan-cache,omitempty"`
	// +optional
	OpenTracing *OpenTracing `toml:"opentracing,omitempty" json:"opentracing,omitempty"`
	// +optional
	ProxyProtocol *ProxyProtocol `toml:"proxy-protocol,omitempty" json:"proxy-protocol,omitempty"`
	// +optional
	TiKVClient *TiKVClient `toml:"tikv-client,omitempty" json:"tikv-client,omitempty"`
	// +optional
	Binlog *Binlog `toml:"binlog,omitempty" json:"binlog,omitempty"`
	// +optional
	CompatibleKillQuery *bool `toml:"compatible-kill-query,omitempty" json:"compatible-kill-query,omitempty"`
	// +optional
	Plugin *Plugin `toml:"plugin,omitempty" json:"plugin,omitempty"`
	// +optional
	PessimisticTxn *PessimisticTxn `toml:"pessimistic-txn,omitempty" json:"pessimistic-txn,omitempty"`
	// Optional: Defaults to true
	// +optional
	CheckMb4ValueInUTF8 *bool `toml:"check-mb4-value-in-utf8,omitempty" json:"check-mb4-value-in-utf8,omitempty"`
	// Optional: Defaults to false
	// +optional
	AlterPrimaryKey *bool `toml:"alter-primary-key,omitempty" json:"alter-primary-key,omitempty"`
	// Optional: Defaults to true
	// +optional
	TreatOldVersionUTF8AsUTF8MB4 *bool `toml:"treat-old-version-utf8-as-utf8mb4,omitempty" json:"treat-old-version-utf8-as-utf8mb4,omitempty"`
	// Optional: Defaults to 1000
	// +optional
	SplitRegionMaxNum *uint64 `toml:"split-region-max-num,omitempty" json:"split-region-max-num,omitempty"`
	// +optional
	StmtSummary *StmtSummary `toml:"stmt-summary,omitempty" json:"stmt-summary,omitempty"`
}

TiDBConfig is the configuration of tidb-server +k8s:openapi-gen=true

func (*TiDBConfig) DeepCopy

func (in *TiDBConfig) DeepCopy() *TiDBConfig

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

func (*TiDBConfig) DeepCopyInto

func (in *TiDBConfig) DeepCopyInto(out *TiDBConfig)

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

type TiDBFailureMember

type TiDBFailureMember struct {
	PodName   string      `json:"podName,omitempty"`
	CreatedAt metav1.Time `json:"createdAt,omitempty"`
}

TiDBFailureMember is the tidb failure member information

func (*TiDBFailureMember) DeepCopy

func (in *TiDBFailureMember) DeepCopy() *TiDBFailureMember

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

func (*TiDBFailureMember) DeepCopyInto

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 TiDBServiceSpec

type TiDBServiceSpec struct {
	// +k8s:openapi-gen=false
	ServiceSpec

	// ExternalTrafficPolicy of the service
	// Optional: Defaults to omitted
	// +optional
	ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"`

	// Whether expose the status port
	// Optional: Defaults to true
	// +optional
	ExposeStatus *bool `json:"exposeStatus,omitempty"`
}

+k8s:openapi-gen=true

func (*TiDBServiceSpec) DeepCopy

func (in *TiDBServiceSpec) DeepCopy() *TiDBServiceSpec

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

func (*TiDBServiceSpec) DeepCopyInto

func (in *TiDBServiceSpec) DeepCopyInto(out *TiDBServiceSpec)

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

func (*TiDBServiceSpec) ShouldExposeStatus

func (tidbSvc *TiDBServiceSpec) ShouldExposeStatus() bool

type TiDBSlowLogTailerSpec

type TiDBSlowLogTailerSpec struct {
	corev1.ResourceRequirements `json:",inline"`

	// Image used for slowlog tailer
	// Deprecated, use TidbCluster.HelperImage instead
	// +k8s:openapi-gen=false
	Image *string `json:"image,omitempty"`

	// ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present
	// Deprecated, use TidbCluster.HelperImagePullPolicy instead
	// +k8s:openapi-gen=false
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
}

+k8s:openapi-gen=true TiDBSlowLogTailerSpec represents an optional log tailer sidecar with TiDB

func (*TiDBSlowLogTailerSpec) DeepCopy

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

func (*TiDBSlowLogTailerSpec) DeepCopyInto

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 {
	ComponentSpec               `json:",inline"`
	corev1.ResourceRequirements `json:",inline"`

	// The desired ready replicas
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas"`

	// TODO: remove optional after defaulting introduced
	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/tidb
	// +optional
	BaseImage string `json:"baseImage"`

	// Service defines a Kubernetes service of TiDB cluster.
	// Optional: No kubernetes service will be created by default.
	// +optional
	Service *TiDBServiceSpec `json:"service,omitempty"`

	// Whether enable TiDB Binlog, it is encouraged to not set this field and rely on the default behavior
	// Optional: Defaults to true if PumpSpec is non-nil, otherwise false
	// +optional
	BinlogEnabled *bool `json:"binlogEnabled,omitempty"`

	// MaxFailoverCount limit the max replicas could be added in failover, 0 means unlimited
	// Optional: Defaults to 0
	// +kubebuilder:validation:Minimum=0
	// +optional
	MaxFailoverCount *int32 `json:"maxFailoverCount,omitempty"`

	// Whether output the slow log in an separate sidecar container
	// Optional: Defaults to true
	// +optional
	SeparateSlowLog *bool `json:"separateSlowLog,omitempty"`

	// Whether enable the TLS connection between the SQL client and TiDB server
	// Optional: Defaults to nil
	// +optional
	TLSClient *TiDBTLSClient `json:"tlsClient,omitempty"`

	// The spec of the slow log tailer sidecar
	// +optional
	SlowLogTailer *TiDBSlowLogTailerSpec `json:"slowLogTailer,omitempty"`

	// Plugins is a list of plugins that are loaded by TiDB server, empty means plugin disabled
	// +optional
	Plugins []string `json:"plugins,omitempty"`

	// Config is the Configuration of tidb-servers
	// +optional
	Config *TiDBConfig `json:"config,omitempty"`
}

+k8s:openapi-gen=true TiDBSpec contains details of TiDB members

func (*TiDBSpec) DeepCopy

func (in *TiDBSpec) DeepCopy() *TiDBSpec

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

func (*TiDBSpec) DeepCopyInto

func (in *TiDBSpec) DeepCopyInto(out *TiDBSpec)

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

func (*TiDBSpec) GetSlowLogTailerSpec

func (tidb *TiDBSpec) GetSlowLogTailerSpec() TiDBSlowLogTailerSpec

func (*TiDBSpec) IsTLSClientEnabled

func (tidb *TiDBSpec) IsTLSClientEnabled() bool

func (*TiDBSpec) IsUserGeneratedCertificate

func (tidb *TiDBSpec) IsUserGeneratedCertificate() bool

func (*TiDBSpec) ShouldSeparateSlowLog

func (tidb *TiDBSpec) ShouldSeparateSlowLog() bool

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 TiDBTLSClient

type TiDBTLSClient struct {
	// When enabled, TiDB will accept TLS encrypted connections from MySQL client
	// +optional
	Enabled bool `json:"enabled,omitempty"`

	// Secret name which stores user-defined TiDB Server certificate, key and ca
	// +optional
	SecretName string `json:"secretName,omitempty"`

	// Auto-generated certificate
	// +optional
	AutoGenerated *TiDBAutoGeneratedCertificate `json:"autoGenerated,omitempty"`
}

TiDBTLSClient can enable TLS connection between TiDB server and MySQL client

func (*TiDBTLSClient) DeepCopy

func (in *TiDBTLSClient) DeepCopy() *TiDBTLSClient

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

func (*TiDBTLSClient) DeepCopyInto

func (in *TiDBTLSClient) DeepCopyInto(out *TiDBTLSClient)

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

type TiKVBlockCacheConfig

type TiKVBlockCacheConfig struct {
	// Optional: Defaults to true
	// +optional
	Shared *bool `json:"shared,omitempty" toml:"shared,omitempty"`
	// +optional
	Capacity string `json:"capacity,omitempty" toml:"capacity,omitempty"`
	// +optional
	NumShardBits *int64 `json:"num-shard-bits,omitempty" toml:"num-shard-bits,omitempty"`
	// +optional
	StrictCapacityLimit *bool `json:"strict-capacity-limit,omitempty" toml:"strict-capacity-limit,omitempty"`
	// +optional
	HighPriPoolRatio *float64 `json:"high-pri-pool-ratio,omitempty" toml:"high-pri-pool-ratio,omitempty"`
	// +optional
	MemoryAllocator string `json:"memory-allocator,omitempty" toml:"memory-allocator,omitempty"`
}

TiKVBlockCacheConfig is the config of a block cache +k8s:openapi-gen=true

func (*TiKVBlockCacheConfig) DeepCopy

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

func (*TiKVBlockCacheConfig) DeepCopyInto

func (in *TiKVBlockCacheConfig) DeepCopyInto(out *TiKVBlockCacheConfig)

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

type TiKVCfConfig

type TiKVCfConfig struct {
	// +optional
	BlockSize string `json:"block-size,omitempty" toml:"block-size,omitempty"`
	// +optional
	BlockCacheSize string `json:"block-cache-size,omitempty" toml:"block-cache-size,omitempty"`
	// +optional
	DisableBlockCache *bool `json:"disable-block-cache,omitempty" toml:"disable-block-cache,omitempty"`
	// +optional
	CacheIndexAndFilterBlocks *bool `json:"cache-index-and-filter-blocks,omitempty" toml:"cache-index-and-filter-blocks,omitempty"`
	// +optional
	PinL0FilterAndIndexBlocks *bool `json:"pin-l0-filter-and-index-blocks,omitempty" toml:"pin-l0-filter-and-index-blocks,omitempty"`
	// +optional
	UseBloomFilter *bool `json:"use-bloom-filter,omitempty" toml:"use-bloom-filter,omitempty"`
	// +optional
	OptimizeFiltersForHits *bool `json:"optimize-filters-for-hits,omitempty" toml:"optimize-filters-for-hits,omitempty"`
	// +optional
	WholeKeyFiltering *bool `json:"whole-key-filtering,omitempty" toml:"whole-key-filtering,omitempty"`
	// +optional
	BloomFilterBitsPerKey *int64 `json:"bloom-filter-bits-per-key,omitempty" toml:"bloom-filter-bits-per-key,omitempty"`
	// +optional
	BlockBasedBloomFilter *bool `json:"block-based-bloom-filter,omitempty" toml:"block-based-bloom-filter,omitempty"`
	// +optional
	ReadAmpBytesPerBit *int64 `json:"read-amp-bytes-per-bit,omitempty" toml:"read-amp-bytes-per-bit,omitempty"`
	// +optional
	CompressionPerLevel []string `json:"compression-per-level,omitempty" toml:"compression-per-level,omitempty"`
	// +optional
	WriteBufferSize string `json:"write-buffer-size,omitempty" toml:"write-buffer-size,omitempty"`
	// +optional
	MaxWriteBufferNumber *int64 `json:"max-write-buffer-number,omitempty" toml:"max-write-buffer-number,omitempty"`
	// +optional
	MinWriteBufferNumberToMerge *int64 `json:"min-write-buffer-number-to-merge,omitempty" toml:"min-write-buffer-number-to-merge,omitempty"`
	// +optional
	MaxBytesForLevelBase string `json:"max-bytes-for-level-base,omitempty" toml:"max-bytes-for-level-base,omitempty"`
	// +optional
	TargetFileSizeBase string `json:"target-file-size-base,omitempty" toml:"target-file-size-base,omitempty"`
	// +optional
	Level0FileNumCompactionTrigger *int64 `json:"level0-file-num-compaction-trigger,omitempty" toml:"level0-file-num-compaction-trigger,omitempty"`
	// +optional
	Level0SlowdownWritesTrigger *int64 `json:"level0-slowdown-writes-trigger,omitempty" toml:"level0-slowdown-writes-trigger,omitempty"`
	// +optional
	Level0StopWritesTrigger *int64 `json:"level0-stop-writes-trigger,omitempty" toml:"level0-stop-writes-trigger,omitempty"`
	// +optional
	MaxCompactionBytes string `json:"max-compaction-bytes,omitempty" toml:"max-compaction-bytes,omitempty"`
	// +optional
	CompactionPri *int64 `json:"compaction-pri,omitempty" toml:"compaction-pri,omitempty"`
	// +optional
	DynamicLevelBytes *bool `json:"dynamic-level-bytes,omitempty" toml:"dynamic-level-bytes,omitempty"`
	// +optional
	NumLevels *int64 `json:"num-levels,omitempty" toml:"num-levels,omitempty"`
	// +optional
	MaxBytesForLevelMultiplier *int64 `json:"max-bytes-for-level-multiplier,omitempty" toml:"max-bytes-for-level-multiplier,omitempty"`
	// +optional
	CompactionStyle *int64 `json:"compaction-style,omitempty" toml:"compaction-style,omitempty"`
	// +optional
	DisableAutoCompactions *bool `json:"disable-auto-compactions,omitempty" toml:"disable-auto-compactions,omitempty"`
	// +optional
	SoftPendingCompactionBytesLimit string `json:"soft-pending-compaction-bytes-limit,omitempty" toml:"soft-pending-compaction-bytes-limit,omitempty"`
	// +optional
	HardPendingCompactionBytesLimit string `json:"hard-pending-compaction-bytes-limit,omitempty" toml:"hard-pending-compaction-bytes-limit,omitempty"`
	// +optional
	ForceConsistencyChecks *bool `json:"force-consistency-checks,omitempty" toml:"force-consistency-checks,omitempty"`
	// +optional
	PropSizeIndexDistance *int64 `json:"prop-size-index-distance,omitempty" toml:"prop-size-index-distance,omitempty"`
	// +optional
	PropKeysIndexDistance *int64 `json:"prop-keys-index-distance,omitempty" toml:"prop-keys-index-distance,omitempty"`
	// +optional
	EnableDoublySkiplist *bool `json:"enable-doubly-skiplist,omitempty" toml:"enable-doubly-skiplist,omitempty"`
	// +optional
	Titan *TiKVTitanCfConfig `json:"titan,omitempty" toml:"titan,omitempty"`
}

TiKVCfConfig is the config of a cf +k8s:openapi-gen=true

func (*TiKVCfConfig) DeepCopy

func (in *TiKVCfConfig) DeepCopy() *TiKVCfConfig

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

func (*TiKVCfConfig) DeepCopyInto

func (in *TiKVCfConfig) DeepCopyInto(out *TiKVCfConfig)

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

type TiKVClient

type TiKVClient struct {
	// GrpcConnectionCount is the max gRPC connections that will be established
	// with each tikv-server.
	// Optional: Defaults to 16
	// +optional
	GrpcConnectionCount *uint `toml:"grpc-connection-count,omitempty" json:"grpc-connection-count,omitempty"`
	// After a duration of this time in seconds if the client doesn't see any activity it pings
	// the server to see if the transport is still alive.
	// Optional: Defaults to 10
	// +optional
	GrpcKeepAliveTime *uint `toml:"grpc-keepalive-time,omitempty" json:"grpc-keepalive-time,omitempty"`
	// After having pinged for keepalive check, the client waits for a duration of Timeout in seconds
	// and if no activity is seen even after that the connection is closed.
	// Optional: Defaults to 3
	// +optional
	GrpcKeepAliveTimeout *uint `toml:"grpc-keepalive-timeout,omitempty" json:"grpc-keepalive-timeout,omitempty"`
	// CommitTimeout is the max time which command 'commit' will wait.
	// Optional: Defaults to 41s
	// +optional
	CommitTimeout *string `toml:"commit-timeout,omitempty" json:"commit-timeout,omitempty"`
	// MaxTxnTimeUse is the max time a Txn may use (in seconds) from its startTS to commitTS.
	// Optional: Defaults to 590
	// +optional
	MaxTxnTimeUse *uint `toml:"max-txn-time-use,omitempty" json:"max-txn-time-use,omitempty"`
	// MaxBatchSize is the max batch size when calling batch commands API.
	// Optional: Defaults to 128
	// +optional
	MaxBatchSize *uint `toml:"max-batch-size,omitempty" json:"max-batch-size,omitempty"`
	// If TiKV load is greater than this, TiDB will wait for a while to avoid little batch.
	// Optional: Defaults to 200
	// +optional
	OverloadThreshold *uint `toml:"overload-threshold,omitempty" json:"overload-threshold,omitempty"`
	// MaxBatchWaitTime in nanosecond is the max wait time for batch.
	// Optional: Defaults to 0
	// +optional
	MaxBatchWaitTime time.Duration `toml:"max-batch-wait-time,omitempty" json:"max-batch-wait-time,omitempty"`
	// BatchWaitSize is the max wait size for batch.
	// Optional: Defaults to 8
	// +optional
	BatchWaitSize *uint `toml:"batch-wait-size,omitempty" json:"batch-wait-size,omitempty"`
	// If a Region has not been accessed for more than the given duration (in seconds), it
	// will be reloaded from the PD.
	// Optional: Defaults to 600
	// +optional
	RegionCacheTTL *uint `toml:"region-cache-ttl,omitempty" json:"region-cache-ttl,omitempty"`
	// If a store has been up to the limit, it will return error for successive request to
	// prevent the store occupying too much token in dispatching level.
	// Optional: Defaults to 0
	// +optional
	StoreLimit int64 `toml:"store-limit,omitempty" json:"store-limit,omitempty"`
}

TiKVClient is the config for tikv client. +k8s:openapi-gen=true

func (*TiKVClient) DeepCopy

func (in *TiKVClient) DeepCopy() *TiKVClient

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

func (*TiKVClient) DeepCopyInto

func (in *TiKVClient) DeepCopyInto(out *TiKVClient)

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

type TiKVConfig

type TiKVConfig struct {
	// Optional: Defaults to info
	// +optional
	LogLevel string `json:"log-level,omitempty" toml:"log-level,omitempty"`
	// +optional
	LogFile string `json:"log-file,omitempty" toml:"log-file,omitempty"`
	// Optional: Defaults to 24h
	// +optional
	LogRotationTimespan string `json:"log-rotation-timespan,omitempty" toml:"log-rotation-timespan,omitempty"`
	// +optional
	PanicWhenUnexpectedKeyOrData *bool `json:"panic-when-unexpected-key-or-data,omitempty" toml:"panic-when-unexpected-key-or-data,omitempty"`

	// +optional
	Server *TiKVServerConfig `json:"server,omitempty" toml:"server,omitempty"`
	// +optional
	Storage *TiKVStorageConfig `json:"storage,omitempty" toml:"storage,omitempty"`
	// +optional
	Raftstore *TiKVRaftstoreConfig `json:"raftstore,omitempty" toml:"raftstore,omitempty"`
	// +optional
	Rocksdb *TiKVDbConfig `json:"rocksdb,omitempty" toml:"rocksdb,omitempty"`
	// +optional
	Coprocessor *TiKVCoprocessorConfig `json:"coprocessor,omitempty" toml:"coprocessor,omitempty"`
	// +optional
	ReadPool *TiKVReadPoolConfig `json:"readpool,omitempty" toml:"readpool,omitempty"`
	// +optional
	RaftDB *TiKVRaftDBConfig `json:"raftdb,omitempty" toml:"raftdb,omitempty"`
	// +optional
	Import *TiKVImportConfig `json:"import,omitempty" toml:"import,omitempty"`
	// +optional
	GC *TiKVGCConfig `json:"gc,omitempty" toml:"gc,omitempty"`
	// +optional
	PD *TiKVPDConfig `json:"pd,omitempty" toml:"pd,omitempty"`
	// +optional
	Security *TiKVSecurityConfig `json:"security,omitempty" toml:"security,omitempty"`
}

TiKVConfig is the configuration of TiKV. +k8s:openapi-gen=true

func (*TiKVConfig) DeepCopy

func (in *TiKVConfig) DeepCopy() *TiKVConfig

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

func (*TiKVConfig) DeepCopyInto

func (in *TiKVConfig) DeepCopyInto(out *TiKVConfig)

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

type TiKVCoprocessorConfig

type TiKVCoprocessorConfig struct {
	// When it is set to `true`, TiKV will try to split a Region with table prefix if that Region
	// crosses tables.
	// It is recommended to turn off this option if there will be a large number of tables created.
	// Optional: Defaults to false
	// optional
	SplitRegionOnTable *bool `json:"split-region-on-table,omitempty" toml:"split-region-on-table,omitempty"`

	// One split check produces several split keys in batch. This config limits the number of produced
	// split keys in one batch.
	// optional
	BatchSplitLimit *int64 `json:"batch-split-limit,omitempty" toml:"batch-split-limit,omitempty"`

	// When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b),
	// [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a
	// little larger). See also: region-split-size
	// Optional: Defaults to 144MB
	// optional
	RegionMaxSize string `json:"region-max-size,omitempty" toml:"region-max-size,omitempty"`

	// When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b),
	// [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a
	// little larger). See also: region-max-size
	// Optional: Defaults to 96MB
	// optional
	RegionSplitSize string `json:"region-split-size,omitempty" toml:"region-split-size,omitempty"`

	// When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into
	// several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be
	// `region_split_keys`. See also: region-split-keys
	// Optional: Defaults to 1440000
	// optional
	RegionMaxKeys *int64 `json:"region-max-keys,omitempty" toml:"region-max-keys,omitempty"`

	// When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into
	// several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be
	// `region_split_keys`. See also: region-max-keys
	// Optional: Defaults to 960000
	// optional
	RegionSplitKeys *int64 `json:"region-split-keys,omitempty" toml:"region-split-keys,omitempty"`
}

TiKVCoprocessorConfig is the configuration of TiKV Coprocessor component. +k8s:openapi-gen=true

func (*TiKVCoprocessorConfig) DeepCopy

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

func (*TiKVCoprocessorConfig) DeepCopyInto

func (in *TiKVCoprocessorConfig) DeepCopyInto(out *TiKVCoprocessorConfig)

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

type TiKVCoprocessorReadPoolConfig

type TiKVCoprocessorReadPoolConfig struct {
	// Optional: Defaults to 8
	// +optional
	HighConcurrency *int64 `json:"high_concurrency,omitempty" toml:"high_concurrency,omitempty"`
	// Optional: Defaults to 8
	// +optional
	NormalConcurrency *int64 `json:"normal_concurrency,omitempty" toml:"normal_concurrency,omitempty"`
	// Optional: Defaults to 8
	// +optional
	LowConcurrency *int64 `json:"low_concurrency,omitempty" toml:"low_concurrency,omitempty"`
	// Optional: Defaults to 2000
	// +optional
	MaxTasksPerWorkerHigh *int64 `json:"max_tasks_per_worker_high,omitempty" toml:"max_tasks_per_worker_high,omitempty"`
	// Optional: Defaults to 2000
	// +optional
	MaxTasksPerWorkerNormal *int64 `json:"max_tasks_per_worker_normal,omitempty" toml:"max_tasks_per_worker_normal,omitempty"`
	// Optional: Defaults to 2000
	// +optional
	MaxTasksPerWorkerLow *int64 `json:"max_tasks_per_worker_low,omitempty" toml:"max_tasks_per_worker_low,omitempty"`
	// Optional: Defaults to 10MB
	// +optional
	StackSize string `json:"stack_size,omitempty" toml:"stack_size,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVCoprocessorReadPoolConfig) DeepCopy

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

func (*TiKVCoprocessorReadPoolConfig) DeepCopyInto

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

type TiKVDbConfig

type TiKVDbConfig struct {
	// +optional
	// Optional: Defaults to 2
	WalRecoveryMode *int64 `json:"wal-recovery-mode,omitempty" toml:"wal-recovery-mode,omitempty"`
	// +optional
	WalTTLSeconds *int64 `json:"wal-ttl-seconds,omitempty" toml:"wal-ttl-seconds,omitempty"`
	// +optional
	WalSizeLimit string `json:"wal-size-limit,omitempty" toml:"wal-size-limit,omitempty"`
	// +optional
	// Optional: Defaults to 4GB
	MaxTotalWalSize string `json:"max-total-wal-size,omitempty" toml:"max-total-wal-size,omitempty"`
	// +optional
	// Optional: Defaults to 8
	MaxBackgroundJobs *int64 `json:"max-background-jobs,omitempty" toml:"max-background-jobs,omitempty"`
	// +optional
	// Optional: Defaults to 128MB
	MaxManifestFileSize string `json:"max-manifest-file-size,omitempty" toml:"max-manifest-file-size,omitempty"`
	// +optional
	// Optional: Defaults to true
	CreateIfMissing *bool `json:"create-if-missing,omitempty" toml:"create-if-missing,omitempty"`
	// +optional
	// Optional: Defaults to 40960
	MaxOpenFiles *int64 `json:"max-open-files,omitempty" toml:"max-open-files,omitempty"`
	// +optional
	// Optional: Defaults to true
	EnableStatistics *bool `json:"enable-statistics,omitempty" toml:"enable-statistics,omitempty"`
	// +optional
	// Optional: Defaults to 10m
	StatsDumpPeriod string `json:"stats-dump-period,omitempty" toml:"stats-dump-period,omitempty"`
	// Optional: Defaults to 0
	// +optional
	CompactionReadaheadSize string `json:"compaction-readahead-size,omitempty" toml:"compaction-readahead-size,omitempty"`
	// +optional
	InfoLogMaxSize string `json:"info-log-max-size,omitempty" toml:"info-log-max-size,omitempty"`
	// +optional
	InfoLogRollTime string `json:"info-log-roll-time,omitempty" toml:"info-log-roll-time,omitempty"`
	// +optional
	InfoLogKeepLogFileNum *int64 `json:"info-log-keep-log-file-num,omitempty" toml:"info-log-keep-log-file-num,omitempty"`
	// +optional
	InfoLogDir string `json:"info-log-dir,omitempty" toml:"info-log-dir,omitempty"`
	// +optional
	RateBytesPerSec string `json:"rate-bytes-per-sec,omitempty" toml:"rate-bytes-per-sec,omitempty"`
	// +optional
	RateLimiterMode *int64 `json:"rate-limiter-mode,omitempty" toml:"rate-limiter-mode,omitempty"`
	// +optional
	AutoTuned *bool `json:"auto-tuned,omitempty" toml:"auto-tuned,omitempty"`
	// +optional
	BytesPerSync string `json:"bytes-per-sync,omitempty" toml:"bytes-per-sync,omitempty"`
	// +optional
	WalBytesPerSync string `json:"wal-bytes-per-sync,omitempty" toml:"wal-bytes-per-sync,omitempty"`
	// +optional
	// Optional: Defaults to 3
	MaxSubCompactions *int64 `json:"max-sub-compactions,omitempty" toml:"max-sub-compactions,omitempty"`
	// +optional
	WritableFileMaxBufferSize string `json:"writable-file-max-buffer-size,omitempty" toml:"writable-file-max-buffer-size,omitempty"`
	// +optional
	UseDirectIoForFlushAndCompaction *bool `json:"use-direct-io-for-flush-and-compaction,omitempty" toml:"use-direct-io-for-flush-and-compaction,omitempty"`
	// +optional
	EnablePipelinedWrite *bool `json:"enable-pipelined-write,omitempty" toml:"enable-pipelined-write,omitempty"`
	// +optional
	Defaultcf *TiKVCfConfig `json:"defaultcf,omitempty" toml:"defaultcf,omitempty"`
	// +optional
	Writecf *TiKVCfConfig `json:"writecf,omitempty" toml:"writecf,omitempty"`
	// +optional
	Lockcf *TiKVCfConfig `json:"lockcf,omitempty" toml:"lockcf,omitempty"`
	// +optional
	Raftcf *TiKVCfConfig `json:"raftcf,omitempty" toml:"raftcf,omitempty"`
	// +optional
	Titan *TiKVTitanDBConfig `json:"titan,omitempty" toml:"titan,omitempty"`
}

TiKVDbConfig is the rocksdb config. +k8s:openapi-gen=true

func (*TiKVDbConfig) DeepCopy

func (in *TiKVDbConfig) DeepCopy() *TiKVDbConfig

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

func (*TiKVDbConfig) DeepCopyInto

func (in *TiKVDbConfig) DeepCopyInto(out *TiKVDbConfig)

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

type TiKVFailureStore

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

func (in *TiKVFailureStore) DeepCopy() *TiKVFailureStore

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

func (*TiKVFailureStore) DeepCopyInto

func (in *TiKVFailureStore) DeepCopyInto(out *TiKVFailureStore)

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

type TiKVGCConfig

type TiKVGCConfig struct {
	// +optional
	// Optional: Defaults to 512
	BatchKeys *int64 `json:"	batch_keys,omitempty" toml:"	batch_keys,omitempty"`
	// +optional
	MaxWriteBytesPerSec string `json:"	max_write_bytes_per_sec,omitempty" toml:"	max_write_bytes_per_sec,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVGCConfig) DeepCopy

func (in *TiKVGCConfig) DeepCopy() *TiKVGCConfig

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

func (*TiKVGCConfig) DeepCopyInto

func (in *TiKVGCConfig) DeepCopyInto(out *TiKVGCConfig)

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

type TiKVImportConfig

type TiKVImportConfig struct {
	// +optional
	ImportDir string `json:"import_dir,omitempty" toml:"import_dir,omitempty"`
	// +optional
	NumThreads *int64 `json:"num_threads,omitempty" toml:"num_threads,omitempty"`
	// +optional
	NumImportJobs *int64 `json:"num_import_jobs,omitempty" toml:"num_import_jobs,omitempty"`
	// +optional
	NumImportSstJobs *int64 `json:"num_import_sst_jobs,omitempty" toml:"num_import_sst_jobs,omitempty"`
	// +optional
	MaxPrepareDuration string `json:"max_prepare_duration,omitempty" toml:"max_prepare_duration,omitempty"`
	// +optional
	RegionSplitSize string `json:"region_split_size,omitempty" toml:"region_split_size,omitempty"`
	// +optional
	StreamChannelWindow *int64 `json:"stream_channel_window,omitempty" toml:"stream_channel_window,omitempty"`
	// +optional
	MaxOpenEngines *int64 `json:"max_open_engines,omitempty" toml:"max_open_engines,omitempty"`
	// +optional
	UploadSpeedLimit string `json:"upload_speed_limit,omitempty" toml:"upload_speed_limit,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVImportConfig) DeepCopy

func (in *TiKVImportConfig) DeepCopy() *TiKVImportConfig

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

func (*TiKVImportConfig) DeepCopyInto

func (in *TiKVImportConfig) DeepCopyInto(out *TiKVImportConfig)

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

type TiKVPDConfig

type TiKVPDConfig struct {
	// The PD endpoints for the client.
	//
	// Default is empty.
	// +optional
	Endpoints []string `json:"endpoints,omitempty" toml:"endpoints,omitempty"`
	// The interval at which to retry a PD connection initialization.
	//
	// Default is 300ms.
	// Optional: Defaults to 300ms
	// +optional
	RetryInterval string `json:"retry_interval,omitempty" toml:"retry_interval,omitempty"`
	// The maximum number of times to retry a PD connection initialization.
	//
	// Default is isize::MAX, represented by -1.
	// Optional: Defaults to -1
	// +optional
	RetryMaxCount *int64 `json:"retry_max_count,omitempty" toml:"retry_max_count,omitempty"`
	// If the client observes the same error message on retry, it can repeat the message only
	// every `n` times.
	//
	// Default is 10. Set to 1 to disable this feature.
	// Optional: Defaults to 10
	// +optional
	RetryLogEvery *int64 `json:"retry_log_every,omitempty" toml:"retry_log_every,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVPDConfig) DeepCopy

func (in *TiKVPDConfig) DeepCopy() *TiKVPDConfig

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

func (*TiKVPDConfig) DeepCopyInto

func (in *TiKVPDConfig) DeepCopyInto(out *TiKVPDConfig)

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

type TiKVRaftDBConfig

type TiKVRaftDBConfig struct {
	// +optional
	WalRecoveryMode string `json:"wal_recovery_mode,omitempty" toml:"wal_recovery_mode,omitempty"`
	// +optional
	WalDir string `json:"wal_dir,omitempty" toml:"wal_dir,omitempty"`
	// +optional
	WalTtlSeconds *int64 `json:"wal_ttl_seconds,omitempty" toml:"wal_ttl_seconds,omitempty"`
	// +optional
	WalSizeLimit string `json:"wal_size_limit,omitempty" toml:"wal_size_limit,omitempty"`
	// +optional
	MaxTotalWalSize string `json:"max_total_wal_size,omitempty" toml:"max_total_wal_size,omitempty"`
	// +optional
	MaxBackgroundJobs *int64 `json:"max_background_jobs,omitempty" toml:"max_background_jobs,omitempty"`
	// +optional
	MaxManifestFileSize string `json:"max_manifest_file_size,omitempty" toml:"max_manifest_file_size,omitempty"`
	// +optional
	CreateIfMissing *bool `json:"create_if_missing,omitempty" toml:"create_if_missing,omitempty"`
	// +optional
	MaxOpenFiles *int64 `json:"max_open_files,omitempty" toml:"max_open_files,omitempty"`
	// +optional
	EnableStatistics *bool `json:"enable_statistics,omitempty" toml:"enable_statistics,omitempty"`
	// +optional
	StatsDumpPeriod string `json:"stats_dump_period,omitempty" toml:"stats_dump_period,omitempty"`
	// +optional
	CompactionReadaheadSize string `json:"compaction_readahead_size,omitempty" toml:"compaction_readahead_size,omitempty"`
	// +optional
	InfoLogMaxSize string `json:"info_log_max_size,omitempty" toml:"info_log_max_size,omitempty"`
	// +optional
	FnfoLogRollTime string `json:"info_log_roll_time,omitempty" toml:"info_log_roll_time,omitempty"`
	// +optional
	InfoLogKeepLogFileNum *int64 `json:"info_log_keep_log_file_num,omitempty" toml:"info_log_keep_log_file_num,omitempty"`
	// +optional
	InfoLogDir string `json:"info_log_dir,omitempty" toml:"info_log_dir,omitempty"`
	// +optional
	MaxSubCompactions *int64 `json:"max_sub_compactions,omitempty" toml:"max_sub_compactions,omitempty"`
	// +optional
	WritableFileMaxBufferSize string `json:"writable_file_max_buffer_size,omitempty" toml:"writable_file_max_buffer_size,omitempty"`
	// +optional
	UseDirectIoForFlushAndCompaction *bool `json:"use_direct_io_for_flush_and_compaction,omitempty" toml:"use_direct_io_for_flush_and_compaction,omitempty"`
	// +optional
	EnablePipelinedWrite *bool `json:"enable_pipelined_write,omitempty" toml:"enable_pipelined_write,omitempty"`
	// +optional
	AllowConcurrentMemtableWrite *bool `json:"allow_concurrent_memtable_write,omitempty" toml:"allow_concurrent_memtable_write,omitempty"`
	// +optional
	BytesPerSync string `json:"bytes_per_sync,omitempty" toml:"bytes_per_sync,omitempty"`
	// +optional
	WalBytesPerSync string `json:"wal_bytes_per_sync,omitempty" toml:"wal_bytes_per_sync,omitempty"`
	// +optional
	Defaultcf *TiKVCfConfig `json:"defaultcf,omitempty" toml:"defaultcf,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVRaftDBConfig) DeepCopy

func (in *TiKVRaftDBConfig) DeepCopy() *TiKVRaftDBConfig

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

func (*TiKVRaftDBConfig) DeepCopyInto

func (in *TiKVRaftDBConfig) DeepCopyInto(out *TiKVRaftDBConfig)

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

type TiKVRaftstoreConfig

type TiKVRaftstoreConfig struct {
	// true for high reliability, prevent data loss when power failure.
	// Optional: Defaults to true
	// +optional
	SyncLog *bool `json:"sync-log,omitempty" toml:"sync-log,omitempty"`

	// Optional: Defaults to true
	// +optional
	Prevote *bool `json:"prevote,omitempty" toml:"prevote,omitempty"`
	// raft-base-tick-interval is a base tick interval (ms).
	// +optional
	RaftBaseTickInterval string `json:"raft-base-tick-interval,omitempty" toml:"raft-base-tick-interval,omitempty"`
	// +optional
	RaftHeartbeatTicks *int64 `json:"raft-heartbeat-ticks,omitempty" toml:"raft-heartbeat-ticks,omitempty"`
	// +optional
	RaftElectionTimeoutTicks *int64 `json:"raft-election-timeout-ticks,omitempty" toml:"raft-election-timeout-ticks,omitempty"`
	// When the entry exceed the max size, reject to propose it.
	// Optional: Defaults to 8MB
	// +optional
	RaftEntryMaxSize string `json:"raft-entry-max-size,omitempty" toml:"raft-entry-max-size,omitempty"`

	// Interval to gc unnecessary raft log (ms).
	// Optional: Defaults to 10s
	// +optional
	RaftLogGCTickInterval string `json:"raft-log-gc-tick-interval,omitempty" toml:"raft-log-gc-tick-interval,omitempty"`
	// A threshold to gc stale raft log, must >= 1.
	// Optional: Defaults to 50
	// +optional
	RaftLogGCThreshold *int64 `json:"raft-log-gc-threshold,omitempty" toml:"raft-log-gc-threshold,omitempty"`
	// When entry count exceed this value, gc will be forced trigger.
	// Optional: Defaults to 72000
	// +optional
	RaftLogGCCountLimit *int64 `json:"raft-log-gc-count-limit,omitempty" toml:"raft-log-gc-count-limit,omitempty"`
	// When the approximate size of raft log entries exceed this value
	// gc will be forced trigger.
	// Optional: Defaults to 72MB
	// +optional
	RaftLogGCSizeLimit string `json:"raft-log-gc-size-limit,omitempty" toml:"raft-log-gc-size-limit,omitempty"`
	// When a peer is not responding for this time, leader will not keep entry cache for it.
	// +optional
	RaftEntryCacheLifeTime string `json:"raft-entry-cache-life-time,omitempty" toml:"raft-entry-cache-life-time,omitempty"`
	// When a peer is newly added, reject transferring leader to the peer for a while.
	// +optional
	RaftRejectTransferLeaderDuration string `json:"raft-reject-transfer-leader-duration,omitempty" toml:"raft-reject-transfer-leader-duration,omitempty"`

	// Interval (ms) to check region whether need to be split or not.
	// Optional: Defaults to 10s
	// +optional
	SplitRegionCheckTickInterval string `json:"split-region-check-tick-interval,omitempty" toml:"split-region-check-tick-interval,omitempty"`
	/// When size change of region exceed the diff since last check, it
	/// will be checked again whether it should be split.
	// Optional: Defaults to 6MB
	// +optional
	RegionSplitCheckDiff string `json:"region-split-check-diff,omitempty" toml:"region-split-check-diff,omitempty"`
	/// Interval (ms) to check whether start compaction for a region.
	// Optional: Defaults to 5m
	// +optional
	RegionCompactCheckInterval string `json:"region-compact-check-interval,omitempty" toml:"region-compact-check-interval,omitempty"`
	// delay time before deleting a stale peer
	// Optional: Defaults to 10m
	// +optional
	CleanStalePeerDelay string `json:"clean-stale-peer-delay,omitempty" toml:"clean-stale-peer-delay,omitempty"`
	/// Number of regions for each time checking.
	// Optional: Defaults to 100
	// +optional
	RegionCompactCheckStep *int64 `json:"region-compact-check-step,omitempty" toml:"region-compact-check-step,omitempty"`
	/// Minimum number of tombstones to trigger manual compaction.
	// Optional: Defaults to 10000
	// +optional
	RegionCompactMinTombstones *int64 `json:"region-compact-min-tombstones,omitempty" toml:"region-compact-min-tombstones,omitempty"`
	/// Minimum percentage of tombstones to trigger manual compaction.
	/// Should between 1 and 100.
	// Optional: Defaults to 30
	// +optional
	RegionCompactTombstonesPercent *int64 `json:"region-compact-tombstones-percent,omitempty" toml:"region-compact-tombstones-percent,omitempty"`
	// Optional: Defaults to 60s
	// +optional
	PdHeartbeatTickInterval string `json:"pd-heartbeat-tick-interval,omitempty" toml:"pd-heartbeat-tick-interval,omitempty"`
	// Optional: Defaults to 10s
	// +optional
	PdStoreHeartbeatTickInterval string `json:"pd-store-heartbeat-tick-interval,omitempty" toml:"pd-store-heartbeat-tick-interval,omitempty"`
	// +optional
	SnapMgrGCTickInterval string `json:"snap-mgr-gc-tick-interval,omitempty" toml:"snap-mgr-gc-tick-interval,omitempty"`
	// +optional
	SnapGCTimeout string `json:"snap-gc-timeout,omitempty" toml:"snap-gc-timeout,omitempty"`
	// +optional
	// Optional: Defaults to 10m
	LockCfCompactInterval string `json:"lock-cf-compact-interval,omitempty" toml:"lock-cf-compact-interval,omitempty"`
	// +optional
	// Optional: Defaults to 256MB
	LockCfCompactBytesThreshold string `json:"lock-cf-compact-bytes-threshold,omitempty" toml:"lock-cf-compact-bytes-threshold,omitempty"`

	// +optional
	NotifyCapacity *int64 `json:"notify-capacity,omitempty" toml:"notify-capacity,omitempty"`
	// +optional
	MessagesPerTick *int64 `json:"messages-per-tick,omitempty" toml:"messages-per-tick,omitempty"`

	/// When a peer is not active for max-peer-down-duration
	/// the peer is considered to be down and is reported to PD.
	// Optional: Defaults to 5m
	// +optional
	MaxPeerDownDuration string `json:"max-peer-down-duration,omitempty" toml:"max-peer-down-duration,omitempty"`

	/// If the leader of a peer is missing for longer than max-leader-missing-duration
	/// the peer would ask pd to confirm whether it is valid in any region.
	/// If the peer is stale and is not valid in any region, it will destroy itself.
	// +optional
	MaxLeaderMissingDuration string `json:"max-leader-missing-duration,omitempty" toml:"max-leader-missing-duration,omitempty"`
	/// Similar to the max-leader-missing-duration, instead it will log warnings and
	/// try to alert monitoring systems, if there is any.
	// +optional
	AbnormalLeaderMissingDuration string `json:"abnormal-leader-missing-duration,omitempty" toml:"abnormal-leader-missing-duration,omitempty"`
	// +optional
	PeerStaleStateCheckInterval string `json:"peer-stale-state-check-interval,omitempty" toml:"peer-stale-state-check-interval,omitempty"`

	// +optional
	LeaderTransferMaxLogLag *int64 `json:"leader-transfer-max-log-lag,omitempty" toml:"leader-transfer-max-log-lag,omitempty"`

	// +optional
	SnapApplyBatchSize string `json:"snap-apply-batch-size,omitempty" toml:"snap-apply-batch-size,omitempty"`

	// Interval (ms) to check region whether the data is consistent.
	// Optional: Defaults to 0
	// +optional
	ConsistencyCheckInterval string `json:"consistency-check-interval,omitempty" toml:"consistency-check-interval,omitempty"`

	// +optional
	ReportRegionFlowInterval string `json:"report-region-flow-interval,omitempty" toml:"report-region-flow-interval,omitempty"`

	// The lease provided by a successfully proposed and applied entry.
	// +optional
	RaftStoreMaxLeaderLease string `json:"raft-store-max-leader-lease,omitempty" toml:"raft-store-max-leader-lease,omitempty"`

	// Right region derive origin region id when split.
	// +optional
	RightDeriveWhenSplit *bool `json:"right-derive-when-split,omitempty" toml:"right-derive-when-split,omitempty"`

	// +optional
	AllowRemoveLeader *bool `json:"allow-remove-leader,omitempty" toml:"allow-remove-leader,omitempty"`

	/// Max log gap allowed to propose merge.
	// +optional
	MergeMaxLogGap *int64 `json:"merge-max-log-gap,omitempty" toml:"merge-max-log-gap,omitempty"`
	/// Interval to re-propose merge.
	// +optional
	MergeCheckTickInterval string `json:"merge-check-tick-interval,omitempty" toml:"merge-check-tick-interval,omitempty"`

	// +optional
	UseDeleteRange *bool `json:"use-delete-range,omitempty" toml:"use-delete-range,omitempty"`

	// +optional
	// Optional: Defaults to 10m
	CleanupImportSstInterval string `json:"cleanup-import-sst-interval,omitempty" toml:"cleanup-import-sst-interval,omitempty"`

	// +optional
	ApplyMaxBatchSize *int64 `json:"apply-max-batch-size,omitempty" toml:"apply-max-batch-size,omitempty"`
	// Optional: Defaults to 2
	// +optional
	ApplyPoolSize *int64 `json:"apply-pool-size,omitempty" toml:"apply-pool-size,omitempty"`

	// +optional
	StoreMaxBatchSize *int64 `json:"store-max-batch-size,omitempty" toml:"store-max-batch-size,omitempty"`
	// Optional: Defaults to 2
	// +optional
	StorePoolSize *int64 `json:"store-pool-size,omitempty" toml:"store-pool-size,omitempty"`
	// +optional
	HibernateRegions *bool `json:"hibernate-regions,omitempty" toml:"hibernate-regions,omitempty"`
}

TiKVRaftstoreConfig is the configuration of TiKV raftstore component. +k8s:openapi-gen=true

func (*TiKVRaftstoreConfig) DeepCopy

func (in *TiKVRaftstoreConfig) DeepCopy() *TiKVRaftstoreConfig

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

func (*TiKVRaftstoreConfig) DeepCopyInto

func (in *TiKVRaftstoreConfig) DeepCopyInto(out *TiKVRaftstoreConfig)

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

type TiKVReadPoolConfig

type TiKVReadPoolConfig struct {
	// +optional
	Coprocessor *TiKVCoprocessorReadPoolConfig `json:"coprocessor,omitempty" toml:"coprocessor,omitempty"`
	// +optional
	Storage *TiKVStorageReadPoolConfig `json:"storage,omitempty" toml:"storage,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVReadPoolConfig) DeepCopy

func (in *TiKVReadPoolConfig) DeepCopy() *TiKVReadPoolConfig

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

func (*TiKVReadPoolConfig) DeepCopyInto

func (in *TiKVReadPoolConfig) DeepCopyInto(out *TiKVReadPoolConfig)

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

type TiKVSecurityConfig

type TiKVSecurityConfig struct {
	// +optional
	CAPath string `json:"ca-path,omitempty" toml:"ca-path,omitempty"`
	// +optional
	CertPath string `json:"cert-path,omitempty" toml:"cert-path,omitempty"`
	// +optional
	KeyPath string `json:"key-path,omitempty" toml:"key-path,omitempty"`
	// +optional
	OverrideSslTarget string `json:"override_ssl_target,omitempty" toml:"override_ssl_target,omitempty"`
	// +optional
	CipherFile string `json:"cipher_file,omitempty" toml:"cipher_file,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVSecurityConfig) DeepCopy

func (in *TiKVSecurityConfig) DeepCopy() *TiKVSecurityConfig

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

func (*TiKVSecurityConfig) DeepCopyInto

func (in *TiKVSecurityConfig) DeepCopyInto(out *TiKVSecurityConfig)

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

type TiKVServerConfig

type TiKVServerConfig struct {
	// Optional: Defaults to 1
	// +optional
	StatusThreadPoolSize string `json:"status-thread-pool-size,omitempty" toml:"status-thread-pool-size,omitempty"`
	// Optional: Defaults to none
	// +optional
	GrpcCompressionType string `json:"grpc-compression-type,omitempty" toml:"grpc-compression-type,omitempty"`
	// Optional: Defaults to 4
	// +optional
	GrpcConcurrency *uint `json:"grpc-concurrency,omitempty" toml:"grpc-concurrency,omitempty"`
	// Optional: Defaults to 1024
	// +optional
	GrpcConcurrentStream *uint `json:"grpc-concurrent-stream,omitempty" toml:"grpc-concurrent-stream,omitempty"`
	// Optional: Defaults to 32G
	// +optional
	GrpcMemoryQuota *string `json:"grpc_memory_pool_quota,omitempty" toml:"grpc_memory_pool_quota,omitempty"`
	// Optional: Defaults to 10
	// +optional
	GrpcRaftConnNum *uint `json:"grpc-raft-conn-num,omitempty" toml:"grpc-raft-conn-num,omitempty"`
	// Optional: Defaults to 2MB
	// +optional
	GrpcStreamInitialWindowSize string `json:"grpc-stream-initial-window-size,omitempty" toml:"grpc-stream-initial-window-size,omitempty"`
	// Optional: Defaults to 10s
	// +optional
	GrpcKeepaliveTime string `json:"grpc-keepalive-time,omitempty" toml:"grpc-keepalive-time,omitempty"`
	// Optional: Defaults to 3s
	// +optional
	GrpcKeepaliveTimeout string `json:"grpc-keepalive-timeout,omitempty" toml:"grpc-keepalive-timeout,omitempty"`
	// Optional: Defaults to 32
	// +optional
	ConcurrentSendSnapLimit *uint `json:"concurrent-send-snap-limit,omitempty" toml:"concurrent-send-snap-limit,omitempty"`
	// Optional: Defaults to 32
	// +optional
	ConcurrentRecvSnapLimit *uint `json:"concurrent-recv-snap-limit,omitempty" toml:"concurrent-recv-snap-limit,omitempty"`
	// Optional: Defaults to 1000
	// +optional
	EndPointRecursionLimit *uint `json:"end-point-recursion-limit,omitempty" toml:"end-point-recursion-limit,omitempty"`
	// +optional
	EndPointStreamChannelSize *uint `json:"end-point-stream-channel-size,omitempty" toml:"end-point-stream-channel-size,omitempty"`
	// +optional
	EndPointBatchRowLimit *uint `json:"end-point-batch-row-limit,omitempty" toml:"end-point-batch-row-limit,omitempty"`
	// +optional
	EndPointStreamBatchRowLimit *uint `json:"end-point-stream-batch-row-limit,omitempty" toml:"end-point-stream-batch-row-limit,omitempty"`
	// +optional
	EndPointEnableBatchIfPossible *uint `json:"end-point-enable-batch-if-possible,omitempty" toml:"end-point-enable-batch-if-possible,omitempty"`
	// +optional
	EndPointRequestMaxHandleDuration string `json:"end-point-request-max-handle-duration,omitempty" toml:"end-point-request-max-handle-duration,omitempty"`
	// Optional: Defaults to 100MB
	// +optional
	SnapMaxWriteBytesPerSec string `json:"snap-max-write-bytes-per-sec,omitempty" toml:"snap-max-write-bytes-per-sec,omitempty"`
	// +optional
	SnapMaxTotalSize string `json:"snap-max-total-size,omitempty" toml:"snap-max-total-size,omitempty"`
	// +optional
	StatsConcurrency *uint `json:"stats-concurrency,omitempty" toml:"stats-concurrency,omitempty"`
	// +optional
	HeavyLoadThreshold *uint `json:"heavy-load-threshold,omitempty" toml:"heavy-load-threshold,omitempty"`
	// Optional: Defaults to 60s
	// +optional
	HeavyLoadWaitDuration string `json:"heavy-load-wait-duration,omitempty" toml:"heavy-load-wait-duration,omitempty"`
	// +optional
	Labels map[string]string `json:"labels,omitempty" toml:"labels,omitempty"`
}

TiKVServerConfig is the configuration of TiKV server. +k8s:openapi-gen=true

func (*TiKVServerConfig) DeepCopy

func (in *TiKVServerConfig) DeepCopy() *TiKVServerConfig

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

func (*TiKVServerConfig) DeepCopyInto

func (in *TiKVServerConfig) DeepCopyInto(out *TiKVServerConfig)

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

type TiKVSpec

type TiKVSpec struct {
	ComponentSpec               `json:",inline"`
	corev1.ResourceRequirements `json:",inline"`

	// The desired ready replicas
	// +kubebuilder:validation:Minimum=1
	Replicas int32 `json:"replicas"`

	// TODO: remove optional after defaulting introduced
	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/tikv
	// +optional
	BaseImage string `json:"baseImage"`

	// Whether create the TiKV container in privileged mode, it is highly discouraged to enable this in
	// critical environment.
	// Optional: defaults to false
	// +optional
	Privileged *bool `json:"privileged,omitempty"`

	// MaxFailoverCount limit the max replicas could be added in failover, 0 means unlimited
	// Optional: Defaults to 0
	// +kubebuilder:validation:Minimum=0
	// +optional
	MaxFailoverCount *int32 `json:"maxFailoverCount,omitempty"`

	// The storageClassName of the persistent volume for TiKV data storage.
	// Defaults to Kubernetes default storage class.
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`

	// Config is the Configuration of tikv-servers
	// +optional
	Config *TiKVConfig `json:"config,omitempty"`
}

+k8s:openapi-gen=true TiKVSpec contains details of TiKV members

func (*TiKVSpec) DeepCopy

func (in *TiKVSpec) DeepCopy() *TiKVSpec

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

func (*TiKVSpec) DeepCopyInto

func (in *TiKVSpec) DeepCopyInto(out *TiKVSpec)

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 TiKVStorageConfig

type TiKVStorageConfig struct {
	// +optional
	MaxKeySize *int64 `json:"max-key-size,omitempty" toml:"max-key-size,omitempty"`
	// +optional
	SchedulerNotifyCapacity *int64 `json:"scheduler-notify-capacity,omitempty" toml:"scheduler-notify-capacity,omitempty"`
	// +optional
	// Optional: Defaults to 2048000
	SchedulerConcurrency *int64 `json:"scheduler-concurrency,omitempty" toml:"scheduler-concurrency,omitempty"`
	// +optional
	// Optional: Defaults to 4
	SchedulerWorkerPoolSize *int64 `json:"scheduler-worker-pool-size,omitempty" toml:"scheduler-worker-pool-size,omitempty"`
	// +optional
	// Optional: Defaults to 100MB
	SchedulerPendingWriteThreshold string `json:"scheduler-pending-write-threshold,omitempty" toml:"scheduler-pending-write-threshold,omitempty"`
	// +optional
	BlockCache *TiKVBlockCacheConfig `json:"block-cache,omitempty" toml:"block-cache,omitempty"`
}

TiKVStorageConfig is the config of storage +k8s:openapi-gen=true

func (*TiKVStorageConfig) DeepCopy

func (in *TiKVStorageConfig) DeepCopy() *TiKVStorageConfig

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

func (*TiKVStorageConfig) DeepCopyInto

func (in *TiKVStorageConfig) DeepCopyInto(out *TiKVStorageConfig)

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

type TiKVStorageReadPoolConfig

type TiKVStorageReadPoolConfig struct {
	// Optional: Defaults to 4
	// +optional
	HighConcurrency *int64 `json:"high_concurrency,omitempty" toml:"high_concurrency,omitempty"`
	// Optional: Defaults to 4
	// +optional
	NormalConcurrency *int64 `json:"normal_concurrency,omitempty" toml:"normal_concurrency,omitempty"`
	// Optional: Defaults to 4
	// +optional
	LowConcurrency *int64 `json:"low_concurrency,omitempty" toml:"low_concurrency,omitempty"`
	// Optional: Defaults to 2000
	// +optional
	MaxTasksPerWorkerHigh *int64 `json:"max_tasks_per_worker_high,omitempty" toml:"max_tasks_per_worker_high,omitempty"`
	// Optional: Defaults to 2000
	// +optional
	MaxTasksPerWorkerNormal *int64 `json:"max_tasks_per_worker_normal,omitempty" toml:"max_tasks_per_worker_normal,omitempty"`
	// Optional: Defaults to 2000
	// +optional
	MaxTasksPerWorkerLow *int64 `json:"max_tasks_per_worker_low,omitempty" toml:"max_tasks_per_worker_low,omitempty"`
	// Optional: Defaults to 10MB
	// +optional
	StackSize string `json:"stack_size,omitempty" toml:"stack_size,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVStorageReadPoolConfig) DeepCopy

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

func (*TiKVStorageReadPoolConfig) DeepCopyInto

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

func (in *TiKVStore) DeepCopy() *TiKVStore

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

func (*TiKVStore) DeepCopyInto

func (in *TiKVStore) DeepCopyInto(out *TiKVStore)

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

type TiKVTitanCfConfig

type TiKVTitanCfConfig struct {
	// +optional
	MinBlobSize string `json:"min-blob-size,omitempty" toml:"min-blob-size,omitempty"`
	// +optional
	BlobFileCompression string `json:"blob-file-compression,omitempty" toml:"blob-file-compression,omitempty"`
	// +optional
	BlobCacheSize string `json:"blob-cache-size,omitempty" toml:"blob-cache-size,omitempty"`
	// +optional
	MinGcBatchSize string `json:"min-gc-batch-size,omitempty" toml:"min-gc-batch-size,omitempty"`
	// +optional
	MaxGcBatchSize string `json:"max-gc-batch-size,omitempty" toml:"max-gc-batch-size,omitempty"`
	// +optional
	DiscardableRatio *float64 `json:"discardable-ratio,omitempty" toml:"discardable-ratio,omitempty"`
	// +optional
	SampleRatio *float64 `json:"sample-ratio,omitempty" toml:"sample-ratio,omitempty"`
	// +optional
	MergeSmallFileThreshold string `json:"merge-small-file-threshold,omitempty" toml:"merge-small-file-threshold,omitempty"`
	// +optional
	BlobRunMode string `json:"blob-run-mode,omitempty" toml:"blob-run-mode,omitempty"`
}

TiKVTitanCfConfig is the titian config. +k8s:openapi-gen=true

func (*TiKVTitanCfConfig) DeepCopy

func (in *TiKVTitanCfConfig) DeepCopy() *TiKVTitanCfConfig

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

func (*TiKVTitanCfConfig) DeepCopyInto

func (in *TiKVTitanCfConfig) DeepCopyInto(out *TiKVTitanCfConfig)

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

type TiKVTitanDBConfig

type TiKVTitanDBConfig struct {
	// +optional
	Enabled *bool `json:"enabled,omitempty" toml:"enabled,omitempty"`
	// +optional
	Dirname string `json:"dirname,omitempty" toml:"dirname,omitempty"`
	// +optional
	DisableGc *bool `json:"disable-gc,omitempty" toml:"disable-gc,omitempty"`
	// +optional
	MaxBackgroundGc *int64 `json:"max-background-gc,omitempty" toml:"max-background-gc,omitempty"`
	// The value of this field will be truncated to seconds.
	// +optional
	PurgeObsoleteFilesPeriod string `json:"purge-obsolete-files-period,omitempty" toml:"purge-obsolete-files-period,omitempty"`
}

TiKVTitanDBConfig is the config a titian db. +k8s:openapi-gen=true

func (*TiKVTitanDBConfig) DeepCopy

func (in *TiKVTitanDBConfig) DeepCopy() *TiKVTitanDBConfig

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

func (*TiKVTitanDBConfig) DeepCopyInto

func (in *TiKVTitanDBConfig) DeepCopyInto(out *TiKVTitanDBConfig)

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

type TidbAutoScalerSpec

type TidbAutoScalerSpec struct {
	BasicAutoScalerSpec `json:",inline"`
}

+k8s:openapi-gen=true TidbAutoScalerSpec describes the spec for tidb auto-scaling

func (*TidbAutoScalerSpec) DeepCopy

func (in *TidbAutoScalerSpec) DeepCopy() *TidbAutoScalerSpec

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

func (*TidbAutoScalerSpec) DeepCopyInto

func (in *TidbAutoScalerSpec) DeepCopyInto(out *TidbAutoScalerSpec)

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"`
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`

	// Spec defines the behavior of a tidb cluster
	Spec TidbClusterSpec `json:"spec"`

	// +k8s:openapi-gen=false
	// Most recently observed status of the tidb cluster
	Status TidbClusterStatus `json:"status"`
}

+k8s:openapi-gen=true TidbCluster is the control script's spec

func (*TidbCluster) BasePDSpec

func (tc *TidbCluster) BasePDSpec() ComponentAccessor

BasePDSpec returns the base spec of PD servers

func (*TidbCluster) BasePumpSpec

func (tc *TidbCluster) BasePumpSpec() (ComponentAccessor, bool)

BasePumpSpec returns two results: 1. the base pump spec, if exists. 2. whether the base pump spec exists.

func (*TidbCluster) BaseTiDBSpec

func (tc *TidbCluster) BaseTiDBSpec() ComponentAccessor

BaseTiDBSpec returns the base spec of TiDB servers

func (*TidbCluster) BaseTiKVSpec

func (tc *TidbCluster) BaseTiKVSpec() ComponentAccessor

BaseTiKVSpec returns the base spec of TiKV servers

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

func (tc *TidbCluster) GetClusterID() string

func (*TidbCluster) GetHelperSpec

func (tc *TidbCluster) GetHelperSpec() HelperSpec

func (*TidbCluster) GetInstanceName

func (tc *TidbCluster) GetInstanceName() string

func (*TidbCluster) HelperImage

func (tc *TidbCluster) HelperImage() string

func (*TidbCluster) HelperImagePullPolicy

func (tc *TidbCluster) HelperImagePullPolicy() corev1.PullPolicy

func (*TidbCluster) IsPVReclaimEnabled

func (tc *TidbCluster) IsPVReclaimEnabled() bool

func (*TidbCluster) IsTLSClusterEnabled

func (tc *TidbCluster) IsTLSClusterEnabled() bool

func (*TidbCluster) IsTiDBBinlogEnabled

func (tc *TidbCluster) IsTiDBBinlogEnabled() bool

func (*TidbCluster) PDAllMembersReady

func (tc *TidbCluster) PDAllMembersReady() bool

func (*TidbCluster) PDAllPodsStarted

func (tc *TidbCluster) PDAllPodsStarted() bool

func (*TidbCluster) PDAutoFailovering

func (tc *TidbCluster) PDAutoFailovering() bool

func (*TidbCluster) PDImage

func (tc *TidbCluster) PDImage() string

func (*TidbCluster) PDIsAvailable

func (tc *TidbCluster) PDIsAvailable() bool

func (*TidbCluster) PDStsActualReplicas

func (tc *TidbCluster) PDStsActualReplicas() int32

func (*TidbCluster) PDStsDesiredReplicas

func (tc *TidbCluster) PDStsDesiredReplicas() int32

func (*TidbCluster) PDUpgrading

func (tc *TidbCluster) PDUpgrading() bool

func (*TidbCluster) PumpImage

func (tc *TidbCluster) PumpImage() *string

func (*TidbCluster) Scheme

func (tc *TidbCluster) Scheme() string

func (*TidbCluster) TiDBAllMembersReady

func (tc *TidbCluster) TiDBAllMembersReady() bool

func (*TidbCluster) TiDBAllPodsStarted

func (tc *TidbCluster) TiDBAllPodsStarted() bool

func (*TidbCluster) TiDBImage

func (tc *TidbCluster) TiDBImage() string

func (*TidbCluster) TiDBStsActualReplicas

func (tc *TidbCluster) TiDBStsActualReplicas() int32

func (*TidbCluster) TiDBStsDesiredReplicas

func (tc *TidbCluster) TiDBStsDesiredReplicas() int32

func (*TidbCluster) TiDBUpgrading

func (tc *TidbCluster) TiDBUpgrading() bool

func (*TidbCluster) TiKVAllPodsStarted

func (tc *TidbCluster) TiKVAllPodsStarted() bool

func (*TidbCluster) TiKVAllStoresReady

func (tc *TidbCluster) TiKVAllStoresReady() bool

func (*TidbCluster) TiKVImage

func (tc *TidbCluster) TiKVImage() string

func (*TidbCluster) TiKVIsAvailable

func (tc *TidbCluster) TiKVIsAvailable() bool

func (*TidbCluster) TiKVStsActualReplicas

func (tc *TidbCluster) TiKVStsActualReplicas() int32

func (*TidbCluster) TiKVStsDesiredReplicas

func (tc *TidbCluster) TiKVStsDesiredReplicas() int32

func (*TidbCluster) TiKVUpgrading

func (tc *TidbCluster) TiKVUpgrading() bool

func (*TidbCluster) Timezone

func (tc *TidbCluster) Timezone() string

type TidbClusterAutoScaler

type TidbClusterAutoScaler struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`

	// Spec describes the state of the TidbClusterAutoScaler
	Spec TidbClusterAutoScalerSpec `json:"spec"`

	// Status describe the status of the TidbClusterAutoScaler
	Status TidbClusterAutoSclaerStatus `json:"status"`
}

+k8s:openapi-gen=true TidbClusterAutoScaler is the control script's spec

func (*TidbClusterAutoScaler) DeepCopy

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

func (*TidbClusterAutoScaler) DeepCopyInto

func (in *TidbClusterAutoScaler) DeepCopyInto(out *TidbClusterAutoScaler)

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

func (*TidbClusterAutoScaler) DeepCopyObject

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

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

type TidbClusterAutoScalerList

type TidbClusterAutoScalerList struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ListMeta `json:"metadata"`

	Items []TidbClusterAutoScaler `json:"items"`
}

+k8s:openapi-gen=true TidbClusterAutoScalerList is TidbClusterAutoScaler list

func (*TidbClusterAutoScalerList) DeepCopy

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

func (*TidbClusterAutoScalerList) DeepCopyInto

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

func (*TidbClusterAutoScalerList) DeepCopyObject

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

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

type TidbClusterAutoScalerSpec

type TidbClusterAutoScalerSpec struct {
	// TidbClusterRef describe the target TidbCluster
	Cluster TidbClusterRef `json:"cluster"`

	// We used prometheus to fetch the metrics resources until the pd could provide it.
	// MetricsUrl represents the url to fetch the metrics info
	// +optional
	MetricsUrl *string `json:"metricsUrl,omitempty"`

	// TidbMonitorRef describe the target TidbMonitor, when MetricsUrl and Monitor are both set,
	// Operator will use MetricsUrl
	// +optional
	Monitor *TidbMonitorRef `json:"monitor,omitempty"`

	// TiKV represents the auto-scaling spec for tikv
	// +optional
	TiKV *TikvAutoScalerSpec `json:"tikv,omitempty"`

	// TiDB represents the auto-scaling spec for tidb
	// +optional
	TiDB *TidbAutoScalerSpec `json:"tidb,omitempty"`
}

+k8s:openapi-gen=true TidbAutoScalerSpec describes the state of the TidbClusterAutoScaler

func (*TidbClusterAutoScalerSpec) DeepCopy

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

func (*TidbClusterAutoScalerSpec) DeepCopyInto

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

type TidbClusterAutoSclaerStatus

type TidbClusterAutoSclaerStatus struct {
}

TODO: sync status

func (*TidbClusterAutoSclaerStatus) DeepCopy

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

func (*TidbClusterAutoSclaerStatus) DeepCopyInto

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

type TidbClusterList

type TidbClusterList struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ListMeta `json:"metadata"`

	Items []TidbCluster `json:"items"`
}

+k8s:openapi-gen=true 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 TidbClusterRef

type TidbClusterRef struct {
	// Namespace is the namespace that TidbCluster object locates,
	// default to the same namespace with TidbMonitor
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name is the name of TidbCluster object
	Name string `json:"name"`
}

+k8s:openapi-gen=true TidbClusterRef reference to a TidbCluster

func (*TidbClusterRef) DeepCopy

func (in *TidbClusterRef) DeepCopy() *TidbClusterRef

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

func (*TidbClusterRef) DeepCopyInto

func (in *TidbClusterRef) DeepCopyInto(out *TidbClusterRef)

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

type TidbClusterSpec

type TidbClusterSpec struct {
	// PD cluster spec
	PD PDSpec `json:"pd"`

	// TiDB cluster spec
	TiDB TiDBSpec `json:"tidb"`

	// TiKV cluster spec
	TiKV TiKVSpec `json:"tikv"`

	// Pump cluster spec
	// +optional
	Pump *PumpSpec `json:"pump,omitempty"`

	// Helper spec
	// +optional
	Helper *HelperSpec `json:"helper,omitempty"`

	// TODO: remove optional after defaulting logic introduced
	// TiDB cluster version
	// +optional
	Version string `json:"version"`

	// SchedulerName of TiDB cluster Pods
	// +kubebuilder:default=tidb-scheduler
	SchedulerName string `json:"schedulerName,omitempty"`

	// Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster
	// +kubebuilder:default=Recycle
	PVReclaimPolicy corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy,omitempty"`

	// ImagePullPolicy of TiDB cluster Pods
	// +kubebuilder:default=IfNotPresent
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// ConfigUpdateStrategy determines how the configuration change is applied to the cluster.
	// UpdateStrategyInPlace will update the ConfigMap of configuration in-place and an extra rolling-update of the
	// cluster component is needed to reload the configuration change.
	// UpdateStrategyRollingUpdate will create a new ConfigMap with the new configuration and rolling-update the
	// related components to use the new ConfigMap, that is, the new configuration will be applied automatically.
	// +kubebuilder:validation:Enum=InPlace,RollingUpdate
	// +kubebuilder:default=InPlacne
	ConfigUpdateStrategy ConfigUpdateStrategy `json:"configUpdateStrategy,omitempty"`

	// Whether enable PVC reclaim for orphan PVC left by statefulset scale-in
	// Optional: Defaults to false
	// +optional
	EnablePVReclaim *bool `json:"enablePVReclaim,omitempty"`

	// Enable TLS connection between TiDB server components
	// Optional: Defaults to false
	// +optional
	EnableTLSCluster *bool `json:"enableTLSCluster,omitempty"`

	// Whether Hostnetwork is enabled for TiDB cluster Pods
	// Optional: Defaults to false
	// +optional
	HostNetwork *bool `json:"hostNetwork,omitempty"`

	// Affinity of TiDB cluster Pods
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// PriorityClassName of TiDB cluster Pods
	// Optional: Defaults to omitted
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// Base node selectors of TiDB cluster Pods, components may add or override selectors upon this respectively
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Base annotations of TiDB cluster Pods, components may add or override selectors upon this respectively
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Base tolerations of TiDB cluster Pods, components may add more tolerations upon this respectively
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Time zone of TiDB cluster Pods
	// Optional: Defaults to UTC
	// +optional
	Timezone string `json:"timezone,omitempty"`

	// Services list non-headless services type used in TidbCluster
	// Deprecated
	// +k8s:openapi-gen=false
	Services []Service `json:"services,omitempty"`
}

+k8s:openapi-gen=true 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"`
	Pump      PumpStatus `josn:"pump,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.

type TidbInitializer

type TidbInitializer struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`

	// Spec defines the desired state of TidbInitializer
	Spec TidbInitializerSpec `json:"spec"`

	// +k8s:openapi-gen=false
	// Most recently observed status of the TidbInitializer
	Status TidbInitializerStatus `json:"status"`
}

+k8s:openapi-gen=true TidbInitializer is a TiDB cluster initializing job

func (*TidbInitializer) DeepCopy

func (in *TidbInitializer) DeepCopy() *TidbInitializer

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

func (*TidbInitializer) DeepCopyInto

func (in *TidbInitializer) DeepCopyInto(out *TidbInitializer)

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

func (*TidbInitializer) DeepCopyObject

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

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

func (*TidbInitializer) GetPermitHost

func (ti *TidbInitializer) GetPermitHost() string

GetPermitHost retrieves the permit host from TidbInitializer

type TidbInitializerList

type TidbInitializerList struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ListMeta `json:"metadata"`

	Items []TidbInitializer `json:"items"`
}

+k8s:openapi-gen=true

func (*TidbInitializerList) DeepCopy

func (in *TidbInitializerList) DeepCopy() *TidbInitializerList

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

func (*TidbInitializerList) DeepCopyInto

func (in *TidbInitializerList) DeepCopyInto(out *TidbInitializerList)

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

func (*TidbInitializerList) DeepCopyObject

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

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

type TidbInitializerSpec

type TidbInitializerSpec struct {
	Image string `json:"image"`

	Clusters TidbClusterRef `json:"cluster"`

	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// permitHost is the host which will only be allowed to connect to the TiDB.
	// +optional
	PermitHost *string `json:"permitHost,omitempty"`

	// InitSql is the SQL statements executed after the TiDB cluster is bootstrapped.
	// +optional
	InitSql *string `json:"initSql,omitempty"`

	// InitSqlConfigMapName reference a configmap that provide init-sql, take high precedence than initSql if set
	// +optional
	InitSqlConfigMap *string `json:"initSqlConfigMap,omitempty"`

	// +optional
	PasswordSecret *string `json:"passwordSecret,omitempty"`

	// +optional
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`

	// Time zone of TiDB initializer Pods
	// +optional
	Timezone string `json:"timezone,omitempty"`
}

+k8s:openapi-gen=true TidbInitializer spec encode the desired state of tidb initializer Job

func (*TidbInitializerSpec) DeepCopy

func (in *TidbInitializerSpec) DeepCopy() *TidbInitializerSpec

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

func (*TidbInitializerSpec) DeepCopyInto

func (in *TidbInitializerSpec) DeepCopyInto(out *TidbInitializerSpec)

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

type TidbInitializerStatus

type TidbInitializerStatus struct {
	batchv1.JobStatus `json:",inline"`

	// Phase is a user readable state inferred from the underlying Job status and TidbCluster status
	Phase InitializePhase `json:"phase,omitempty"`
}

+k8s:openapi-gen=true

func (*TidbInitializerStatus) DeepCopy

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

func (*TidbInitializerStatus) DeepCopyInto

func (in *TidbInitializerStatus) DeepCopyInto(out *TidbInitializerStatus)

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

type TidbMonitor

type TidbMonitor struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ObjectMeta `json:"metadata"`

	// Spec defines the desired state of TidbMonitor
	Spec TidbMonitorSpec `json:"spec"`

	// +k8s:openapi-gen=false
	// Most recently observed status of the TidbMonitor
	Status TidbMonitorStatus `json:"status"`
}

+k8s:openapi-gen=true TidbMonitor encode the spec and status of the monitoring component of a TiDB cluster

func (*TidbMonitor) BaseGrafanaSpec

func (tm *TidbMonitor) BaseGrafanaSpec() MonitorComponentAccessor

func (*TidbMonitor) BasePrometheusSpec

func (tm *TidbMonitor) BasePrometheusSpec() MonitorComponentAccessor

BasePrometheusSpec return the base spec of Prometheus service

func (*TidbMonitor) BaseReloaderSpec

func (tm *TidbMonitor) BaseReloaderSpec() MonitorComponentAccessor

func (*TidbMonitor) DeepCopy

func (in *TidbMonitor) DeepCopy() *TidbMonitor

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

func (*TidbMonitor) DeepCopyInto

func (in *TidbMonitor) DeepCopyInto(out *TidbMonitor)

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

func (*TidbMonitor) DeepCopyObject

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

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

type TidbMonitorList

type TidbMonitorList struct {
	metav1.TypeMeta `json:",inline"`
	// +k8s:openapi-gen=false
	metav1.ListMeta `json:"metadata"`

	Items []TidbMonitor `json:"items"`
}

+k8s:openapi-gen=true TidbMonitorList is TidbMonitor list

func (*TidbMonitorList) DeepCopy

func (in *TidbMonitorList) DeepCopy() *TidbMonitorList

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

func (*TidbMonitorList) DeepCopyInto

func (in *TidbMonitorList) DeepCopyInto(out *TidbMonitorList)

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

func (*TidbMonitorList) DeepCopyObject

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

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

type TidbMonitorRef

type TidbMonitorRef struct {
	// Namespace is the namespace that TidbMonitor object locates,
	// default to the same namespace with TidbClusterAutoScaler
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name is the name of TidbMonitor object
	Name string `json:"name"`
}

+k8s:openapi-gen=true TidbMonitorRef reference to a TidbMonitor

func (*TidbMonitorRef) DeepCopy

func (in *TidbMonitorRef) DeepCopy() *TidbMonitorRef

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

func (*TidbMonitorRef) DeepCopyInto

func (in *TidbMonitorRef) DeepCopyInto(out *TidbMonitorRef)

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

type TidbMonitorSpec

type TidbMonitorSpec struct {
	Clusters []TidbClusterRef `json:"clusters"`

	Prometheus PrometheusSpec `json:"prometheus"`
	// +optional
	Grafana     *GrafanaSpec    `json:"grafana,omitempty"`
	Reloader    ReloaderSpec    `json:"reloader"`
	Initializer InitializerSpec `json:"initializer"`

	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// +optional
	Persistent bool `json:"persistent,omitempty"`
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`
	// +optional
	Storage string `json:"storage,omitempty"`
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// kubePrometheusURL is where tidb-monitoring get the  common metrics of kube-prometheus.
	// Ref: https://github.com/coreos/kube-prometheus
	// +optional
	KubePrometheusURL *string `json:"kubePrometheusURL,omitempty"`
	// alertmanagerURL is where tidb-monitoring push alerts to.
	// Ref: https://prometheus.io/docs/alerting/alertmanager/
	// +optional
	AlertmanagerURL *string `json:"alertmanagerURL,omitempty"`
}

+k8s:openapi-gen=true TidbMonitor spec encode the desired state of tidb monitoring component

func (*TidbMonitorSpec) DeepCopy

func (in *TidbMonitorSpec) DeepCopy() *TidbMonitorSpec

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

func (*TidbMonitorSpec) DeepCopyInto

func (in *TidbMonitorSpec) DeepCopyInto(out *TidbMonitorSpec)

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

type TidbMonitorStatus

type TidbMonitorStatus struct {
}

TODO: sync status

func (*TidbMonitorStatus) DeepCopy

func (in *TidbMonitorStatus) DeepCopy() *TidbMonitorStatus

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

func (*TidbMonitorStatus) DeepCopyInto

func (in *TidbMonitorStatus) DeepCopyInto(out *TidbMonitorStatus)

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

type TikvAutoScalerSpec

type TikvAutoScalerSpec struct {
	BasicAutoScalerSpec `json:",inline"`
}

+k8s:openapi-gen=true TikvAutoScalerSpec describes the spec for tikv auto-scaling

func (*TikvAutoScalerSpec) DeepCopy

func (in *TikvAutoScalerSpec) DeepCopy() *TikvAutoScalerSpec

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

func (*TikvAutoScalerSpec) DeepCopyInto

func (in *TikvAutoScalerSpec) DeepCopyInto(out *TikvAutoScalerSpec)

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

type TxnLocalLatches

type TxnLocalLatches struct {
	// +optional
	Enabled *bool `toml:"enabled,omitempty" json:"enabled,omitempty"`
	// +optional
	Capacity *uint `toml:"capacity,omitempty" json:"capacity,omitempty"`
}

TxnLocalLatches is the TxnLocalLatches section of the config. +k8s:openapi-gen=true

func (*TxnLocalLatches) DeepCopy

func (in *TxnLocalLatches) DeepCopy() *TxnLocalLatches

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

func (*TxnLocalLatches) DeepCopyInto

func (in *TxnLocalLatches) DeepCopyInto(out *TxnLocalLatches)

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

type UnjoinedMember

type UnjoinedMember struct {
	PodName   string      `json:"podName,omitempty"`
	PVCUID    types.UID   `json:"pvcUID,omitempty"`
	CreatedAt metav1.Time `json:"createdAt,omitempty"`
}

UnjoinedMember is the pd unjoin cluster member information

func (*UnjoinedMember) DeepCopy

func (in *UnjoinedMember) DeepCopy() *UnjoinedMember

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

func (*UnjoinedMember) DeepCopyInto

func (in *UnjoinedMember) DeepCopyInto(out *UnjoinedMember)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL