v1alpha1

package
v1.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 27 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"

	DMClusterName    = "dmclusters"
	DMClusterKind    = "DMCluster"
	DMClusterKindKey = "dmcluster"

	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"

	// DMWorkerStateFree represents status of free of dm-worker
	DMWorkerStateFree string = "free"
	// DMWorkerStateBound represents status of bound of dm-worker
	DMWorkerStateBound string = "bound"
	// DMWorkerStateOffline represents status of offline of dm-worker
	DMWorkerStateOffline string = "offline"
)
View Source
const (
	// TCPProbeType represents the readiness prob method with TCP
	TCPProbeType string = "tcp"
	// CommandProbeType represents the readiness prob method with arbitrary unix `exec` call format commands
	CommandProbeType string = "command"
)

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},
	DMCluster:             CrdKind{Plural: DMClusterName, Kind: DMClusterKind, ShortNames: []string{"dc"}, SpecName: SpecPath + DMClusterKind},
	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{"tm"}, 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 been successfully cleaned up

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 IsCleanCandidate added in v1.1.3

func IsCleanCandidate(backup *Backup) bool

IsCleanCandidate returns true if a Backup should be added to clean candidate according to cleanPolicy

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 NeedNotClean added in v1.1.3

func NeedNotClean(backup *Backup) bool

NeedNotClean returns true if a Backup need not to be cleaned up according to cleanPolicy

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 AutoResource added in v1.2.0

type AutoResource struct {
	// CPU defines the CPU of this resource type
	CPU resource.Quantity `json:"cpu"`
	// Memory defines the memory of this resource type
	Memory resource.Quantity `json:"memory"`
	// Storage defines the storage of this resource type
	Storage resource.Quantity `json:"storage,omitempty"`
	// Count defines the max availabel count of this resource type
	Count *int32 `json:"count,omitempty"`
}

+k8s:openapi-gen=true AutoResource describes the resource type definitions

func (*AutoResource) DeepCopy added in v1.2.0

func (in *AutoResource) DeepCopy() *AutoResource

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

func (*AutoResource) DeepCopyInto added in v1.2.0

func (in *AutoResource) DeepCopyInto(out *AutoResource)

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

type AutoRule added in v1.2.0

type AutoRule struct {
	// MaxThreshold defines the threshold to scale out
	MaxThreshold float64 `json:"max_threshold"`
	// MinThreshold defines the threshold to scale in, not applicable to `storage` rule
	MinThreshold *float64 `json:"min_threshold,omitempty"`
	// ResourceTypes defines the resource types that can be used for scaling
	ResourceTypes []string `json:"resource_types,omitempty"`
}

+k8s:openapi-gen=true AutoRule describes the rules for auto-scaling with PD API

func (*AutoRule) DeepCopy added in v1.2.0

func (in *AutoRule) DeepCopy() *AutoRule

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

func (*AutoRule) DeepCopyInto added in v1.2.0

func (in *AutoRule) DeepCopyInto(out *AutoRule)

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

type BRConfig

type BRConfig struct {
	// ClusterName of backup/restore cluster
	Cluster string `json:"cluster"`
	// Namespace of backup/restore cluster
	ClusterNamespace string `json:"clusterNamespace,omitempty"`
	// Deprecated from BR v4.0.3. Please use `Spec.TableFilter` instead. DB is the specific DB which will be backed-up or restored
	DB string `json:"db,omitempty"`
	// Deprecated from BR v4.0.3. Please use `Spec.TableFilter` instead. Table is the specific table which will be backed-up or restored
	Table string `json:"table,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"`
	// Options means options for backup data to remote storage with BR. These options has highest priority.
	Options []string `json:"options,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"
	// BackupPrepare means the backup prepare backup process
	BackupPrepare BackupConditionType = "Prepare"
)

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.
	// if MaxBackups and MaxReservedTime are set at the same time, MaxReservedTime is preferred
	// and MaxBackups is ignored.
	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"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,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 {
	corev1.ResourceRequirements `json:"resources,omitempty"`
	// 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"`
	// TikvGCLifeTime is to specify the safe gc life time for backup.
	// The time limit during which data is retained for each GC, in the format of Go Duration.
	// When a GC happens, the current time minus this value is the safe point.
	TikvGCLifeTime *string `json:"tikvGCLifeTime,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"`
	// DumplingConfig is the configs for dumpling
	Dumpling *DumplingConfig `json:"dumpling,omitempty"`
	// Base tolerations of backup Pods, components may add more tolerations upon this respectively
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// ToolImage specifies the tool image used in `Backup`, which supports BR and Dumpling images.
	// For examples `spec.toolImage: pingcap/br:v4.0.8` or `spec.toolImage: pingcap/dumpling:v4.0.8`
	// +optional
	ToolImage string `json:"toolImage,omitempty"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// TableFilter means Table filter expression for 'db.table' matching. BR supports this from v4.0.3.
	TableFilter []string `json:"tableFilter,omitempty"`
	// Affinity of backup Pods
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// Use KMS to decrypt the secrets
	UseKMS bool `json:"useKMS,omitempty"`
	// Specify service account of backup
	ServiceAccount string `json:"serviceAccount,omitempty"`
	// CleanPolicy denotes whether to clean backup data when the object is deleted from the cluster, if not set, the backup data will be retained
	CleanPolicy CleanPolicyType `json:"cleanPolicy,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"`
	// BackupSizeReadable is the data size of the backup.
	// the difference with BackupSize is that its format is human readable
	BackupSizeReadable string `json:"backupSizeReadable"`
	// 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"`
	// Phase is a user readable state inferred from the underlying Backup conditions
	Phase      BackupConditionType `json:"phase"`
	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"
	// BackupStorageTypeLocal represents local volume storage type
	BackupStorageTypeLocal BackupStorageType = "local"
	// BackupStorageTypeUnknown represents the unknown storage type
	BackupStorageTypeUnknown BackupStorageType = "unknown"
)

type BackupType

type BackupType string

BackupType represents the backup type. +k8s:openapi-gen=true

const (
	// BackupTypeFull represents the full backup of tidb cluster.
	BackupTypeFull BackupType = "full"
	// BackupTypeRaw represents the raw backup of tidb cluster.
	BackupTypeRaw BackupType = "raw"
	// 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"
	// BackupTypeTiFlashReplica represents restoring the tiflash replica removed by a failed restore of the older version BR
	BackupTypeTiFlashReplica BackupType = "tiflash-replica"
)

type BasicAutoScalerSpec

type BasicAutoScalerSpec struct {
	// Rules defines the rules for auto-scaling with PD API
	Rules map[corev1.ResourceName]AutoRule `json:"rules,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"`

	// External makes the auto-scaler controller able to query the external service
	// to fetch the recommended replicas for TiKV/TiDB
	// +optional
	External *ExternalConfig `json:"external,omitempty"`

	// Resources represent the resource type definitions that can be used for TiDB/TiKV
	// The key is resource_type name of the resource
	// +optional
	Resources map[string]AutoResource `json:"resources,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 BasicAutoScalerStatus

type BasicAutoScalerStatus struct {
	// LastAutoScalingTimestamp describes the last auto-scaling timestamp for the component(tidb/tikv)
	// +optional
	LastAutoScalingTimestamp *metav1.Time `json:"lastAutoScalingTimestamp,omitempty"`
}

+k8s:openapi-gen=true BasicAutoScalerStatus describe the basic auto-scaling status

func (*BasicAutoScalerStatus) DeepCopy

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

func (*BasicAutoScalerStatus) DeepCopyInto

func (in *BasicAutoScalerStatus) DeepCopyInto(out *BasicAutoScalerStatus)

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

type Binlog

type Binlog struct {
	// optional
	Enable *bool `toml:"enable,omitempty" json:"enable,omitempty"`
	// 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 CleanPolicyType added in v1.1.3

type CleanPolicyType string

+k8s:openapi-gen=true CleanPolicyType represents the clean policy of backup data in remote storage

const (
	// CleanPolicyTypeRetain represents that the backup data in remote storage will be retained when the Backup CR is deleted
	CleanPolicyTypeRetain CleanPolicyType = "Retain"
	// CleanPolicyTypeOnFailure represents that the backup data in remote storage will be cleaned only for the failed backups when the Backup CR is deleted
	CleanPolicyTypeOnFailure CleanPolicyType = "OnFailure"
	// CleanPolicyTypeDelete represents that the backup data in remote storage will be cleaned when the Backup CR is deleted
	CleanPolicyTypeDelete CleanPolicyType = "Delete"
)

type ClusterRef added in v1.2.0

type ClusterRef TidbClusterRef

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

func (*ClusterRef) DeepCopy added in v1.2.0

func (in *ClusterRef) DeepCopy() *ClusterRef

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

func (*ClusterRef) DeepCopyInto added in v1.2.0

func (in *ClusterRef) DeepCopyInto(out *ClusterRef)

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

type CommonConfig

type CommonConfig struct {
	// Optional: Defaults to "/data0/tmp"
	// +optional
	TmpPath *string `json:"tmp_path,omitempty" toml:"tmp_path,omitempty"`

	// Optional: Defaults to "TiFlash"
	// +optional
	// +k8s:openapi-gen=false
	DisplayName *string `json:"display_name,omitempty" toml:"display_name,omitempty"`

	// Optional: Defaults to "default"
	// +optional
	// +k8s:openapi-gen=false
	DefaultProfile *string `json:"default_profile,omitempty" toml:"default_profile,omitempty"`

	// Optional: Defaults to "/data0/db"
	// +optional
	// +k8s:openapi-gen=false
	FlashDataPath *string `json:"path,omitempty" toml:"path,omitempty"`

	// Optional: Defaults to false
	// +optional
	PathRealtimeMode *bool `json:"path_realtime_mode,omitempty" toml:"path_realtime_mode,omitempty"`

	// Optional: Defaults to 5368709120
	// +optional
	MarkCacheSize *int64 `json:"mark_cache_size,omitempty" toml:"mark_cache_size,omitempty"`

	// Optional: Defaults to 5368709120
	// +optional
	MinmaxIndexCacheSize *int64 `json:"minmax_index_cache_size,omitempty" toml:"minmax_index_cache_size,omitempty"`

	// Optional: Defaults to "0.0.0.0"
	// +optional
	// +k8s:openapi-gen=false
	ListenHost *string `json:"listen_host,omitempty" toml:"listen_host,omitempty"`

	// Optional: Defaults to 9000
	// +optional
	// +k8s:openapi-gen=false
	TCPPort *int32 `json:"tcp_port,omitempty" toml:"tcp_port,omitempty"`
	// Optional: Defaults to 8123
	// +optional
	// +k8s:openapi-gen=false
	HTTPPort *int32 `json:"http_port,omitempty" toml:"http_port,omitempty"`
	// Optional: Defaults to 9000
	// +optional
	// +k8s:openapi-gen=false
	TCPPortSecure *int32 `json:"tcp_port_secure,omitempty" toml:"tcp_port_secure,omitempty"`
	// Optional: Defaults to 8123
	// +optional
	// +k8s:openapi-gen=false
	HTTPSPort *int32 `json:"https_port,omitempty" toml:"https_port,omitempty"`
	// Optional: Defaults to 9009
	// +optional
	// +k8s:openapi-gen=false
	InternalServerHTTPPort *int32 `json:"interserver_http_port,omitempty" toml:"interserver_http_port,omitempty"`
	// +optional
	Flash *Flash `json:"flash,omitempty" toml:"flash,omitempty"`
	// +optional
	FlashLogger *FlashLogger `json:"logger,omitempty" toml:"logger,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	FlashApplication *FlashApplication `json:"application,omitempty" toml:"application,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	FlashRaft *FlashRaft `json:"raft,omitempty" toml:"raft,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	FlashStatus *FlashStatus `json:"status,omitempty" toml:"status,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	FlashQuota *FlashQuota `json:"quotas,omitempty" toml:"quotas,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	FlashUser *FlashUser `json:"users,omitempty" toml:"users,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	FlashProfile *FlashProfile `json:"profiles,omitempty" toml:"profiles,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	Security *FlashSecurity `json:"security,omitempty" toml:"security,omitempty"`
}

CommonConfig is the configuration of TiFlash process. +k8s:openapi-gen=true

func (*CommonConfig) DeepCopy

func (in *CommonConfig) DeepCopy() *CommonConfig

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

func (*CommonConfig) DeepCopyInto

func (in *CommonConfig) DeepCopyInto(out *CommonConfig)

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
	ImagePullSecrets() []corev1.LocalObjectReference
	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
	Env() []corev1.EnvVar
	AdditionalContainers() []corev1.Container
	AdditionalVolumes() []corev1.Volume
	AdditionalVolumeMounts() []corev1.VolumeMount
	TerminationGracePeriodSeconds() *int64
	StatefulSetUpdateStrategy() apps.StatefulSetUpdateStrategyType
}

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

type ComponentSpec

type ComponentSpec struct {
	// (Deprecated) Image of the component
	// Use `baseImage` and `version` instead
	// +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"`

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,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 setting 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"`

	// List of environment variables to set in the container, like v1.Container.Env.
	// Note that the following env names cannot be used and will be overridden by TiDB Operator builtin envs
	// - NAMESPACE
	// - TZ
	// - SERVICE_NAME
	// - PEER_SERVICE_NAME
	// - HEADLESS_SERVICE_NAME
	// - SET_NAME
	// - HOSTNAME
	// - CLUSTER_NAME
	// - POD_NAME
	// - BINLOG_ENABLED
	// - SLOW_LOG_FILE
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Additional containers of the component.
	// +optional
	AdditionalContainers []corev1.Container `json:"additionalContainers,omitempty"`

	// Additional volumes of component pod.
	// +optional
	AdditionalVolumes []corev1.Volume `json:"additionalVolumes,omitempty"`

	// Additional volume mounts of component pod.
	AdditionalVolumeMounts []corev1.VolumeMount `json:"additionalVolumeMounts,omitempty"`

	// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
	// Value must be non-negative integer. The value zero indicates delete immediately.
	// If this value is nil, the default grace period will be used instead.
	// The grace period is the duration in seconds after the processes running in the pod are sent
	// a termination signal and the time when the processes are forcibly halted with a kill signal.
	// Set this value longer than the expected cleanup time for your process.
	// Defaults to 30 seconds.
	// +optional
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`

	// StatefulSetUpdateStrategy indicates the StatefulSetUpdateStrategy that will be
	// employed to update Pods in the StatefulSet when a revision is made to
	// Template.
	// +optional
	StatefulSetUpdateStrategy apps.StatefulSetUpdateStrategyType `json:"statefulSetUpdateStrategy,omitempty"`
}

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

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 ConfigMapRef added in v1.1.1

type ConfigMapRef struct {
	Name string `json:"name,omitempty"`

	// +optional
	// if the namespace is omitted, the operator controller would use the Tidbmonitor's namespace instead.
	Namespace *string `json:"namespace,omitempty"`
}

ConfigMapRef is the external configMap +k8s:openapi-gen=true

func (*ConfigMapRef) DeepCopy added in v1.1.1

func (in *ConfigMapRef) DeepCopy() *ConfigMapRef

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

func (*ConfigMapRef) DeepCopyInto added in v1.1.1

func (in *ConfigMapRef) DeepCopyInto(out *ConfigMapRef)

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 CoprocessorCache

type CoprocessorCache struct {
	// Whether to enable the copr cache. The copr cache saves the result from TiKV Coprocessor in the memory and
	// reuses the result when corresponding data in TiKV is unchanged, on a region basis.
	// +optional
	Enabled *bool `toml:"enable,omitempty" json:"enable,omitempty"`
	// The capacity in MB of the cache.
	// +optional
	CapacityMB *float64 `toml:"capacity-mb,omitempty" json:"capacity-mb,omitempty"`
	// Only cache requests whose result set is small.
	// +optional
	AdmissionMaxResultMB *float64 `toml:"admission-max-result-mb,omitempty" json:"admission-max-result-mb,omitempty"`
	// Only cache requests takes notable time to process.
	// +optional
	AdmissionMinProcessMs *uint64 `toml:"admission-min-process-ms,omitempty" json:"admission-min-process-ms,omitempty"`
}

CoprocessorCache is the config for coprocessor cache.

func (*CoprocessorCache) DeepCopy

func (in *CoprocessorCache) DeepCopy() *CoprocessorCache

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

func (*CoprocessorCache) DeepCopyInto

func (in *CoprocessorCache) DeepCopyInto(out *CoprocessorCache)

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

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
	DMCluster             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 DMCluster added in v1.2.0

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

	// Spec defines the behavior of a dm cluster
	Spec DMClusterSpec `json:"spec"`

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

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

func (*DMCluster) BaseMasterSpec added in v1.2.0

func (dc *DMCluster) BaseMasterSpec() ComponentAccessor

func (*DMCluster) BaseWorkerSpec added in v1.2.0

func (dc *DMCluster) BaseWorkerSpec() ComponentAccessor

func (*DMCluster) DeepCopy added in v1.2.0

func (in *DMCluster) DeepCopy() *DMCluster

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

func (*DMCluster) DeepCopyInto added in v1.2.0

func (in *DMCluster) DeepCopyInto(out *DMCluster)

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

func (*DMCluster) DeepCopyObject added in v1.2.0

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

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

func (*DMCluster) GetInstanceName added in v1.2.0

func (dc *DMCluster) GetInstanceName() string

func (*DMCluster) IsPVReclaimEnabled added in v1.2.0

func (dc *DMCluster) IsPVReclaimEnabled() bool

func (*DMCluster) IsTLSClusterEnabled added in v1.2.0

func (dc *DMCluster) IsTLSClusterEnabled() bool

func (*DMCluster) MasterAllMembersReady added in v1.2.0

func (dc *DMCluster) MasterAllMembersReady() bool

func (*DMCluster) MasterAllPodsStarted added in v1.2.0

func (dc *DMCluster) MasterAllPodsStarted() bool

func (*DMCluster) MasterAutoFailovering added in v1.2.0

func (dc *DMCluster) MasterAutoFailovering() bool

func (*DMCluster) MasterImage added in v1.2.0

func (dc *DMCluster) MasterImage() string

func (*DMCluster) MasterIsAvailable added in v1.2.0

func (dc *DMCluster) MasterIsAvailable() bool

func (*DMCluster) MasterScaling added in v1.2.0

func (dc *DMCluster) MasterScaling() bool

func (*DMCluster) MasterStsActualReplicas added in v1.2.0

func (dc *DMCluster) MasterStsActualReplicas() int32

func (*DMCluster) MasterStsDesiredOrdinals added in v1.2.0

func (dc *DMCluster) MasterStsDesiredOrdinals(excludeFailover bool) sets.Int32

func (*DMCluster) MasterStsDesiredReplicas added in v1.2.0

func (dc *DMCluster) MasterStsDesiredReplicas() int32

func (*DMCluster) MasterUpgrading added in v1.2.0

func (dc *DMCluster) MasterUpgrading() bool

func (*DMCluster) MasterVersion added in v1.2.0

func (dc *DMCluster) MasterVersion() string

func (*DMCluster) Scheme added in v1.2.0

func (dc *DMCluster) Scheme() string

func (*DMCluster) Timezone added in v1.2.0

func (dc *DMCluster) Timezone() string

func (*DMCluster) WorkerAllMembersReady added in v1.2.0

func (dc *DMCluster) WorkerAllMembersReady() bool

func (*DMCluster) WorkerAllPodsStarted added in v1.2.0

func (dc *DMCluster) WorkerAllPodsStarted() bool

func (*DMCluster) WorkerImage added in v1.2.0

func (dc *DMCluster) WorkerImage() string

func (*DMCluster) WorkerStsActualReplicas added in v1.2.0

func (dc *DMCluster) WorkerStsActualReplicas() int32

func (*DMCluster) WorkerStsDesiredOrdinals added in v1.2.0

func (dc *DMCluster) WorkerStsDesiredOrdinals(excludeFailover bool) sets.Int32

func (*DMCluster) WorkerStsDesiredReplicas added in v1.2.0

func (dc *DMCluster) WorkerStsDesiredReplicas() int32

type DMClusterCondition added in v1.2.0

type DMClusterCondition struct {
	// Type of the condition.
	Type DMClusterConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty"`
}

DMClusterCondition is dm cluster condition

func (*DMClusterCondition) DeepCopy added in v1.2.0

func (in *DMClusterCondition) DeepCopy() *DMClusterCondition

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

func (*DMClusterCondition) DeepCopyInto added in v1.2.0

func (in *DMClusterCondition) DeepCopyInto(out *DMClusterCondition)

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

type DMClusterConditionType added in v1.2.0

type DMClusterConditionType string

DMClusterConditionType represents a dm cluster condition value.

const (
	// DMClusterReady indicates that the dm cluster is ready or not.
	// This is defined as:
	// - All statefulsets are up to date (currentRevision == updateRevision).
	// - All Master members are healthy.
	// - All Worker pods are up.
	DMClusterReady DMClusterConditionType = "Ready"
)

type DMClusterList added in v1.2.0

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

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

+k8s:openapi-gen=true DMClusterList is DMCluster list

func (*DMClusterList) DeepCopy added in v1.2.0

func (in *DMClusterList) DeepCopy() *DMClusterList

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

func (*DMClusterList) DeepCopyInto added in v1.2.0

func (in *DMClusterList) DeepCopyInto(out *DMClusterList)

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

func (*DMClusterList) DeepCopyObject added in v1.2.0

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

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

type DMClusterSpec added in v1.2.0

type DMClusterSpec struct {
	// Discovery spec
	Discovery DMDiscoverySpec `json:"discovery"`

	// dm-master cluster spec
	// +optional
	Master MasterSpec `json:"master"`

	// dm-worker cluster spec
	// +optional
	Worker *WorkerSpec `json:"worker,omitempty"`

	// Indicates that the dm cluster is paused and will not be processed by
	// the controller.
	// +optional
	Paused bool `json:"paused,omitempty"`

	// dm cluster version
	// +optional
	Version string `json:"version"`

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

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

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

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

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

	// Whether enable the TLS connection between DM server components
	// Optional: Defaults to nil
	// +optional
	TLSCluster *TLSCluster `json:"tlsCluster,omitempty"`

	// TLSClientSecretNames are the names of secrets which stores mysql/tidb server client certificates
	// that used by dm-master and dm-worker.
	// +optional
	TLSClientSecretNames []string `json:"tlsClientSecretNames,omitempty"`

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

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

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

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

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

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

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

+k8s:openapi-gen=true DMClusterSpec describes the attributes that a user creates on a dm cluster

func (*DMClusterSpec) DeepCopy added in v1.2.0

func (in *DMClusterSpec) DeepCopy() *DMClusterSpec

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

func (*DMClusterSpec) DeepCopyInto added in v1.2.0

func (in *DMClusterSpec) DeepCopyInto(out *DMClusterSpec)

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

type DMClusterStatus added in v1.2.0

type DMClusterStatus struct {
	Master MasterStatus `json:"master,omitempty"`
	Worker WorkerStatus `json:"worker,omitempty"`

	// Represents the latest available observations of a dm cluster's state.
	// +optional
	Conditions []DMClusterCondition `json:"conditions,omitempty"`
}

DMClusterStatus represents the current status of a dm cluster.

func (*DMClusterStatus) DeepCopy added in v1.2.0

func (in *DMClusterStatus) DeepCopy() *DMClusterStatus

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

func (*DMClusterStatus) DeepCopyInto added in v1.2.0

func (in *DMClusterStatus) DeepCopyInto(out *DMClusterStatus)

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

type DMDiscoverySpec added in v1.2.0

type DMDiscoverySpec struct {
	// Address indicates the existed TiDB discovery address
	Address string `json:"address"`
}

+k8s:openapi-gen=true DMDiscoverySpec contains details of Discovery members for dm

func (*DMDiscoverySpec) DeepCopy added in v1.2.0

func (in *DMDiscoverySpec) DeepCopy() *DMDiscoverySpec

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

func (*DMDiscoverySpec) DeepCopyInto added in v1.2.0

func (in *DMDiscoverySpec) DeepCopyInto(out *DMDiscoverySpec)

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

type DMMonitorSpec added in v1.2.0

type DMMonitorSpec struct {
	Clusters    []ClusterRef    `json:"clusters"`
	Initializer InitializerSpec `json:"initializer"`
}

func (*DMMonitorSpec) DeepCopy added in v1.2.0

func (in *DMMonitorSpec) DeepCopy() *DMMonitorSpec

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

func (*DMMonitorSpec) DeepCopyInto added in v1.2.0

func (in *DMMonitorSpec) DeepCopyInto(out *DMMonitorSpec)

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

type DMSecurityConfig added in v1.2.0

type DMSecurityConfig struct {
	// SSLCA is the path of file that contains list of trusted SSL CAs.
	// +optional
	SSLCA *string `toml:"ssl-ca,omitempty" json:"ssl-ca,omitempty" yaml:"ssl-ca,omitempty"`
	// SSLCert is the path of file that contains X509 certificate in PEM format.
	// +optional
	SSLCert *string `toml:"ssl-cert,omitempty" json:"ssl-cert,omitempty" yaml:"ssl-cert,omitempty"`
	// SSLKey is the path of file that contains X509 key in PEM format.
	// +optional
	SSLKey *string `toml:"ssl-key,omitempty" json:"ssl-key,omitempty" yaml:"ssl-key,omitempty"`
	// CertAllowedCN is the Common Name that allowed
	// +optional
	CertAllowedCN []string `toml:"cert-allowed-cn,omitempty" json:"cert-allowed-cn,omitempty" yaml:"cert-allowed-cn,omitempty"`
}

DM common security config

func (*DMSecurityConfig) DeepCopy added in v1.2.0

func (in *DMSecurityConfig) DeepCopy() *DMSecurityConfig

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

func (*DMSecurityConfig) DeepCopyInto added in v1.2.0

func (in *DMSecurityConfig) DeepCopyInto(out *DMSecurityConfig)

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

type DashboardConfig

type DashboardConfig struct {
	// +optional
	TiDBCAPath *string `toml:"tidb-cacert-path,omitempty" json:"tidb-cacert-path,omitempty"`
	// +optional
	TiDBCertPath *string `toml:"tidb-cert-path,omitempty" json:"tidb-cert-path,omitempty"`
	// +optional
	TiDBKeyPath *string `toml:"tidb-key-path,omitempty" json:"tidb-key-path,omitempty"`
	// +optional
	PublicPathPrefix *string `toml:"public-path-prefix,omitempty" json:"public-path-prefix,omitempty"`
	// +optional
	InternalProxy *bool `toml:"internal-proxy,omitempty" json:"internal-proxy,omitempty"`
	// When not disabled, usage data will be sent to PingCAP for improving user experience.
	// Optional: Defaults to false
	// +optional
	//+k8s:openapi-gen=false
	// Deprecated in PD v4.0.3, use EnableTelemetry instead
	DisableTelemetry *bool `toml:"disable-telemetry,omitempty" json:"disable-telemetry,omitempty"`
	// When enabled, usage data will be sent to PingCAP for improving user experience.
	// Optional: Defaults to true
	// +optional
	EnableTelemetry *bool `toml:"enable-telemetry,omitempty" json:"enable-telemetry,omitempty" default:"true"`
	// When enabled, experimental TiDB Dashboard features will be available.
	// These features are incomplete or not well tested. Suggest not to enable in
	// production.
	// Optional: Defaults to false
	// +optional
	EnableExperimental *bool `toml:"enable-experimental,omitempty" json:"enable-experimental,omitempty"`
}

DashboardConfig is the configuration for tidb-dashboard. +k8s:openapi-gen=true

func (*DashboardConfig) DeepCopy

func (in *DashboardConfig) DeepCopy() *DashboardConfig

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

func (*DashboardConfig) DeepCopyInto

func (in *DashboardConfig) DeepCopyInto(out *DashboardConfig)

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 DeploymentStorageStatus added in v1.2.0

type DeploymentStorageStatus struct {
	// PV name
	PvName string `json:"pvName,omitempty"`
}

DeploymentStorageStatus is the storage information of the deployment

func (*DeploymentStorageStatus) DeepCopy added in v1.2.0

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

func (*DeploymentStorageStatus) DeepCopyInto added in v1.2.0

func (in *DeploymentStorageStatus) DeepCopyInto(out *DeploymentStorageStatus)

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

type DiscoverySpec added in v1.1.1

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

+k8s:openapi-gen=true DiscoverySpec contains details of Discovery members

func (*DiscoverySpec) DeepCopy added in v1.1.1

func (in *DiscoverySpec) DeepCopy() *DiscoverySpec

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

func (*DiscoverySpec) DeepCopyInto added in v1.1.1

func (in *DiscoverySpec) DeepCopyInto(out *DiscoverySpec)

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

type DumplingConfig added in v1.1.3

type DumplingConfig struct {
	// Options means options for backup data to remote storage with dumpling.
	Options []string `json:"options,omitempty"`
	// Deprecated. Please use `Spec.TableFilter` instead. TableFilter means Table filter expression for 'db.table' matching
	TableFilter []string `json:"tableFilter,omitempty"`
}

+k8s:openapi-gen=true DumplingConfig contains config for dumpling

func (*DumplingConfig) DeepCopy added in v1.1.3

func (in *DumplingConfig) DeepCopy() *DumplingConfig

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

func (*DumplingConfig) DeepCopyInto added in v1.1.3

func (in *DumplingConfig) DeepCopyInto(out *DumplingConfig)

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

type Experimental

type Experimental struct {
	// Whether enable the syntax like `auto_random(3)` on the primary key column.
	// Imported from TiDB v3.1.0.
	// Deprecated in TiDB v4.0.3, please check detail in https://docs.pingcap.com/tidb/dev/release-4.0.3#improvements.
	// +optional
	AllowAutoRandom *bool `toml:"allow-auto-random,omitempty" json:"allow-auto-random,omitempty"`
	// Whether enable creating expression index.
	// +optional
	AllowsExpressionIndex *bool `toml:"allow-expression-index,omitempty" json:"allow-expression-index,omitempty"`
}

Experimental controls the features that are still experimental: their semantics, interfaces are subject to change. Using these features in the production environment is not recommended. +k8s:openapi-gen=true

func (*Experimental) DeepCopy

func (in *Experimental) DeepCopy() *Experimental

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

func (*Experimental) DeepCopyInto

func (in *Experimental) DeepCopyInto(out *Experimental)

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

type ExternalConfig added in v1.2.0

type ExternalConfig struct {
	// ExternalEndpoint makes the auto-scaler controller able to query the
	// external service to fetch the recommended replicas for TiKV/TiDB
	// +optional
	Endpoint ExternalEndpoint `json:"endpoint"`
	// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale out.
	MaxReplicas int32 `json:"maxReplicas"`
}

+k8s:openapi-gen=true ExternalConfig represents the external config.

func (*ExternalConfig) DeepCopy added in v1.2.0

func (in *ExternalConfig) DeepCopy() *ExternalConfig

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

func (*ExternalConfig) DeepCopyInto added in v1.2.0

func (in *ExternalConfig) DeepCopyInto(out *ExternalConfig)

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

type ExternalEndpoint

type ExternalEndpoint struct {
	// Host indicates the external service's host
	Host string `json:"host"`
	// Port indicates the external service's port
	Port int32 `json:"port"`
	// Path indicates the external service's path
	Path string `json:"path"`
	// TLSSecret indicates the Secret which stores the TLS configuration. If set, the operator will use https
	// to communicate to the external service
	// +optional
	TLSSecret *SecretRef `json:"tlsSecret,omitempty"`
}

+k8s:openapi-gen=true ExternalEndpoint describes the external service endpoint which provides the ability to get the tikv/tidb auto-scaling recommended replicas

func (*ExternalEndpoint) DeepCopy

func (in *ExternalEndpoint) DeepCopy() *ExternalEndpoint

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

func (*ExternalEndpoint) DeepCopyInto

func (in *ExternalEndpoint) DeepCopyInto(out *ExternalEndpoint)

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

type FileLogConfig

type FileLogConfig struct {
	// Log filename, leave empty to disable file log.
	// +optional
	Filename *string `toml:"filename,omitempty" json:"filename,omitempty"`
	// Deprecated in v4.0.0
	// Is log rotate enabled.
	// +optional
	LogRotate *bool `toml:"log-rotate,omitempty" json:"log-rotate,omitempty"`
	// Max size for a single file, in MB.
	// +optional
	MaxSize *int `toml:"max-size,omitempty" json:"max-size,omitempty"`
	// Max log keep days, default is never deleting.
	// +optional
	MaxDays *int `toml:"max-days,omitempty" json:"max-days,omitempty"`
	// Maximum number of old log files to retain.
	// +optional
	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 Flash

type Flash struct {
	// +optional
	// +k8s:openapi-gen=false
	TiDBStatusAddr *string `json:"tidb_status_addr,omitempty" toml:"tidb_status_addr,omitempty"`
	// +optional
	// +k8s:openapi-gen=false
	ServiceAddr *string `json:"service_addr,omitempty" toml:"service_addr,omitempty"`
	// Optional: Defaults to 0.6
	// +optional
	OverlapThreshold *float64 `json:"overlap_threshold,omitempty" toml:"overlap_threshold,omitempty"`
	// Optional: Defaults to 200
	// +optional
	CompactLogMinPeriod *int32 `json:"compact_log_min_period,omitempty" toml:"compact_log_min_period,omitempty"`
	// +optional
	FlashCluster *FlashCluster `json:"flash_cluster,omitempty" toml:"flash_cluster,omitempty"`
	// +optional
	FlashProxy *FlashProxy `json:"proxy,omitempty" toml:"proxy,omitempty"`
}

Flash is the configuration of [flash] section. +k8s:openapi-gen=true

func (*Flash) DeepCopy

func (in *Flash) DeepCopy() *Flash

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

func (*Flash) DeepCopyInto

func (in *Flash) DeepCopyInto(out *Flash)

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

type FlashApplication

type FlashApplication struct {
	// Optional: Defaults to true
	// +optional
	RunAsDaemon *bool `json:"runAsDaemon,omitempty" toml:"runAsDaemon,omitempty"`
}

FlashApplication is the configuration of [application] section. +k8s:openapi-gen=false

func (*FlashApplication) DeepCopy

func (in *FlashApplication) DeepCopy() *FlashApplication

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

func (*FlashApplication) DeepCopyInto

func (in *FlashApplication) DeepCopyInto(out *FlashApplication)

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

type FlashCluster

type FlashCluster struct {
	// Optional: Defaults to /tiflash/flash_cluster_manager
	// +optional
	// +k8s:openapi-gen=false
	ClusterManagerPath *string `json:"cluster_manager_path,omitempty" toml:"cluster_manager_path,omitempty"`
	// Optional: Defaults to /data0/logs/flash_cluster_manager.log
	// +optional
	ClusterLog *string `json:"log,omitempty" toml:"log,omitempty"`
	// Optional: Defaults to 20
	// +optional
	RefreshInterval *int32 `json:"refresh_interval,omitempty" toml:"refresh_interval,omitempty"`
	// Optional: Defaults to 10
	// +optional
	UpdateRuleInterval *int32 `json:"update_rule_interval,omitempty" toml:"update_rule_interval,omitempty"`
	// Optional: Defaults to 60
	// +optional
	MasterTTL *int32 `json:"master_ttl,omitempty" toml:"master_ttl,omitempty"`
}

FlashCluster is the configuration of [flash.flash_cluster] section. +k8s:openapi-gen=true

func (*FlashCluster) DeepCopy

func (in *FlashCluster) DeepCopy() *FlashCluster

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

func (*FlashCluster) DeepCopyInto

func (in *FlashCluster) DeepCopyInto(out *FlashCluster)

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

type FlashLogger

type FlashLogger struct {
	// Optional: Defaults to /data0/logs/error.log
	// +optional
	ErrorLog *string `json:"errorlog,omitempty" toml:"errorlog,omitempty"`
	// Optional: Defaults to 100M
	// +optional
	Size *string `json:"size,omitempty" toml:"size,omitempty"`
	// Optional: Defaults to /data0/logs/server.log
	// +optional
	ServerLog *string `json:"log,omitempty" toml:"log,omitempty"`
	// Optional: Defaults to information
	// +optional
	Level *string `json:"level,omitempty" toml:"level,omitempty"`
	// Optional: Defaults to 10
	// +optional
	Count *int32 `json:"count,omitempty" toml:"count,omitempty"`
}

FlashLogger is the configuration of [logger] section. +k8s:openapi-gen=true

func (*FlashLogger) DeepCopy

func (in *FlashLogger) DeepCopy() *FlashLogger

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

func (*FlashLogger) DeepCopyInto

func (in *FlashLogger) DeepCopyInto(out *FlashLogger)

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

type FlashProfile

type FlashProfile struct {
	// +optional
	Readonly *Profile `json:"readonly,omitempty" toml:"readonly,omitempty"`
	// +optional
	Default *Profile `json:"default,omitempty" toml:"default,omitempty"`
}

FlashProfile is the configuration of [profiles] section. +k8s:openapi-gen=false

func (*FlashProfile) DeepCopy

func (in *FlashProfile) DeepCopy() *FlashProfile

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

func (*FlashProfile) DeepCopyInto

func (in *FlashProfile) DeepCopyInto(out *FlashProfile)

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

type FlashProxy

type FlashProxy struct {
	// Optional: Defaults to 0.0.0.0:20170
	// +optional
	Addr *string `json:"addr,omitempty" toml:"addr,omitempty"`
	// Optional: Defaults to {clusterName}-tiflash-POD_NUM.{clusterName}-tiflash-peer.{namespace}:20170
	// +optional
	AdvertiseAddr *string `json:"advertise-addr,omitempty" toml:"advertise-addr,omitempty"`
	// Optional: Defaults to /data0/proxy
	// +optional
	DataDir *string `json:"data-dir,omitempty" toml:"data-dir,omitempty"`
	// Optional: Defaults to /data0/proxy.toml
	// +optional
	Config *string `json:"config,omitempty" toml:"config,omitempty"`
	// Optional: Defaults to /data0/logs/proxy.log
	// +optional
	LogFile *string `json:"log-file,omitempty" toml:"log-file,omitempty"`
}

FlashProxy is the configuration of [flash.proxy] section. +k8s:openapi-gen=true

func (*FlashProxy) DeepCopy

func (in *FlashProxy) DeepCopy() *FlashProxy

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

func (*FlashProxy) DeepCopyInto

func (in *FlashProxy) DeepCopyInto(out *FlashProxy)

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

type FlashQuota

type FlashQuota struct {
	// +optional
	Default *Quota `json:"default,omitempty" toml:"default,omitempty"`
}

FlashQuota is the configuration of [quotas] section. +k8s:openapi-gen=false

func (*FlashQuota) DeepCopy

func (in *FlashQuota) DeepCopy() *FlashQuota

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

func (*FlashQuota) DeepCopyInto

func (in *FlashQuota) DeepCopyInto(out *FlashQuota)

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

type FlashRaft

type FlashRaft struct {
	// +optional
	PDAddr *string `json:"pd_addr,omitempty" toml:"pd_addr,omitempty"`
	// Optional: Defaults to /data0/kvstore
	// +optional
	KVStorePath *string `json:"kvstore_path,omitempty" toml:"kvstore_path,omitempty"`
	// Optional: Defaults to dt
	// +optional
	StorageEngine *string `json:"storage_engine,omitempty" toml:"storage_engine,omitempty"`
}

FlashRaft is the configuration of [raft] section. +k8s:openapi-gen=false

func (*FlashRaft) DeepCopy

func (in *FlashRaft) DeepCopy() *FlashRaft

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

func (*FlashRaft) DeepCopyInto

func (in *FlashRaft) DeepCopyInto(out *FlashRaft)

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

type FlashSecurity added in v1.1.4

type FlashSecurity struct {
	// +k8s:openapi-gen=false
	// Be set automatically by Operator
	// +optional
	CAPath *string `json:"ca_path,omitempty" toml:"ca_path,omitempty"`
	// +k8s:openapi-gen=false
	// Be set automatically by Operator
	// +optional
	CertPath *string `json:"cert_path,omitempty" toml:"cert_path,omitempty"`
	// +k8s:openapi-gen=false
	// Be set automatically by Operator
	// +optional
	KeyPath *string `json:"key_path,omitempty" toml:"key_path,omitempty"`
	// CertAllowedCN is the Common Name that allowed
	// +optional
	CertAllowedCN []string `json:"cert_allowed_cn,omitempty" toml:"cert_allowed_cn,omitempty"`
}

+k8s:openapi-gen=true

func (*FlashSecurity) DeepCopy added in v1.1.4

func (in *FlashSecurity) DeepCopy() *FlashSecurity

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

func (*FlashSecurity) DeepCopyInto added in v1.1.4

func (in *FlashSecurity) DeepCopyInto(out *FlashSecurity)

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

type FlashServerConfig

type FlashServerConfig struct {
	// Default to {clusterName}-tiflash-POD_NUM.{clusterName}-tiflash-peer.{namespace}:3930
	// +optional
	EngineAddr *string `json:"engine-addr,omitempty" toml:"engine-addr,omitempty"`
	// Default to 0.0.0.0:20292
	// +optional
	StatusAddr *string `json:"status-addr,omitempty" toml:"status-addr,omitempty"`
	// Default to {clusterName}-tiflash-POD_NUM.{clusterName}-tiflash-peer.{namespace}:20292
	// +optional
	AdvertiseStatusAddr *string `json:"advertise-status-addr,omitempty" toml:"advertise-status-addr,omitempty"`
	TiKVServerConfig    `json:",inline"`
}

FlashServerConfig is the configuration of Proxy server. +k8s:openapi-gen=true

func (*FlashServerConfig) DeepCopy

func (in *FlashServerConfig) DeepCopy() *FlashServerConfig

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

func (*FlashServerConfig) DeepCopyInto

func (in *FlashServerConfig) DeepCopyInto(out *FlashServerConfig)

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

type FlashStatus

type FlashStatus struct {
	// Optional: Defaults to 8234
	// +optional
	MetricsPort *int32 `json:"metrics_port,omitempty" toml:"metrics_port,omitempty"`
}

FlashStatus is the configuration of [status] section. +k8s:openapi-gen=false

func (*FlashStatus) DeepCopy

func (in *FlashStatus) DeepCopy() *FlashStatus

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

func (*FlashStatus) DeepCopyInto

func (in *FlashStatus) DeepCopyInto(out *FlashStatus)

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

type FlashUser

type FlashUser struct {
	// +optional
	Readonly *User `json:"readonly,omitempty" toml:"readonly,omitempty"`
	Default  *User `json:"default,omitempty" toml:"default,omitempty"`
}

FlashUser is the configuration of [users] section. +k8s:openapi-gen=false

func (*FlashUser) DeepCopy

func (in *FlashUser) DeepCopy() *FlashUser

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

func (*FlashUser) DeepCopyInto

func (in *FlashUser) DeepCopyInto(out *FlashUser)

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,omitempty"`
	// Prefix of the data path.
	Prefix string `json:"prefix,omitempty"`
}

+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"`

	// +optional
	Ingress *IngressSpec `json:"ingress,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"`
}

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

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 IngressSpec

type IngressSpec struct {
	// Hosts describe the hosts for the ingress
	Hosts []string `json:"hosts"`
	// Annotations describe the desired annotations for the ingress
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// TLS configuration. Currently the Ingress only supports a single TLS
	// port, 443. If multiple members of this list specify different hosts, they
	// will be multiplexed on the same port according to the hostname specified
	// through the SNI TLS extension, if the ingress controller fulfilling the
	// ingress supports SNI.
	// +optional
	TLS []extensionsv1beta1.IngressTLS `json:"tls,omitempty"`
}

+k8s:openapi-gen=true IngressSpec describe the ingress desired state for the target component

func (*IngressSpec) DeepCopy

func (in *IngressSpec) DeepCopy() *IngressSpec

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

func (*IngressSpec) DeepCopyInto

func (in *IngressSpec) DeepCopyInto(out *IngressSpec)

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 Interval

type Interval struct {
	// Optional: Defaults to 3600
	// +optional
	Duration *int32 `json:"duration,omitempty" toml:"duration,omitempty"`
	// Optional: Defaults to 0
	// +optional
	Queries *int32 `json:"queries,omitempty" toml:"queries,omitempty"`
	// Optional: Defaults to 0
	// +optional
	Errors *int32 `json:"errors,omitempty" toml:"errors,omitempty"`
	// Optional: Defaults to 0
	// +optional
	ResultRows *int32 `json:"result_rows,omitempty" toml:"result_rows,omitempty"`
	// Optional: Defaults to 0
	// +optional
	ReadRows *int32 `json:"read_rows,omitempty" toml:"read_rows,omitempty"`
	// Optional: Defaults to 0
	// +optional
	ExecutionTime *int32 `json:"execution_time,omitempty" toml:"execution_time,omitempty"`
}

Interval is the configuration of [quotas.default.interval] section. +k8s:openapi-gen=false

func (*Interval) DeepCopy

func (in *Interval) DeepCopy() *Interval

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

func (*Interval) DeepCopyInto

func (in *Interval) DeepCopyInto(out *Interval)

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

type IsolationRead

type IsolationRead struct {
	// Engines filters tidb-server access paths by engine type.
	// imported from v3.1.0
	// +optional
	Engines []string `toml:"engines,omitempty" json:"engines,omitempty"`
}

IsolationRead is the config for isolation read. +k8s:openapi-gen=true

func (*IsolationRead) DeepCopy

func (in *IsolationRead) DeepCopy() *IsolationRead

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

func (*IsolationRead) DeepCopyInto

func (in *IsolationRead) DeepCopyInto(out *IsolationRead)

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

type LocalStorageProvider added in v1.1.8

type LocalStorageProvider struct {
	Volume      corev1.Volume      `json:"volume"`
	VolumeMount corev1.VolumeMount `json:"volumeMount"`
	Prefix      string             `json:"prefix,omitempty"`
}

LocalStorageProvider defines local storage options, which can be any k8s supported mounted volume

func (*LocalStorageProvider) DeepCopy added in v1.1.8

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

func (*LocalStorageProvider) DeepCopyInto added in v1.1.8

func (in *LocalStorageProvider) DeepCopyInto(out *LocalStorageProvider)

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"`
	// Deprecated in v3.0.5. Use EnableTimestamp instead
	// Disable automatic timestamps in output.
	// +optional
	DisableTimestamp *bool `toml:"disable-timestamp,omitempty" json:"disable-timestamp,omitempty"`
	// EnableTimestamp enables automatic timestamps in log output.
	// +optional
	EnableTimestamp *bool `toml:"enable-timestamp,omitempty" json:"enable-timestamp,omitempty"`
	// EnableErrorStack enables annotating logs with the full stack error
	// message.
	// +optional
	EnableErrorStack *bool `toml:"enable-error-stack,omitempty" json:"enable-error-stack,omitempty"`
	// File log config.
	// +optional
	File *FileLogConfig `toml:"file,omitempty" json:"file,omitempty"`
	// +optional
	EnableSlowLog *bool `toml:"enable-slow-log,omitempty" json:"enable-slow-log,omitempty"`
	// +optional
	SlowQueryFile *string `toml:"slow-query-file,omitempty" json:"slow-query-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 LogTailerSpec

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

LogTailerSpec represents an optional log tailer sidecar container +k8s:openapi-gen=true

func (*LogTailerSpec) DeepCopy

func (in *LogTailerSpec) DeepCopy() *LogTailerSpec

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

func (*LogTailerSpec) DeepCopyInto

func (in *LogTailerSpec) DeepCopyInto(out *LogTailerSpec)

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

type MasterConfig added in v1.2.0

type MasterConfig struct {
	// Log level.
	// Optional: Defaults to info
	// +optional
	LogLevel *string `toml:"log-level,omitempty" json:"log-level,omitempty"`
	// File log config.
	// +optional
	LogFile *string `toml:"log-file,omitempty" json:"log-file,omitempty"`
	// Log format. one of json or text.
	// +optional
	LogFormat *string `toml:"log-format,omitempty" json:"log-format,omitempty"`

	// RPC timeout when dm-master request to dm-worker
	// Optional: Defaults to 30s
	// +optional
	RPCTimeoutStr *string `toml:"rpc-timeout,omitempty" json:"rpc-timeout,omitempty"`
	// RPC agent rate limit when dm-master request to dm-worker
	// Optional: Defaults to 10
	// +optional
	RPCRateLimit *float64 `toml:"rpc-rate-limit,omitempty" json:"rpc-rate-limit,omitempty"`
	// RPC agent rate burst when dm-master request to dm-worker
	// Optional: Defaults to 40
	// +optional
	RPCRateBurst *int `toml:"rpc-rate-burst,omitempty" json:"rpc-rate-burst,omitempty"`
	// dm-master's security config
	// +optional
	// +k8s:openapi-gen=false
	DMSecurityConfig `toml:",inline" json:",inline"`
}

MasterConfig is the configuration of dm-master-server +k8s:openapi-gen=true

func (*MasterConfig) DeepCopy added in v1.2.0

func (in *MasterConfig) DeepCopy() *MasterConfig

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

func (*MasterConfig) DeepCopyInto added in v1.2.0

func (in *MasterConfig) DeepCopyInto(out *MasterConfig)

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

type MasterFailureMember added in v1.2.0

type MasterFailureMember 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"`
}

MasterFailureMember is the dm-master failure member information

func (*MasterFailureMember) DeepCopy added in v1.2.0

func (in *MasterFailureMember) DeepCopy() *MasterFailureMember

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

func (*MasterFailureMember) DeepCopyInto added in v1.2.0

func (in *MasterFailureMember) DeepCopyInto(out *MasterFailureMember)

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

type MasterKeyFileConfig

type MasterKeyFileConfig struct {
	// Encrypyion method, use master key encryption data key
	// Possible values: plaintext, aes128-ctr, aes192-ctr, aes256-ctr
	// Optional: Default to plaintext
	// optional
	Method *string `json:"method,omitempty" toml:"method,omitempty"`

	// Text file containing the key in hex form, end with '\n'
	Path *string `json:"path" toml:"path"`
}

+k8s:openapi-gen=true

func (*MasterKeyFileConfig) DeepCopy

func (in *MasterKeyFileConfig) DeepCopy() *MasterKeyFileConfig

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

func (*MasterKeyFileConfig) DeepCopyInto

func (in *MasterKeyFileConfig) DeepCopyInto(out *MasterKeyFileConfig)

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

type MasterKeyKMSConfig

type MasterKeyKMSConfig struct {
	// AWS CMK key-id it can be find in AWS Console or use aws cli
	// This field is required
	KeyID *string `json:"key-id" toml:"key-id"`

	// AccessKey of AWS user, leave empty if using other authrization method
	// optional
	AccessKey *string `json:"access-key,omitempty" toml:"access-key,omitempty"`

	// SecretKey of AWS user, leave empty if using other authrization method
	// optional
	SecretKey *string `json:"secret-access-key,omitempty" toml:"secret-access-key,omitempty"`

	// Region of this KMS key
	// Optional: Default to us-east-1
	// optional
	Region *string `json:"region,omitempty" toml:"region,omitempty"`

	// Used for KMS compatible KMS, such as Ceph, minio, If use AWS, leave empty
	// optional
	Endpoint *string `json:"endpoint,omitempty" toml:"endpoint,omitempty"`
}

+k8s:openapi-gen=true

func (*MasterKeyKMSConfig) DeepCopy

func (in *MasterKeyKMSConfig) DeepCopy() *MasterKeyKMSConfig

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

func (*MasterKeyKMSConfig) DeepCopyInto

func (in *MasterKeyKMSConfig) DeepCopyInto(out *MasterKeyKMSConfig)

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

type MasterMember added in v1.2.0

type MasterMember 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"`
}

MasterMember is dm-master member status

func (*MasterMember) DeepCopy added in v1.2.0

func (in *MasterMember) DeepCopy() *MasterMember

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

func (*MasterMember) DeepCopyInto added in v1.2.0

func (in *MasterMember) DeepCopyInto(out *MasterMember)

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

type MasterServiceSpec added in v1.2.0

type MasterServiceSpec struct {
	ServiceSpec `json:",inline"`

	// ExternalTrafficPolicy of the service
	// Optional: Defaults to omitted
	// +optional
	ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` // Expose the tidb cluster mysql port to MySQLNodePort

	// Optional: Defaults to 0
	// +optional
	MasterNodePort *int `json:"masterNodePort,omitempty"`
}

func (*MasterServiceSpec) DeepCopy added in v1.2.0

func (in *MasterServiceSpec) DeepCopy() *MasterServiceSpec

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

func (*MasterServiceSpec) DeepCopyInto added in v1.2.0

func (in *MasterServiceSpec) DeepCopyInto(out *MasterServiceSpec)

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

func (*MasterServiceSpec) GetMasterNodePort added in v1.2.0

func (masterSvc *MasterServiceSpec) GetMasterNodePort() int32

type MasterSpec added in v1.2.0

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

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

	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/dm
	// +optional
	BaseImage string `json:"baseImage,omitempty"`

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

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

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

	// StorageSize is the request storage size for dm-master.
	// Defaults to "10Gi".
	// +optional
	StorageSize string `json:"storageSize,omitempty"`

	// Subdirectory within the volume to store dm-master Data. By default, the data
	// is stored in the root directory of volume which is mounted at
	// /var/lib/dm-master.
	// Specifying this will change the data directory to a subdirectory, e.g.
	// /var/lib/dm-master/data if you set the value to "data".
	// It's dangerous to change this value for a running cluster as it will
	// upgrade your cluster to use a new storage directory.
	// Defaults to "" (volume's root).
	// +optional
	DataSubDir string `json:"dataSubDir,omitempty"`

	// Config is the Configuration of dm-master-servers
	// +optional
	Config *MasterConfig `json:"config,omitempty"`
}

+k8s:openapi-gen=true MasterSpec contains details of dm-master members

func (*MasterSpec) DeepCopy added in v1.2.0

func (in *MasterSpec) DeepCopy() *MasterSpec

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

func (*MasterSpec) DeepCopyInto added in v1.2.0

func (in *MasterSpec) DeepCopyInto(out *MasterSpec)

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

type MasterStatus added in v1.2.0

type MasterStatus struct {
	Synced          bool                           `json:"synced,omitempty"`
	Phase           MemberPhase                    `json:"phase,omitempty"`
	StatefulSet     *apps.StatefulSetStatus        `json:"statefulSet,omitempty"`
	Members         map[string]MasterMember        `json:"members,omitempty"`
	Leader          MasterMember                   `json:"leader,omitempty"`
	FailureMembers  map[string]MasterFailureMember `json:"failureMembers,omitempty"`
	UnjoinedMembers map[string]UnjoinedMember      `json:"unjoinedMembers,omitempty"`
	Image           string                         `json:"image,omitempty"`
}

MasterStatus is dm-master status

func (*MasterStatus) DeepCopy added in v1.2.0

func (in *MasterStatus) DeepCopy() *MasterStatus

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

func (*MasterStatus) DeepCopyInto added in v1.2.0

func (in *MasterStatus) DeepCopyInto(out *MasterStatus)

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"
	// ScalePhase represents the scaling state of TiDB cluster.
	ScalePhase MemberPhase = "Scale"
)

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"
	// TiFlashMemberType is tiflash container type
	TiFlashMemberType MemberType = "tiflash"
	// TiCDCMemberType is ticdc container type
	TiCDCMemberType MemberType = "ticdc"
	// DMMasterMemberType is dm-master container type
	DMMasterMemberType MemberType = "dm-master"
	// DMWorkerMemberType is dm-worker container type
	DMWorkerMemberType MemberType = "dm-worker"
	// SlowLogTailerMemberType is tidb log tailer container type
	SlowLogTailerMemberType MemberType = "slowlog"
	// TidbMonitorMemberType is tidbmonitor type
	TidbMonitorMemberType MemberType = "tidbmonitor"
	// 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 {
	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 Networks

type Networks struct {
	// +optional
	IP *string `json:"ip,omitempty" toml:"ip,omitempty"`
}

Networks is the configuration of [users.readonly.networks] section. +k8s:openapi-gen=false

func (*Networks) DeepCopy

func (in *Networks) DeepCopy() *Networks

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

func (*Networks) DeepCopyInto

func (in *Networks) DeepCopyInto(out *Networks)

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"`

	// set different tokens to prevent communication between PDs in different clusters.
	// +optional
	InitialClusterToken *string `toml:"initial-cluster-token,omitempty" json:"initial-cluster-token,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"`

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

	// +optional
	Dashboard *DashboardConfig `toml:"dashboard,omitempty" json:"dashboard,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 PDConfigWraper added in v1.1.6

type PDConfigWraper struct {
	*config.GenericConfig
}

func NewPDConfig added in v1.1.6

func NewPDConfig() *PDConfigWraper

func (*PDConfigWraper) DeepCopy added in v1.1.6

func (in *PDConfigWraper) DeepCopy() *PDConfigWraper

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

func (*PDConfigWraper) DeepCopyInto added in v1.1.6

func (in *PDConfigWraper) DeepCopyInto(out *PDConfigWraper)

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

func (*PDConfigWraper) MarshalJSON added in v1.1.6

func (c *PDConfigWraper) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler interface.

func (*PDConfigWraper) MarshalTOML added in v1.1.6

func (c *PDConfigWraper) MarshalTOML() ([]byte, error)

func (*PDConfigWraper) UnmarshalJSON added in v1.1.6

func (c *PDConfigWraper) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler interface. If the data is a object, we must use the Deprecated PDConfig to Unmarshal for compatibility, if we use a map[string]interface{} to Unmarshal directly, we can not distinct the type between integer and float for toml.

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 []string `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.
	// Imported from v3.1.0
	// +optional
	StrictlyMatchLabel *bool `toml:"strictly-match-label,omitempty" json:"strictly-match-label,omitempty"`

	// When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not used anymore.
	// +optional
	EnablePlacementRules *bool `toml:"enable-placement-rules" json:"enable-placement-rules,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.
	// Imported from v3.1.0
	// +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.
	// Imported from v3.1.0
	// +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,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,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,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,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,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,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,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

	// Only used to display
	// +optional
	SchedulersPayload map[string]string `toml:"schedulers-payload,omitempty" json:"schedulers-payload,omitempty"`

	// EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it.
	// Imported from v3.1.0
	// +optional
	EnableOneWayMerge *bool `toml:"enable-one-way-merge,omitempty" json:"enable-one-way-merge,omitempty"`
	// EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs.
	// This option only works when key type is "table".
	// Imported from v3.1.0
	// +optional
	EnableCrossTableMerge *bool `toml:"enable-cross-table-merge,omitempty" json:"enable-cross-table-merge,omitempty"`
}

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.
	// +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"`
	// CertAllowedCN is the Common Name that allowed
	// +optional
	// +k8s:openapi-gen=false
	CertAllowedCN []string `toml:"cert-allowed-cn,omitempty" json:"cert-allowed-cn,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,omitempty"`
	// MetricStorage is the cluster metric storage.
	// Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later.
	// Imported from v3.1.0
	// +optional
	MetricStorage *string `toml:"metric-storage,omitempty" json:"metric-storage,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"`

	// Specify a Service Account for pd
	ServiceAccount string `json:"serviceAccount,omitempty"`

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

	// 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"`

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

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

	// StorageVolumes configure additional storage for PD pods.
	// +optional
	StorageVolumes []StorageVolume `json:"storageVolumes,omitempty"`

	// Subdirectory within the volume to store PD Data. By default, the data
	// is stored in the root directory of volume which is mounted at
	// /var/lib/pd.
	// Specifying this will change the data directory to a subdirectory, e.g.
	// /var/lib/pd/data if you set the value to "data".
	// It's dangerous to change this value for a running cluster as it will
	// upgrade your cluster to use a new storage directory.
	// Defaults to "" (volume's root).
	// +optional
	DataSubDir string `json:"dataSubDir,omitempty"`

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

	// TLSClientSecretName is the name of secret which stores tidb server client certificate
	// which used by Dashboard.
	// +optional
	TLSClientSecretName *string `json:"tlsClientSecretName,omitempty"`

	// (Deprecated) EnableDashboardInternalProxy would directly set `internal-proxy` in the `PdConfig`.
	// Note that this is deprecated, we should just set `dashboard.internal-proxy` in `pd.config`.
	// +optional
	EnableDashboardInternalProxy *bool `json:"enableDashboardInternalProxy,omitempty"`

	// MountClusterClientSecret indicates whether to mount `cluster-client-secret` to the Pod
	// +optional
	MountClusterClientSecret *bool `json:"mountClusterClientSecret,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"`
	PeerMembers     map[string]PDMember        `json:"peerMembers,omitempty"`
	Leader          PDMember                   `json:"leader,omitempty"`
	FailureMembers  map[string]PDFailureMember `json:"failureMembers,omitempty"`
	UnjoinedMembers map[string]UnjoinedMember  `json:"unjoinedMembers,omitempty"`
	Image           string                     `json:"image,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 3s
	// +optional
	StatsLease *string `toml:"stats-lease,omitempty" json:"stats-lease,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 512
	// +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 104857600
	// +optional
	TxnTotalSizeLimit *uint64 `toml:"txn-total-size-limit,omitempty" json:"txn-total-size-limit,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 true
	// +optional
	RunAutoAnalyze *bool `toml:"run-auto-analyze,omitempty" json:"run-auto-analyze,omitempty"`
	// +optional
	DistinctAggPushDown *bool `toml:"distinct-agg-push-down,omitempty" json:"agg-push-down-join,omitempty"`
	// +optional
	CommitterConcurrency *int `toml:"committer-concurrency,omitempty" json:"committer-concurrency,omitempty"`
	// +optional
	MaxTxnTTL *uint64 `toml:"max-txn-ttl,omitempty" json:"max-txn-ttl,omitempty"`
	// Deprecated in v4.0.0
	// Optional: Defaults to 300000
	// +optional
	TxnEntryCountLimit *uint64 `toml:"txn-entry-count-limit,omitempty" json:"txn-entry-count-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 Profile

type Profile struct {
	// +optional
	Readonly *int32 `json:"readonly,omitempty" toml:"readonly,omitempty"`
	// +optional
	MaxMemoryUsage *int64 `json:"max_memory_usage,omitempty" toml:"max_memory_usage,omitempty"`
	// +optional
	UseUncompressedCache *int32 `json:"use_uncompressed_cache,omitempty" toml:"use_uncompressed_cache,omitempty"`
	// +optional
	LoadBalancing *string `json:"load_balancing,omitempty" toml:"load_balancing,omitempty"`
}

Profile is the configuration profiles. +k8s:openapi-gen=false

func (*Profile) DeepCopy

func (in *Profile) DeepCopy() *Profile

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

func (*Profile) DeepCopyInto

func (in *Profile) DeepCopyInto(out *Profile)

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

type PrometheusConfiguration added in v1.1.1

type PrometheusConfiguration struct {

	// user can mount prometheus rule config with external configMap.If use this feature, the external configMap must contain `prometheus-config` key in data.
	ConfigMapRef *ConfigMapRef `json:"configMapRef,omitempty"`

	// user can  use it specify prometheus command options
	CommandOptions []string `json:"commandOptions,omitempty"`
}

+k8s:openapi-gen=true Config is the the desired state of Prometheus Configuration

func (*PrometheusConfiguration) DeepCopy added in v1.1.1

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

func (*PrometheusConfiguration) DeepCopyInto added in v1.1.1

func (in *PrometheusConfiguration) DeepCopyInto(out *PrometheusConfiguration)

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"`

	// +optional
	Ingress *IngressSpec `json:"ingress,omitempty"`

	// +optional
	Config *PrometheusConfiguration `json:"config,omitempty"`

	// Disable prometheus compaction.
	DisableCompaction bool `json:"disableCompaction,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 ProxyConfig

type ProxyConfig 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 *FlashServerConfig `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"`
}

ProxyConfig is the configuration of TiFlash proxy process. All the configurations are same with those of TiKV except adding `engine-addr` in the TiKVServerConfig +k8s:openapi-gen=true

func (*ProxyConfig) DeepCopy

func (in *ProxyConfig) DeepCopy() *ProxyConfig

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

func (*ProxyConfig) DeepCopyInto

func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig)

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"`

	// Specify a Service Account for pump
	ServiceAccount string `json:"serviceAccount,omitempty"`

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

	// 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"`

	// The configuration of Pump cluster.
	// +optional
	Config *config.GenericConfig `json:"config,omitempty"`

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

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

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 Quota

type Quota struct {
	// +optional
	Interval *Interval `json:"interval,omitempty" toml:"interval,omitempty"`
}

Quota is the configuration of [quotas.default] section. +k8s:openapi-gen=false

func (*Quota) DeepCopy

func (in *Quota) DeepCopy() *Quota

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

func (*Quota) DeepCopyInto

func (in *Quota) DeepCopyInto(out *Quota)

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 {
	corev1.ResourceRequirements `json:"resources,omitempty"`
	// 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"`
	// TikvGCLifeTime is to specify the safe gc life time for restore.
	// The time limit during which data is retained for each GC, in the format of Go Duration.
	// When a GC happens, the current time minus this value is the safe point.
	TikvGCLifeTime *string `json:"tikvGCLifeTime,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"`
	// Use KMS to decrypt the secrets
	UseKMS bool `json:"useKMS,omitempty"`
	// Specify service account of restore
	ServiceAccount string `json:"serviceAccount,omitempty"`
	// ToolImage specifies the tool image used in `Restore`, which supports BR and TiDB Lightning images.
	// For examples `spec.toolImage: pingcap/br:v4.0.8` or `spec.toolImage: pingcap/tidb-lightning:v4.0.8`
	// +optional
	ToolImage string `json:"toolImage,omitempty"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// TableFilter means Table filter expression for 'db.table' matching. BR supports this from v4.0.3.
	TableFilter []string `json:"tableFilter,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"`
	// CommitTs is the snapshot time point of tidb cluster.
	CommitTs string `json:"commitTs"`
	// Phase is a user readable state inferred from the underlying Restore conditions
	Phase      RestoreConditionType `json:"phase"`
	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,omitempty"`
	// Prefix of the data path.
	Prefix string `json:"prefix,omitempty"`
	// SSE Sever-Side Encryption.
	SSE string `json:"sse,omitempty"`
	// Options Rclone options for backup and restore with mydumper and lightning.
	Options []string `json:"options,omitempty"`
}

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

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 SafeTLSConfig added in v1.1.10

type SafeTLSConfig struct {
	// Struct containing the CA cert to use for the targets.
	CA SecretOrConfigMap `json:"ca,omitempty"`
	// Struct containing the client cert file for the targets.
	Cert SecretOrConfigMap `json:"cert,omitempty"`
	// Secret containing the client key file for the targets.
	KeySecret *corev1.SecretKeySelector `json:"keySecret,omitempty"`
	// Used to verify the hostname for the targets.
	ServerName string `json:"serverName,omitempty"`
	// Disable target certificate validation.
	InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
}

SafeTLSConfig specifies safe TLS configuration parameters. +k8s:openapi-gen=true

func (*SafeTLSConfig) DeepCopy added in v1.1.10

func (in *SafeTLSConfig) DeepCopy() *SafeTLSConfig

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

func (*SafeTLSConfig) DeepCopyInto added in v1.1.10

func (in *SafeTLSConfig) DeepCopyInto(out *SafeTLSConfig)

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

type SecretOrConfigMap added in v1.1.10

type SecretOrConfigMap struct {
	// Secret containing data to use for the targets.
	Secret *corev1.SecretKeySelector `json:"secret,omitempty"`
	// ConfigMap containing data to use for the targets.
	ConfigMap *corev1.ConfigMapKeySelector `json:"configMap,omitempty"`
}

SecretOrConfigMap allows to specify data as a Secret or ConfigMap. Fields are mutually exclusive.

func (*SecretOrConfigMap) DeepCopy added in v1.1.10

func (in *SecretOrConfigMap) DeepCopy() *SecretOrConfigMap

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

func (*SecretOrConfigMap) DeepCopyInto added in v1.1.10

func (in *SecretOrConfigMap) DeepCopyInto(out *SecretOrConfigMap)

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

type SecretRef

type SecretRef struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

+k8s:openapi-gen=true SecretRef indicates to secret ref

func (*SecretRef) DeepCopy

func (in *SecretRef) DeepCopy() *SecretRef

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

func (*SecretRef) DeepCopyInto

func (in *SecretRef) DeepCopyInto(out *SecretRef)

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

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"`
	// ClusterVerifyCN is the Common Name that allowed
	// +optional
	// +k8s:openapi-gen=false
	ClusterVerifyCN []string `toml:"cluster-verify-cn,omitempty" json:"cluster-verify-cn,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"`
}

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

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"`

	// LoadBalancerSourceRanges is the loadBalancerSourceRanges of service
	// If specified and supported by the platform, this will restrict traffic through the cloud-provider
	// load-balancer will be restricted to the specified client IPs. This field will be ignored if the
	// cloud-provider does not support the feature."
	// More info: https://kubernetes.io/docs/concepts/services-networking/service/#aws-nlb-support
	// Optional: Defaults to omitted
	// +optional
	LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
}

ServiceSpec specifies the service object in k8s +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
	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 true
	// +optional
	ReportStatus *bool `toml:"report-status,omitempty" json:"report-status,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 {
	// Enable statement summary or not.
	// +optional
	Enable *bool `toml:"enable,omitempty" json:"enable,omitempty"`
	// Enable summary internal query.
	// +optional
	EnableInternalQuery *bool `toml:"enable-internal-query,omitempty" json:"enable-internal-query,omitempty"`
	// 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"`
	// The refresh interval of statement summary.
	// +optional
	RefreshInterval *int `toml:"refresh-interval,omitempty" json:"refresh-interval,omitempty"`
	// The maximum history size of statement summary.
	// +optional
	HistorySize *int `toml:"history-size,omitempty" json:"history-size,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 StorageClaim

type StorageClaim struct {
	// Resources represents the minimum resources the volume should have.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Name of the StorageClass required by the claim.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`
}

StorageClaim contains details of TiFlash storages +k8s:openapi-gen=true

func (*StorageClaim) DeepCopy

func (in *StorageClaim) DeepCopy() *StorageClaim

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

func (*StorageClaim) DeepCopyInto

func (in *StorageClaim) DeepCopyInto(out *StorageClaim)

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"`
	Local *LocalStorageProvider `json:"local,omitempty"`
}

StorageProvider defines the configuration for storing a backup in backend storage. +k8s:openapi-gen=true

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 StorageVolume added in v1.1.7

type StorageVolume struct {
	Name             string  `json:"name"`
	StorageClassName *string `json:"storageClassName,omitempty"`
	StorageSize      string  `json:"storageSize"`
	MountPath        string  `json:"mountPath"`
}

StorageVolume configures additional storage for PD/TiDB/TiKV pods. If `StorageClassName` not set, default to the `spec.[pd|tidb|tikv].storageClassName`

func (*StorageVolume) DeepCopy added in v1.1.7

func (in *StorageVolume) DeepCopy() *StorageVolume

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

func (*StorageVolume) DeepCopyInto added in v1.1.7

func (in *StorageVolume) DeepCopyInto(out *StorageVolume)

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

type TLSCluster

type TLSCluster struct {
	// Enable mutual TLS connection between TiDB cluster components
	// Once enabled, the mutual authentication applies to all components,
	// and it does not support applying to only part of the components.
	// The steps to enable this feature:
	//   1. Generate TiDB cluster components certificates and a client-side certifiacete for them.
	//      There are multiple ways to generate these certificates:
	//        - user-provided certificates: https://pingcap.com/docs/stable/how-to/secure/generate-self-signed-certificates/
	//        - use the K8s built-in certificate signing system signed certificates: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/
	//        - or use cert-manager signed certificates: https://cert-manager.io/
	//   2. Create one secret object for one component which contains the certificates created above.
	//      The name of this Secret must be: <clusterName>-<componentName>-cluster-secret.
	//        For PD: kubectl create secret generic <clusterName>-pd-cluster-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
	//        For TiKV: kubectl create secret generic <clusterName>-tikv-cluster-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
	//        For TiDB: kubectl create secret generic <clusterName>-tidb-cluster-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
	//        For Client: kubectl create secret generic <clusterName>-cluster-client-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
	//        Same for other components.
	// +optional
	Enabled bool `json:"enabled,omitempty"`
}

TLSCluster can enable mutual TLS connection between TiDB cluster components https://pingcap.com/docs/stable/how-to/secure/enable-tls-between-components/

func (*TLSCluster) DeepCopy

func (in *TLSCluster) DeepCopy() *TLSCluster

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

func (*TLSCluster) DeepCopyInto

func (in *TLSCluster) DeepCopyInto(out *TLSCluster)

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

type TLSConfig added in v1.1.10

type TLSConfig struct {
	SafeTLSConfig `json:",inline"`
	// Path to the CA cert in the Prometheus container to use for the targets.
	CAFile string `json:"caFile,omitempty"`
	// Path to the client cert file in the Prometheus container for the targets.
	CertFile string `json:"certFile,omitempty"`
	// Path to the client key file in the Prometheus container for the targets.
	KeyFile string `json:"keyFile,omitempty"`
}

TLSConfig extends the safe TLS configuration with file parameters. +k8s:openapi-gen=true

func (*TLSConfig) DeepCopy added in v1.1.10

func (in *TLSConfig) DeepCopy() *TLSConfig

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

func (*TLSConfig) DeepCopyInto added in v1.1.10

func (in *TLSConfig) DeepCopyInto(out *TLSConfig)

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

type ThanosSpec added in v1.2.0

type ThanosSpec struct {
	MonitorContainer `json:",inline"`
	// ObjectStorageConfig configures object storage in Thanos.
	// Alternative to ObjectStorageConfigFile, and lower order priority.
	ObjectStorageConfig *corev1.SecretKeySelector `json:"objectStorageConfig,omitempty"`
	// ObjectStorageConfigFile specifies the path of the object storage configuration file.
	// When used alongside with ObjectStorageConfig, ObjectStorageConfigFile takes precedence.
	ObjectStorageConfigFile *string `json:"objectStorageConfigFile,omitempty"`
	// ListenLocal makes the Thanos sidecar listen on loopback, so that it
	// does not bind against the Pod IP.
	ListenLocal bool `json:"listenLocal,omitempty"`
	// TracingConfig configures tracing in Thanos. This is an experimental feature, it may change in any upcoming release in a breaking way.
	TracingConfig *corev1.SecretKeySelector `json:"tracingConfig,omitempty"`
	// TracingConfig specifies the path of the tracing configuration file.
	// When used alongside with TracingConfig, TracingConfigFile takes precedence.
	TracingConfigFile *string `json:"tracingConfigFile,omitempty"`
	// GRPCServerTLSConfig configures the gRPC server from which Thanos Querier reads
	// recorded rule data.
	// Note: Currently only the CAFile, CertFile, and KeyFile fields are supported.
	// Maps to the '--grpc-server-tls-*' CLI args.
	GRPCServerTLSConfig *TLSConfig `json:"grpcServerTlsConfig,omitempty"`
	// LogLevel for Thanos sidecar to be configured with.
	LogLevel string `json:"logLevel,omitempty"`
	// LogFormat for Thanos sidecar to be configured with.
	LogFormat string `json:"logFormat,omitempty"`
	// MinTime for Thanos sidecar to be configured with. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.
	MinTime string `json:"minTime,omitempty"`
	// RoutePrefix is prometheus prefix url
	RoutePrefix string `json:"routePrefix,omitempty"`
}

ThanosSpec is the desired state of thanos sidecar

func (*ThanosSpec) DeepCopy added in v1.2.0

func (in *ThanosSpec) DeepCopy() *ThanosSpec

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

func (*ThanosSpec) DeepCopyInto added in v1.2.0

func (in *ThanosSpec) DeepCopyInto(out *ThanosSpec)

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

type TiCDCCapture

type TiCDCCapture struct {
	PodName string `json:"podName,omitempty"`
	ID      string `json:"id,omitempty"`
}

TiCDCCapture is TiCDC Capture status

func (*TiCDCCapture) DeepCopy

func (in *TiCDCCapture) DeepCopy() *TiCDCCapture

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

func (*TiCDCCapture) DeepCopyInto

func (in *TiCDCCapture) DeepCopyInto(out *TiCDCCapture)

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

type TiCDCConfig

type TiCDCConfig struct {
	// Time zone of TiCDC
	// Optional: Defaults to UTC
	// +optional
	Timezone *string `json:"timezone,omitempty"`

	// CDC GC safepoint TTL duration, specified in seconds
	// Optional: Defaults to 86400
	// +optional
	GCTTL *int32 `json:"gcTTL,omitempty"`

	// LogLevel is the log level
	// Optional: Defaults to info
	// +optional
	LogLevel *string `json:"logLevel,omitempty"`

	// LogFile is the log file
	// Optional: Defaults to /dev/stderr
	// +optional
	LogFile *string `json:"logFile,omitempty"`
}

TiCDCConfig is the configuration of tidbcdc +k8s:openapi-gen=true

func (*TiCDCConfig) DeepCopy

func (in *TiCDCConfig) DeepCopy() *TiCDCConfig

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

func (*TiCDCConfig) DeepCopyInto

func (in *TiCDCConfig) DeepCopyInto(out *TiCDCConfig)

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

type TiCDCSpec

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

	// Specify a Service Account for TiCDC
	ServiceAccount string `json:"serviceAccount,omitempty"`

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

	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/ticdc
	// +optional
	BaseImage string `json:"baseImage"`

	// Config is the Configuration of tidbcdc servers
	// +optional
	Config *TiCDCConfig `json:"config,omitempty"`
}

TiCDCSpec contains details of TiCDC members +k8s:openapi-gen=true

func (*TiCDCSpec) DeepCopy

func (in *TiCDCSpec) DeepCopy() *TiCDCSpec

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

func (*TiCDCSpec) DeepCopyInto

func (in *TiCDCSpec) DeepCopyInto(out *TiCDCSpec)

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

type TiCDCStatus

type TiCDCStatus struct {
	Synced      bool                    `json:"synced,omitempty"`
	Phase       MemberPhase             `json:"phase,omitempty"`
	StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"`
	Captures    map[string]TiCDCCapture `json:"captures,omitempty"`
}

TiCDCStatus is TiCDC status

func (*TiCDCStatus) DeepCopy

func (in *TiCDCStatus) DeepCopy() *TiCDCStatus

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

func (*TiCDCStatus) DeepCopyInto

func (in *TiCDCStatus) DeepCopyInto(out *TiCDCStatus)

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

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"`
	// TLSClientSecretName is the name of secret which stores tidb server client certificate
	// Optional: Defaults to nil
	// +optional
	TLSClientSecretName *string `json:"tlsClientSecretName,omitempty"`
}

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

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 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
	OOMUseTmpStorage *bool `toml:"oom-use-tmp-storage,omitempty" json:"oom-use-tmp-storage,omitempty"`
	// +optional
	TempStoragePath *string `toml:"tmp-storage-path,omitempty" json:"tmp-storage-path,omitempty"`
	// Optional: Defaults to log
	// +optional
	OOMAction *string `toml:"oom-action,omitempty" json:"oom-action,omitempty"`
	// Optional: Defaults to 3072
	// +optional
	MaxIndexLength *int64 `toml:"max-index-length,omitempty" json:"max-index-length,omitempty"`
	// Optional: Defaults to 34359738368
	// +optional
	MemQuotaQuery *int64 `toml:"mem-quota-query,omitempty" json:"mem-quota-query,omitempty"`
	// TempStorageQuota describe the temporary storage Quota during query exector when OOMUseTmpStorage is enabled
	// If the quota exceed the capacity of the TempStoragePath, the tidb-server would exit with fatal error
	// +optional
	TempStorageQuota *int64 `toml:"tmp-storage-quota,omitempty" json:"tmp-storage-quota,omitempty"` // Bytes
	// 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"`
	// Deprecated in v4.0.0
	// +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"`
	// RepairMode indicates that the TiDB is in the repair mode for table meta.
	// +optional
	RepairMode *bool `toml:"repair-mode,omitempty" json:"repair-mode,omitempty"`
	// +optional
	RepairTableList []string `toml:"repair-table-list,omitempty" json:"repair-table-list,omitempty"`
	// IsolationRead indicates that the TiDB reads data from which isolation level(engine and label).
	// +optional
	IsolationRead *IsolationRead `toml:"isolation-read,omitempty" json:"isolation-read,omitempty"`
	// MaxServerConnections is the maximum permitted number of simultaneous client connections.
	// +optional
	MaxServerConnections *uint32 `toml:"max-server-connections,omitempty" json:"max-server-connections,omitempty"`
	// NewCollationsEnabledOnFirstBootstrap indicates if the new collations are enabled, it effects only when a TiDB cluster bootstrapped on the first time.
	// +optional
	NewCollationsEnabledOnFirstBootstrap *bool `toml:"new_collations_enabled_on_first_bootstrap,omitempty" json:"new_collations_enabled_on_first_bootstrap,omitempty"`
	// Experimental contains parameters for experimental features.
	// +optional
	Experimental *Experimental `toml:"experimental,omitempty" json:"experimental,omitempty"`
	// EnableDynamicConfig enables the TiDB to fetch configs from PD and update itself during runtime.
	// see https://github.com/pingcap/tidb/pull/13660 for more details.
	// +optional
	EnableDynamicConfig *bool `toml:"enable-dynamic-config,omitempty" json:"enable-dynamic-config,omitempty"`
	// imported from v3.1.0
	// +optional
	EnableTableLock *bool `toml:"enable-table-lock,omitempty" json:"enable-table-lock,omitempty"`
	// imported from v3.1.0
	// +optional
	DelayCleanTableLock *uint64 `toml:"delay-clean-table-lock,omitempty" json:"delay-clean-table-lock,omitempty"`
	// imported from v4.0.5
	// SkipRegisterToDashboard tells TiDB don't register itself to the dashboard.
	// +optional
	SkipRegisterToDashboard *bool `toml:"skip-register-to-dashboard,omitempty" json:"skip-register-to-dashboard,omitempty"`
	// When enabled, usage data (for example, instance versions) will be reported to PingCAP periodically for user experience analytics.
	// If this config is set to `false` on all TiDB servers, telemetry will be always disabled regardless of the value of the global variable `tidb_enable_telemetry`.
	// See PingCAP privacy policy for details: https://pingcap.com/en/privacy-policy/.
	// Imported from v4.0.2.
	// Optional: Defaults to true
	// +optional
	EnableTelemetry *bool `toml:"enable-telemetry,omitempty" json:"enable-telemetry,omitempty"`
	// Labels are labels for TiDB server
	// +optional
	Labels map[string]string `toml:"labels,omitempty" json:"labels,omitempty"`
}

TiDBConfig is the configuration of tidb-server For more detail, refer to https://pingcap.com/docs/stable/reference/configuration/tidb-server/configuration/ +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 TiDBConfigWraper added in v1.1.6

type TiDBConfigWraper struct {
	*config.GenericConfig
}

TiDBConfigWraper simply wrapps a GenericConfig

func NewTiDBConfig added in v1.1.6

func NewTiDBConfig() *TiDBConfigWraper

NewTiDBConfig returns an empty config structure

func (*TiDBConfigWraper) DeepCopy added in v1.1.6

func (in *TiDBConfigWraper) DeepCopy() *TiDBConfigWraper

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

func (*TiDBConfigWraper) DeepCopyInto added in v1.1.6

func (in *TiDBConfigWraper) DeepCopyInto(out *TiDBConfigWraper)

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

func (*TiDBConfigWraper) MarshalJSON added in v1.1.6

func (c *TiDBConfigWraper) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler interface.

func (*TiDBConfigWraper) MarshalTOML added in v1.1.6

func (c *TiDBConfigWraper) MarshalTOML() ([]byte, error)

func (*TiDBConfigWraper) UnmarshalJSON added in v1.1.6

func (c *TiDBConfigWraper) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler interface. If the data is a object, we must use the Deprecated TiDBConfig to Unmarshal for compatibility, if we use a map[string]interface{} to Unmarshal directly, we can not distinct the type between integer and float for toml.

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 TiDBProbe added in v1.1.7

type TiDBProbe struct {
	// "tcp" will use TCP socket to connetct port 4000
	//
	// "command" will probe the status api of tidb.
	// This will use curl command to request tidb, before v4.0.9 there is no curl in the image,
	// So do not use this before v4.0.9.
	// +kubebuilder:validation:Enum=tcp,command
	// +optional
	Type *string `json:"type,omitempty"` // tcp or command
}

TiDBProbe contains details of probing tidb. +k8s:openapi-gen=true default probe by TCPPort on 4000.

func (*TiDBProbe) DeepCopy added in v1.1.7

func (in *TiDBProbe) DeepCopy() *TiDBProbe

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

func (*TiDBProbe) DeepCopyInto added in v1.1.7

func (in *TiDBProbe) DeepCopyInto(out *TiDBProbe)

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"`

	// Expose the tidb cluster mysql port to MySQLNodePort
	// Optional: Defaults to 0
	// +optional
	MySQLNodePort *int `json:"mysqlNodePort,omitempty"`

	// Expose the tidb status node port to StatusNodePort
	// Optional: Defaults to 0
	// +optional
	StatusNodePort *int `json:"statusNodePort,omitempty"`

	// Expose additional ports for TiDB
	// Optional: Defaults to omitted
	// +optional
	AdditionalPorts []corev1.ServicePort `json:"additionalPorts,omitempty"`
}

TiDBServiceSpec defines `.tidb.service` field of `TidbCluster.spec`. +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) GetMySQLNodePort added in v1.1.3

func (tidbSvc *TiDBServiceSpec) GetMySQLNodePort() int32

GetMySQLNodePort returns the mysqlNodePort config in spec.tidb.service

func (*TiDBServiceSpec) GetStatusNodePort added in v1.1.3

func (tidbSvc *TiDBServiceSpec) GetStatusNodePort() int32

GetStatusNodePort returns the statusNodePort config in spec.tidb.service

func (*TiDBServiceSpec) ShouldExposeStatus

func (tidbSvc *TiDBServiceSpec) ShouldExposeStatus() bool

type TiDBSlowLogTailerSpec

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

	// (Deprecated) Image used for slowlog tailer.
	// Use `spec.helper.image` instead
	// +k8s:openapi-gen=false
	Image *string `json:"image,omitempty"`

	// (Deprecated) ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present
	// Use `spec.helper.imagePullPolicy` instead
	// +k8s:openapi-gen=false
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
}

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

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"`

	// Specify a Service Account for tidb
	ServiceAccount string `json:"serviceAccount,omitempty"`

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

	// 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 no failover
	// Optional: Defaults to 3
	// +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"`

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

	// Whether enable the TLS connection between the SQL client and TiDB server
	// Optional: Defaults to nil
	// +optional
	TLSClient *TiDBTLSClient `json:"tlsClient,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 *TiDBConfigWraper `json:"config,omitempty"`

	// Lifecycle describes actions that the management system should take in response to container lifecycle
	// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
	// until the action is complete, unless the container process fails, in which case the handler is aborted.
	// +optional
	Lifecycle *corev1.Lifecycle `json:"lifecycle,omitempty"`

	// StorageVolumes configure additional storage for TiDB pods.
	// +optional
	StorageVolumes []StorageVolume `json:"storageVolumes,omitempty"`

	// The storageClassName of the persistent volume for TiDB data storage.
	// Defaults to Kubernetes default storage class.
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`
	// ReadinessProbe describes actions that probe the tidb's readiness.
	// the default behavior is like setting type as "tcp"
	// +optional
	ReadinessProbe *TiDBProbe `json:"readinessProbe,omitempty"`
}

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

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) 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"`
	Image                    string                       `json:"image,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
	// The steps to enable this feature:
	//   1. Generate a TiDB server-side certificate and a client-side certifiacete for the TiDB cluster.
	//      There are multiple ways to generate certificates:
	//        - user-provided certificates: https://pingcap.com/docs/stable/how-to/secure/enable-tls-clients/
	//        - use the K8s built-in certificate signing system signed certificates: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/
	//        - or use cert-manager signed certificates: https://cert-manager.io/
	//   2. Create a K8s Secret object which contains the TiDB server-side certificate created above.
	//      The name of this Secret must be: <clusterName>-tidb-server-secret.
	//        kubectl create secret generic <clusterName>-tidb-server-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
	//   3. Create a K8s Secret object which contains the TiDB client-side certificate created above which will be used by TiDB Operator.
	//      The name of this Secret must be: <clusterName>-tidb-client-secret.
	//        kubectl create secret generic <clusterName>-tidb-client-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
	//   4. Set Enabled to `true`.
	// +optional
	Enabled bool `json:"enabled,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 TiFlashCommonConfigWraper added in v1.1.6

type TiFlashCommonConfigWraper struct {
	*config.GenericConfig
}

func NewTiFlashCommonConfig added in v1.1.6

func NewTiFlashCommonConfig() *TiFlashCommonConfigWraper

func (*TiFlashCommonConfigWraper) DeepCopy added in v1.1.6

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

func (*TiFlashCommonConfigWraper) DeepCopyInto added in v1.1.6

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

func (*TiFlashCommonConfigWraper) MarshalJSON added in v1.1.6

func (c *TiFlashCommonConfigWraper) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler interface.

func (*TiFlashCommonConfigWraper) MarshalTOML added in v1.1.6

func (c *TiFlashCommonConfigWraper) MarshalTOML() ([]byte, error)

func (*TiFlashCommonConfigWraper) UnmarshalJSON added in v1.1.6

func (c *TiFlashCommonConfigWraper) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler interface. If the data is a object, we must use the Deprecated TiFlashCommonConfig to Unmarshal for compatibility, if we use a map[string]interface{} to Unmarshal directly, we can not distinct the type between integer and float for toml.

type TiFlashConfig

type TiFlashConfig struct {
	// commonConfig is the Configuration of TiFlash process
	// +optional
	CommonConfig *CommonConfig `json:"config,omitempty"`

	// proxyConfig is the Configuration of proxy process
	// +optional
	ProxyConfig *ProxyConfig `json:"proxy,omitempty"`
}

TiFlashConfig is the configuration of TiFlash. +k8s:openapi-gen=true

func (*TiFlashConfig) DeepCopy

func (in *TiFlashConfig) DeepCopy() *TiFlashConfig

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

func (*TiFlashConfig) DeepCopyInto

func (in *TiFlashConfig) DeepCopyInto(out *TiFlashConfig)

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

type TiFlashConfigWraper added in v1.1.6

type TiFlashConfigWraper struct {
	Common *TiFlashCommonConfigWraper `json:"config,omitempty"`
	Proxy  *TiFlashProxyConfigWraper  `json:"proxy,omitempty"`
}

func NewTiFlashConfig added in v1.1.6

func NewTiFlashConfig() *TiFlashConfigWraper

func (*TiFlashConfigWraper) DeepCopy added in v1.1.6

func (in *TiFlashConfigWraper) DeepCopy() *TiFlashConfigWraper

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

func (*TiFlashConfigWraper) DeepCopyInto added in v1.1.6

func (in *TiFlashConfigWraper) DeepCopyInto(out *TiFlashConfigWraper)

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

type TiFlashProxyConfigWraper added in v1.1.6

type TiFlashProxyConfigWraper struct {
	*config.GenericConfig
}

func NewTiFlashProxyConfig added in v1.1.6

func NewTiFlashProxyConfig() *TiFlashProxyConfigWraper

func (*TiFlashProxyConfigWraper) DeepCopy added in v1.1.6

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

func (*TiFlashProxyConfigWraper) DeepCopyInto added in v1.1.6

func (in *TiFlashProxyConfigWraper) DeepCopyInto(out *TiFlashProxyConfigWraper)

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

func (*TiFlashProxyConfigWraper) MarshalJSON added in v1.1.6

func (c *TiFlashProxyConfigWraper) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler interface.

func (*TiFlashProxyConfigWraper) MarshalTOML added in v1.1.6

func (c *TiFlashProxyConfigWraper) MarshalTOML() ([]byte, error)

func (*TiFlashProxyConfigWraper) UnmarshalJSON added in v1.1.6

func (c *TiFlashProxyConfigWraper) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler interface. If the data is a object, we must use the Deprecated TiFlashProxyConfig to Unmarshal for compatibility, if we use a map[string]interface{} to Unmarshal directly, we can not distinct the type between integer and float for toml.

type TiFlashSpec

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

	// Specify a Service Account for TiFlash
	ServiceAccount string `json:"serviceAccount,omitempty"`

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

	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/tiflash
	// +optional
	BaseImage string `json:"baseImage"`

	// Whether create the TiFlash 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 no failover
	// Optional: Defaults to 3
	// +kubebuilder:validation:Minimum=0
	// +optional
	MaxFailoverCount *int32 `json:"maxFailoverCount,omitempty"`

	// The persistent volume claims of the TiFlash data storages.
	// TiFlash supports multiple disks.
	StorageClaims []StorageClaim `json:"storageClaims"`

	// Config is the Configuration of TiFlash
	// +optional
	Config *TiFlashConfigWraper `json:"config,omitempty"`

	// LogTailer is the configurations of the log tailers for TiFlash
	// +optional
	LogTailer *LogTailerSpec `json:"logTailer,omitempty"`

	// RecoverFailover indicates that Operator can recover the failover Pods
	// +optional
	RecoverFailover bool `json:"recoverFailover,omitempty"`
}

TiFlashSpec contains details of TiFlash members +k8s:openapi-gen=true

func (*TiFlashSpec) DeepCopy

func (in *TiFlashSpec) DeepCopy() *TiFlashSpec

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

func (*TiFlashSpec) DeepCopyInto

func (in *TiFlashSpec) DeepCopyInto(out *TiFlashSpec)

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

type TiFlashStatus

type TiFlashStatus struct {
	Synced          bool                        `json:"synced,omitempty"`
	Phase           MemberPhase                 `json:"phase,omitempty"`
	StatefulSet     *apps.StatefulSetStatus     `json:"statefulSet,omitempty"`
	Stores          map[string]TiKVStore        `json:"stores,omitempty"`
	PeerStores      map[string]TiKVStore        `json:"peerStores,omitempty"`
	TombstoneStores map[string]TiKVStore        `json:"tombstoneStores,omitempty"`
	FailureStores   map[string]TiKVFailureStore `json:"failureStores,omitempty"`
	Image           string                      `json:"image,omitempty"`
}

TiFlashStatus is TiFlash status

func (*TiFlashStatus) DeepCopy

func (in *TiFlashStatus) DeepCopy() *TiFlashStatus

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

func (*TiFlashStatus) DeepCopyInto

func (in *TiFlashStatus) DeepCopyInto(out *TiFlashStatus)

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

type TiKVBackupConfig added in v1.1.3

type TiKVBackupConfig struct {
	// +optional
	NumThreads *int64 `json:"num-threads,omitempty" toml:"num-threads,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVBackupConfig) DeepCopy added in v1.1.3

func (in *TiKVBackupConfig) DeepCopy() *TiKVBackupConfig

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

func (*TiKVBackupConfig) DeepCopyInto added in v1.1.3

func (in *TiKVBackupConfig) DeepCopyInto(out *TiKVBackupConfig)

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"`
	// Deprecated in v4.0.0
	// 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"`
	// StoreLivenessTimeout is the timeout for store liveness check request.
	// +optional
	StoreLivenessTimeout *string `toml:"store-liveness-timeout,omitempty" json:"store-liveness-timeout,omitempty"`
	// +optional
	CoprCache *CoprocessorCache `toml:"copr-cache,omitempty" json:"copr-cache,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
	LogFormat *string `json:"log-format,omitempty" toml:"log-format,omitempty"`
	// +optional
	SlowLogFile *string `json:"slow-log-file,omitempty" toml:"slow-log-file,omitempty"`
	// +optional
	SlowLogThreshold *string `json:"slow-log-threshold,omitempty" toml:"slow-log-threshold,omitempty"`
	// Optional: Defaults to 24h
	// +optional
	LogRotationTimespan *string `json:"log-rotation-timespan,omitempty" toml:"log-rotation-timespan,omitempty"`
	// +optional
	LogRotationSize *string `json:"log-rotation-size,omitempty" toml:"log-rotation-size,omitempty"`
	// +optional
	RefreshConfigInterval *string `json:"refresh-config-interval,omitempty" toml:"refresh-config-interval,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"`
	// +optional
	TiKVPessimisticTxn *TiKVPessimisticTxn `json:"pessimistic-txn,omitempty" toml:"pessimistic-txn,omitempty"`
	// +optional
	Backup *TiKVBackupConfig `json:"backup,omitempty" toml:"backup,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 TiKVConfigWraper added in v1.1.6

type TiKVConfigWraper struct {
	*config.GenericConfig
}

func NewTiKVConfig added in v1.1.6

func NewTiKVConfig() *TiKVConfigWraper

func (*TiKVConfigWraper) DeepCopy added in v1.1.6

func (in *TiKVConfigWraper) DeepCopy() *TiKVConfigWraper

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

func (*TiKVConfigWraper) DeepCopyInto added in v1.1.6

func (in *TiKVConfigWraper) DeepCopyInto(out *TiKVConfigWraper)

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

func (*TiKVConfigWraper) MarshalJSON added in v1.1.6

func (c *TiKVConfigWraper) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler interface.

func (*TiKVConfigWraper) MarshalTOML added in v1.1.6

func (c *TiKVConfigWraper) MarshalTOML() ([]byte, error)

func (*TiKVConfigWraper) UnmarshalJSON added in v1.1.6

func (c *TiKVConfigWraper) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler interface. If the data is a object, we must use the Deprecated TiKVConfig to Unmarshal for compatibility, if we use a map[string]interface{} to Unmarshal directly, we can not distinct the type between integer and float for toml.

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"`
	// Optional: Defaults to true
	// +optional
	UseUnifiedPool *bool `json:"use-unified-pool,omitempty" toml:"use-unified-pool,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 TiKVEncryptionConfig

type TiKVEncryptionConfig struct {
	// Encrypyion method, use data key encryption raw rocksdb data
	// Possible values: plaintext, aes128-ctr, aes192-ctr, aes256-ctr
	// Optional: Default to plaintext
	// optional
	Method *string `json:"data-encryption-method,omitempty" toml:"data-encryption-method,omitempty"`

	// The frequency of datakey rotation, It managered by tikv
	// Optional: default to 7d
	// optional
	DataKeyRotationPeriod *string `json:"data-key-rotation-period,omitempty" toml:"data-key-rotation-period,omitempty"`

	// Master key config
	MasterKey *TiKVMasterKeyConfig `json:"master-key,omitempty" toml:"master-key,omitempty"`

	// Previous master key config
	// It used in master key rotation, the data key should decryption by previous master key and  then encrypytion by new master key
	PreviousMasterKey *TiKVMasterKeyConfig `json:"previous-master-key,omitempty" toml:"previoud-master-key,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVEncryptionConfig) DeepCopy

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

func (*TiKVEncryptionConfig) DeepCopyInto

func (in *TiKVEncryptionConfig) DeepCopyInto(out *TiKVEncryptionConfig)

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"`
	// +optional
	EnableCompactionFilter *bool `json:"enable-compaction-filter,omitempty" toml:"enable-compaction-filter,omitempty"`
	// +optional
	EnableCompactionFilterSkipVersionCheck *bool `json:"compaction-filter-skip-version-check,omitempty" toml:"compaction-filter-skip-version-check,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 TiKVMasterKeyConfig

type TiKVMasterKeyConfig struct {
	// Use KMS encryption or use file encryption, possible values: kms, file
	// If set to kms, kms MasterKeyKMSConfig should be filled, if set to file MasterKeyFileConfig should be filled
	// optional
	Type *string `json:"type,omitempty" toml:"type,omitempty"`

	// Master key file config
	// If the type set to file, this config should be filled
	MasterKeyFileConfig `json:",inline"`

	// Master key KMS config
	// If the type set to kms, this config should be filled
	MasterKeyKMSConfig `json:",inline"`
}

+k8s:openapi-gen=true

func (*TiKVMasterKeyConfig) DeepCopy

func (in *TiKVMasterKeyConfig) DeepCopy() *TiKVMasterKeyConfig

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

func (*TiKVMasterKeyConfig) DeepCopyInto

func (in *TiKVMasterKeyConfig) DeepCopyInto(out *TiKVMasterKeyConfig)

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 TiKVPessimisticTxn

type TiKVPessimisticTxn struct {
	// +optional
	Enabled *bool `json:"enabled,omitempty" toml:"enabled,omitempty"`
	// The default and maximum delay before responding to TiDB when pessimistic
	// transactions encounter locks
	// +optional
	WaitForLockTimeout *string `json:"wait-for-lock-timeout,omitempty" toml:"wait-for-lock-timeout,omitempty"`
	// If more than one transaction is waiting for the same lock, only the one with smallest
	// start timestamp will be waked up immediately when the lock is released. Others will
	// be waked up after `wake_up_delay_duration` to reduce contention and make the oldest
	// one more likely acquires the lock.
	// +optional
	WakeUpDelayDuration *string `json:"wake-up-delay-duration,omitempty" toml:"wake-up-delay-duration,omitempty"`
	// +optional
	Pipelined *bool `json:"pipelined,omitempty" toml:"pipelined,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVPessimisticTxn) DeepCopy

func (in *TiKVPessimisticTxn) DeepCopy() *TiKVPessimisticTxn

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

func (*TiKVPessimisticTxn) DeepCopyInto

func (in *TiKVPessimisticTxn) DeepCopyInto(out *TiKVPessimisticTxn)

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"`
	// Limit the max size of each append message.
	// Optional: Defaults to 1MB
	// +optional
	RaftMaxSizePerMsg *string `json:"raft-max-size-per-msg,omitempty" toml:"raft-max-size-per-msg,omitempty"`
	// Limit the max number of in-flight append messages during optimistic
	// replication phase.
	// Optional: Defaults to 256
	// +optional
	RaftMaxInflightMsgs *int64 `json:"raft-max-inflight-msgs,omitempty" toml:"raft-max-inflight-msgs,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: Defaults to 3s
	// +optional
	StoreRescheduleDuration *string `json:"store-reschedule-duration,omitempty" toml:"store-reschedule-duration,omitempty"`
	// Optional: Defaults to 500ms
	// +optional
	ApplyYieldDuration *string `json:"apply-yield-duration,omitempty" toml:"apply-yield-duration,omitempty"`
	// +optional
	HibernateRegions *bool `json:"hibernate-regions,omitempty" toml:"hibernate-regions,omitempty"`
	// Optional: Defaults to false
	// +optional
	ApplyEarly *bool `json:"apply-early,omitempty" toml:"apply-early, omitempty"`
	// Optional: Defaults to 0
	// +optional
	PerfLevel *int64 `json:"perf-level,omitempty" toml:"perf-level, omitempty"`
	// Optional: Defaults to false
	// +optional
	DevAssert *bool `json:"dev-assert,omitempty" toml:"dev-assert, 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
	Unified *TiKVUnifiedReadPoolConfig `json:"unified,omitempty" toml:"unified,omitempty"`
	// +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"`
	// CertAllowedCN is the Common Name that allowed
	// +optional
	// +k8s:openapi-gen=false
	CertAllowedCN []string `json:"cert-allowed-cn,omitempty" toml:"cert-allowed-cn,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"`
	// +optional
	Encryption *TiKVSecurityConfigEncryption `json:"encryption,omitempty" toml:"encryption,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 TiKVSecurityConfigEncryption

type TiKVSecurityConfigEncryption struct {
	// Encryption method to use for data files.
	// Possible values are "plaintext", "aes128-ctr", "aes192-ctr" and "aes256-ctr". Value other than
	// "plaintext" means encryption is enabled, in which case master key must be specified.
	// +optional
	DataEncryptionMethod *string `json:"data-encryption-method,omitempty" toml:"data-encryption-method,omitempty"`
	// Specifies how often TiKV rotates data encryption key.
	// +optional
	DataKeyRotationPeriod *string `json:"data-key-rotation-period,omitempty" toml:"data-key-rotation-period,omitempty"`
	// Specifies master key if encryption is enabled. There are three types of master key:
	//
	//   * "plaintext":
	//
	//     Plaintext as master key means no master key is given and only applicable when
	//     encryption is not enabled, i.e. data-encryption-method = "plaintext". This type doesn't
	//     have sub-config items. Example:
	//
	//     [security.encryption.master-key]
	//     type = "plaintext"
	//
	//   * "kms":
	//
	//     Use a KMS service to supply master key. Currently only AWS KMS is supported. This type of
	//     master key is recommended for production use. Example:
	//
	//     [security.encryption.master-key]
	//     type = "kms"
	//     ## KMS CMK key id. Must be a valid KMS CMK where the TiKV process has access to.
	//     ## In production is recommended to grant access of the CMK to TiKV using IAM.
	//     key-id = "1234abcd-12ab-34cd-56ef-1234567890ab"
	//     ## AWS region of the KMS CMK.
	//     region = "us-west-2"
	//     ## (Optional) AWS KMS service endpoint. Only required when non-default KMS endpoint is
	//     ## desired.
	//     endpoint = "https://kms.us-west-2.amazonaws.com"
	//
	//   * "file":
	//
	//     Supply a custom encryption key stored in a file. It is recommended NOT to use in production,
	//     as it breaks the purpose of encryption at rest, unless the file is stored in tempfs.
	//     The file must contain a 256-bits (32 bytes, regardless of key length implied by
	//     data-encryption-method) key encoded as hex string and end with newline ("\n"). Example:
	//
	//     [security.encryption.master-key]
	//     type = "file"
	//     path = "/path/to/master/key/file"
	// +optional
	MasterKey *TiKVSecurityConfigEncryptionMasterKey `json:"master-key,omitempty" toml:"master-key,omitempty"`
	// Specifies the old master key when rotating master key. Same config format as master-key.
	// The key is only access once during TiKV startup, after that TiKV do not need access to the key.
	// And it is okay to leave the stale previous-master-key config after master key rotation.
	// +optional
	PreviousMasterKey *TiKVSecurityConfigEncryptionPreviousMasterKey `json:"previous-master-key,omitempty" toml:"previous-master-key,omitempty"`
}

func (*TiKVSecurityConfigEncryption) DeepCopy

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

func (*TiKVSecurityConfigEncryption) DeepCopyInto

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

type TiKVSecurityConfigEncryptionMasterKey

type TiKVSecurityConfigEncryptionMasterKey struct {
	// +optional
	Type *string `json:"type" toml:"type,omitempty"`

	// Master key file config
	// If the type set to file, this config should be filled
	MasterKeyFileConfig `json:",inline"`

	// Master key KMS config
	// If the type set to kms, this config should be filled
	MasterKeyKMSConfig `json:",inline"`
}

func (*TiKVSecurityConfigEncryptionMasterKey) DeepCopy

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

func (*TiKVSecurityConfigEncryptionMasterKey) DeepCopyInto

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

type TiKVSecurityConfigEncryptionPreviousMasterKey

type TiKVSecurityConfigEncryptionPreviousMasterKey struct {
	// +optional
	Type *string `json:"type" toml:"type,omitempty"`

	// Master key file config
	// If the type set to file, this config should be filled
	MasterKeyFileConfig `json:",inline"`

	// Master key KMS config
	// If the type set to kms, this config should be filled
	MasterKeyKMSConfig `json:",inline"`
}

func (*TiKVSecurityConfigEncryptionPreviousMasterKey) DeepCopy

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

func (*TiKVSecurityConfigEncryptionPreviousMasterKey) DeepCopyInto

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 10485760
	// +optional
	MaxGrpcSendMsgLen *uint `json:"max-grpc-send-msg-len,omitempty" toml:"max-grpc-send-msg-len,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"`
	// +optional
	EnableRequestBatch *bool `json:"enable-request-batch,omitempty" toml:"enable-request-batch,omitempty"`
	// +optional
	RequestBatchEnableCrossCommand *bool `json:"request-batch-enable-cross-command,omitempty" toml:"request-batch-enable-cross-command,omitempty"`
	// +optional
	RequestBatchWaitDuration *string `json:"request-batch-wait-duration,omitempty" toml:"request-batch-wait-duration,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"`

	// Specify a Service Account for tikv
	ServiceAccount string `json:"serviceAccount,omitempty"`

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

	// 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 no failover
	// Optional: Defaults to 3
	// +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"`

	// Subdirectory within the volume to store TiKV Data. By default, the data
	// is stored in the root directory of volume which is mounted at
	// /var/lib/tikv.
	// Specifying this will change the data directory to a subdirectory, e.g.
	// /var/lib/tikv/data if you set the value to "data".
	// It's dangerous to change this value for a running cluster as it will
	// upgrade your cluster to use a new storage directory.
	// Defaults to "" (volume's root).
	// +optional
	DataSubDir string `json:"dataSubDir,omitempty"`

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

	// RecoverFailover indicates that Operator can recover the failed Pods
	// +optional
	RecoverFailover bool `json:"recoverFailover,omitempty"`

	// MountClusterClientSecret indicates whether to mount `cluster-client-secret` to the Pod
	// +optional
	MountClusterClientSecret *bool `json:"mountClusterClientSecret,omitempty"`

	// EvictLeaderTimeout indicates the timeout to evict tikv leader, in the format of Go Duration.
	// Defaults to 3m
	// +optional
	EvictLeaderTimeout *string `json:"evictLeaderTimeout,omitempty"`

	// StorageVolumes configure additional storage for TiKV pods.
	// +optional
	StorageVolumes []StorageVolume `json:"storageVolumes,omitempty"`
}

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

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"`
	PeerStores      map[string]TiKVStore        `json:"peerStores,omitempty"`
	TombstoneStores map[string]TiKVStore        `json:"tombstoneStores,omitempty"`
	FailureStores   map[string]TiKVFailureStore `json:"failureStores,omitempty"`
	Image           string                      `json:"image,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"`
	// Deprecated in v4.0.0
	// +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"`
	// The size of the temporary file that preoccupies the extra space when
	// TiKV is started. The name of temporary file is `space_placeholder_file`,
	// located in the `storage.data-dir` directory. When TiKV runs out of disk
	// space and cannot be started normally, you can delete this file as an
	// emergency intervention and set it to `0MB`. Default value is 2GB.
	// +optional
	ReserveSpace *string `json:"reserve-space,omitempty" toml:"reserve-space,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"`
	// Optional: Defaults to true
	// +optional
	UseUnifiedPool *bool `json:"use-unified-pool,omitempty" toml:"use-unified-pool,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"`
	// optional
	LevelMerge *bool `json:"level_merge,omitempty" toml:"level_merge,omitempty"`
	// optional
	GcMergeRewrite *bool `json:"gc-merge-rewrite,omitempty" toml:"gc-merge-rewrite,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 TiKVUnifiedReadPoolConfig

type TiKVUnifiedReadPoolConfig struct {
	// +optional
	MinThreadCount *int32 `json:"min-thread-count,omitempty" toml:"min-thread-count,omitempty"`
	// +optional
	MaxThreadCount *int32 `json:"max-thread-count,omitempty" toml:"max-thread-count,omitempty"`
	// Deprecated in v4.0.0
	// +optional
	StackSize *string `json:"stack-size,omitempty" toml:"stack-size,omitempty"`
	// +optional
	MaxTasksPerWorker *int32 `json:"max-tasks-per-worker,omitempty" toml:"max-tasks-per-worker,omitempty"`
}

+k8s:openapi-gen=true

func (*TiKVUnifiedReadPoolConfig) DeepCopy

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

func (*TiKVUnifiedReadPoolConfig) DeepCopyInto

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 TidbAutoScalerStatus

type TidbAutoScalerStatus struct {
	BasicAutoScalerStatus `json:",inline"`
}

+k8s:openapi-gen=true TidbAutoScalerStatus describe the auto-scaling status of tidb

func (*TidbAutoScalerStatus) DeepCopy

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

func (*TidbAutoScalerStatus) DeepCopyInto

func (in *TidbAutoScalerStatus) DeepCopyInto(out *TidbAutoScalerStatus)

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"`
}

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

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) BaseTiCDCSpec

func (tc *TidbCluster) BaseTiCDCSpec() ComponentAccessor

BaseTiCDCSpec returns the base spec of TiCDC servers

func (*TidbCluster) BaseTiDBSpec

func (tc *TidbCluster) BaseTiDBSpec() ComponentAccessor

BaseTiDBSpec returns the base spec of TiDB servers

func (*TidbCluster) BaseTiFlashSpec

func (tc *TidbCluster) BaseTiFlashSpec() ComponentAccessor

BaseTiFlashSpec returns the base spec of TiFlash 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) GetPDDeletedFailureReplicas added in v1.2.0

func (tc *TidbCluster) GetPDDeletedFailureReplicas() int32

func (*TidbCluster) HelperImage

func (tc *TidbCluster) HelperImage() string

func (*TidbCluster) HelperImagePullPolicy

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

func (*TidbCluster) IsHeterogeneous added in v1.1.6

func (tc *TidbCluster) IsHeterogeneous() bool

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) PDScaling added in v1.1.1

func (tc *TidbCluster) PDScaling() bool

func (*TidbCluster) PDStsActualReplicas

func (tc *TidbCluster) PDStsActualReplicas() int32

func (*TidbCluster) PDStsDesiredOrdinals

func (tc *TidbCluster) PDStsDesiredOrdinals(excludeFailover bool) sets.Int32

func (*TidbCluster) PDStsDesiredReplicas

func (tc *TidbCluster) PDStsDesiredReplicas() int32

func (*TidbCluster) PDUpgrading

func (tc *TidbCluster) PDUpgrading() bool

func (*TidbCluster) PDVersion

func (tc *TidbCluster) PDVersion() string

func (*TidbCluster) PumpImage

func (tc *TidbCluster) PumpImage() *string

func (*TidbCluster) PumpIsAvailable

func (tc *TidbCluster) PumpIsAvailable() bool

func (*TidbCluster) Scheme

func (tc *TidbCluster) Scheme() string

func (*TidbCluster) SkipTLSWhenConnectTiDB

func (tc *TidbCluster) SkipTLSWhenConnectTiDB() bool

func (*TidbCluster) TiCDCDeployDesiredReplicas

func (tc *TidbCluster) TiCDCDeployDesiredReplicas() int32

func (*TidbCluster) TiCDCGCTTL

func (tc *TidbCluster) TiCDCGCTTL() int32

func (*TidbCluster) TiCDCImage

func (tc *TidbCluster) TiCDCImage() string

func (*TidbCluster) TiCDCLogFile

func (tc *TidbCluster) TiCDCLogFile() string

func (*TidbCluster) TiCDCLogLevel

func (tc *TidbCluster) TiCDCLogLevel() string

func (*TidbCluster) TiCDCTimezone

func (tc *TidbCluster) TiCDCTimezone() 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) TiDBScaling added in v1.1.2

func (tc *TidbCluster) TiDBScaling() bool

func (*TidbCluster) TiDBStsActualReplicas

func (tc *TidbCluster) TiDBStsActualReplicas() int32

func (*TidbCluster) TiDBStsDesiredOrdinals

func (tc *TidbCluster) TiDBStsDesiredOrdinals(excludeFailover bool) sets.Int32

func (*TidbCluster) TiDBStsDesiredReplicas

func (tc *TidbCluster) TiDBStsDesiredReplicas() int32

func (*TidbCluster) TiDBUpgrading

func (tc *TidbCluster) TiDBUpgrading() bool

func (*TidbCluster) TiFlashAllPodsStarted

func (tc *TidbCluster) TiFlashAllPodsStarted() bool

func (*TidbCluster) TiFlashAllStoresReady

func (tc *TidbCluster) TiFlashAllStoresReady() bool

func (*TidbCluster) TiFlashContainerPrivilege

func (tc *TidbCluster) TiFlashContainerPrivilege() *bool

func (*TidbCluster) TiFlashImage

func (tc *TidbCluster) TiFlashImage() string

func (*TidbCluster) TiFlashStsActualReplicas

func (tc *TidbCluster) TiFlashStsActualReplicas() int32

func (*TidbCluster) TiFlashStsDesiredOrdinals

func (tc *TidbCluster) TiFlashStsDesiredOrdinals(excludeFailover bool) sets.Int32

func (*TidbCluster) TiFlashStsDesiredReplicas

func (tc *TidbCluster) TiFlashStsDesiredReplicas() int32

func (*TidbCluster) TiFlashUpgrading

func (tc *TidbCluster) TiFlashUpgrading() bool

func (*TidbCluster) TiKVAllPodsStarted

func (tc *TidbCluster) TiKVAllPodsStarted() bool

func (*TidbCluster) TiKVAllStoresReady

func (tc *TidbCluster) TiKVAllStoresReady() bool

func (*TidbCluster) TiKVContainerPrivilege

func (tc *TidbCluster) TiKVContainerPrivilege() *bool

func (*TidbCluster) TiKVEvictLeaderTimeout added in v1.1.6

func (tc *TidbCluster) TiKVEvictLeaderTimeout() time.Duration

func (*TidbCluster) TiKVImage

func (tc *TidbCluster) TiKVImage() string

func (*TidbCluster) TiKVIsAvailable

func (tc *TidbCluster) TiKVIsAvailable() bool

func (*TidbCluster) TiKVScaling added in v1.1.1

func (tc *TidbCluster) TiKVScaling() bool

func (*TidbCluster) TiKVStsActualReplicas

func (tc *TidbCluster) TiKVStsActualReplicas() int32

func (*TidbCluster) TiKVStsDesiredOrdinals

func (tc *TidbCluster) TiKVStsDesiredOrdinals(excludeFailover bool) sets.Int32

func (*TidbCluster) TiKVStsDesiredReplicas

func (tc *TidbCluster) TiKVStsDesiredReplicas() int32

func (*TidbCluster) TiKVUpgrading

func (tc *TidbCluster) TiKVUpgrading() bool

func (*TidbCluster) TiKVVersion added in v1.2.0

func (tc *TidbCluster) TiKVVersion() string

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 TidbClusterAutoScalerStatus `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 TidbClusterAutoScalerRef added in v1.1.2

type TidbClusterAutoScalerRef struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

+k8s:openapi-gen=true TidbClusterAutoScalerRef indicates to the target auto-scaler ref

func (*TidbClusterAutoScalerRef) DeepCopy added in v1.1.2

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

func (*TidbClusterAutoScalerRef) DeepCopyInto added in v1.1.2

func (in *TidbClusterAutoScalerRef) DeepCopyInto(out *TidbClusterAutoScalerRef)

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

type TidbClusterAutoScalerSpec

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

	// 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 TidbClusterAutoScalerStatus added in v1.2.0

type TidbClusterAutoScalerStatus struct {
	// Tikv describes the status of each group for the tikv in the last auto-scaling reconciliation
	// +optional
	TiKV map[string]TikvAutoScalerStatus `json:"tikv,omitempty"`
	// Tidb describes the status of each group for the tidb in the last auto-scaling reconciliation
	// +optional
	TiDB map[string]TidbAutoScalerStatus `json:"tidb,omitempty"`
}

+k8s:openapi-gen=true TidbClusterAutoScalerStatus describe the whole status

func (*TidbClusterAutoScalerStatus) DeepCopy added in v1.2.0

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

func (*TidbClusterAutoScalerStatus) DeepCopyInto added in v1.2.0

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

type TidbClusterCondition

type TidbClusterCondition struct {
	// Type of the condition.
	Type TidbClusterConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty"`
}

TidbClusterCondition describes the state of a tidb cluster at a certain point.

func (*TidbClusterCondition) DeepCopy

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

func (*TidbClusterCondition) DeepCopyInto

func (in *TidbClusterCondition) DeepCopyInto(out *TidbClusterCondition)

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

type TidbClusterConditionType

type TidbClusterConditionType string

TidbClusterConditionType represents a tidb cluster condition value.

const (
	// TidbClusterReady indicates that the tidb cluster is ready or not.
	// This is defined as:
	// - All statefulsets are up to date (currentRevision == updateRevision).
	// - All PD members are healthy.
	// - All TiDB pods are healthy.
	// - All TiKV stores are up.
	// - All TiFlash stores are up.
	TidbClusterReady TidbClusterConditionType = "Ready"
)

type TidbClusterList

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

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

TidbClusterList is TidbCluster list +k8s:openapi-gen=true

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"`

	// ClusterDomain is the domain of TidbCluster object
	// +optional
	ClusterDomain string `json:"clusterDomain,omitempty"`
}

+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 {
	// Discovery spec
	Discovery DiscoverySpec `json:"discovery,omitempty"`

	// Specify a Service Account
	ServiceAccount string `json:"serviceAccount,omitempty"`

	// PD cluster spec
	// +optional
	PD *PDSpec `json:"pd,omitempty"`

	// TiDB cluster spec
	// +optional
	TiDB *TiDBSpec `json:"tidb,omitempty"`

	// TiKV cluster spec
	// +optional
	TiKV *TiKVSpec `json:"tikv,omitempty"`

	// TiFlash cluster spec
	// +optional
	TiFlash *TiFlashSpec `json:"tiflash,omitempty"`

	// TiCDC cluster spec
	// +optional
	TiCDC *TiCDCSpec `json:"ticdc,omitempty"`

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

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

	// Indicates that the tidb cluster is paused and will not be processed by
	// the controller.
	// +optional
	Paused bool `json:"paused,omitempty"`

	// 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=Retain
	PVReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy,omitempty"`

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

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,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"`

	// Whether enable the TLS connection between TiDB server components
	// Optional: Defaults to nil
	// +optional
	TLSCluster *TLSCluster `json:"tlsCluster,omitempty"`

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

	// Affinity of TiDB cluster Pods.
	// Will be overwritten by each cluster component's specific affinity setting, e.g. `spec.tidb.affinity`
	// +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"`

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

	// EnableDynamicConfiguration indicates whether to append `--advertise-status-addr` to the startup parameters of TiKV.
	// +optional
	EnableDynamicConfiguration *bool `json:"enableDynamicConfiguration,omitempty"`

	// ClusterDomain is the Kubernetes Cluster Domain of TiDB cluster
	// Optional: Defaults to ""
	// +optional
	ClusterDomain string `json:"clusterDomain,omitempty"`

	// Cluster is the external cluster, if configured, the components in this TidbCluster will join to this configured cluster.
	// +optional
	Cluster *TidbClusterRef `json:"cluster,omitempty"`

	// PDAddresses are the external PD addresses, if configured, the PDs in this TidbCluster will join to the configured PD cluster.
	// +optional
	PDAddresses []string `json:"pdAddresses,omitempty"`

	// StatefulSetUpdateStrategy of TiDB cluster StatefulSets
	// +optional
	StatefulSetUpdateStrategy apps.StatefulSetUpdateStrategyType `json:"statefulSetUpdateStrategy,omitempty"`
}

TidbClusterSpec describes the attributes that a user creates on a tidb cluster +k8s:openapi-gen=true

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                `json:"pump,omitempty"`
	TiFlash    TiFlashStatus             `json:"tiflash,omitempty"`
	TiCDC      TiCDCStatus               `json:"ticdc,omitempty"`
	Monitor    *TidbMonitorRef           `json:"monitor,omitempty"`
	AutoScaler *TidbClusterAutoScalerRef `json:"auto-scaler,omitempty"`
	// Represents the latest available observations of a tidb cluster's state.
	// +optional
	Conditions []TidbClusterCondition `json:"conditions,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"`

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,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"`

	// TLSClientSecretName is the name of secret which stores tidb server client certificate
	// Optional: Defaults to nil
	// +optional
	TLSClientSecretName *string `json:"tlsClientSecretName,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"`

	// GrafanaEnabled indicate whether the grafana is enabled for this target tidbmonitor
	// +optional
	GrafanaEnabled bool `json:"grafanaEnabled,omitempty"`
}

+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"`
	DM          *DMMonitorSpec  `json:"dm,omitempty"`
	// +optional
	Thanos *ThanosSpec `json:"thanos,omitempty"`

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

	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,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"`
	// alertManagerRulesVersion is the version of the tidb cluster that used for alert rules.
	// default to current tidb cluster version, for example: v3.0.15
	// +optional
	AlertManagerRulesVersion *string `json:"alertManagerRulesVersion,omitempty"`

	// +optional
	AdditionalContainers []corev1.Container `json:"additionalContainers,omitempty"`

	// ClusterScoped indicates whether this monitor should manage Kubernetes cluster-wide TiDB clusters
	ClusterScoped bool `json:"clusterScoped,omitempty"`
	// The labels to add to any time series or alerts when communicating with
	// external systems (federation, remote storage, Alertmanager).
	ExternalLabels map[string]string `json:"externalLabels,omitempty"`
	// Name of Prometheus external label used to denote replica name.
	// Defaults to the value of `prometheus_replica`. External label will
	// _not_ be added when value is set to empty string (`""`).
	ReplicaExternalLabelName *string `json:"replicaExternalLabelName,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 {
	// Storage status for deployment
	DeploymentStorageStatus *DeploymentStorageStatus `json:"deploymentStorageStatus,omitempty"`
}

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 TikvAutoScalerStatus

type TikvAutoScalerStatus struct {
	BasicAutoScalerStatus `json:",inline"`
}

+k8s:openapi-gen=true TikvAutoScalerStatus describe the auto-scaling status of tikv

func (*TikvAutoScalerStatus) DeepCopy

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

func (*TikvAutoScalerStatus) DeepCopyInto

func (in *TikvAutoScalerStatus) DeepCopyInto(out *TikvAutoScalerStatus)

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.

type User

type User struct {
	// +optional
	Password string `json:"password,omitempty" toml:"password"`
	// +optional
	Profile *string `json:"profile,omitempty" toml:"profile,omitempty"`
	// +optional
	Quota *string `json:"quota,omitempty" toml:"quota,omitempty"`
	// +optional
	Networks *Networks `json:"networks,omitempty" toml:"networks,omitempty"`
}

User is the configuration of users. +k8s:openapi-gen=false

func (*User) DeepCopy

func (in *User) DeepCopy() *User

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

func (*User) DeepCopyInto

func (in *User) DeepCopyInto(out *User)

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

type WorkerConfig added in v1.2.0

type WorkerConfig struct {
	// Log level.
	// Optional: Defaults to info
	// +optional
	LogLevel *string `toml:"log-level,omitempty" json:"log-level,omitempty"`
	// File log config.
	// +optional
	LogFile *string `toml:"log-file,omitempty" json:"log-file,omitempty"`
	// Log format. one of json or text.
	// +optional
	LogFormat *string `toml:"log-format,omitempty" json:"log-format,omitempty"`

	// KeepAliveTTL is the keepalive TTL when dm-worker writes to the embedded etcd of dm-master
	// Optional: Defaults to 10
	// +optional
	KeepAliveTTL *int64 `toml:"keepalive-ttl,omitempty" json:"keepalive-ttl,omitempty"`
	// dm-worker's security config
	// +optional
	DMSecurityConfig `toml:",inline" json:",inline"`
}

WorkerConfig is the configuration of dm-worker-server +k8s:openapi-gen=true

func (*WorkerConfig) DeepCopy added in v1.2.0

func (in *WorkerConfig) DeepCopy() *WorkerConfig

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

func (*WorkerConfig) DeepCopyInto added in v1.2.0

func (in *WorkerConfig) DeepCopyInto(out *WorkerConfig)

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

type WorkerFailureMember added in v1.2.0

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

WorkerFailureMember is the dm-worker failure member information

func (*WorkerFailureMember) DeepCopy added in v1.2.0

func (in *WorkerFailureMember) DeepCopy() *WorkerFailureMember

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

func (*WorkerFailureMember) DeepCopyInto added in v1.2.0

func (in *WorkerFailureMember) DeepCopyInto(out *WorkerFailureMember)

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

type WorkerMember added in v1.2.0

type WorkerMember struct {
	Name  string `json:"name,omitempty"`
	Addr  string `json:"addr,omitempty"`
	Stage string `json:"stage"`
	// Last time the health transitioned from one to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

WorkerMember is dm-worker member status

func (*WorkerMember) DeepCopy added in v1.2.0

func (in *WorkerMember) DeepCopy() *WorkerMember

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

func (*WorkerMember) DeepCopyInto added in v1.2.0

func (in *WorkerMember) DeepCopyInto(out *WorkerMember)

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

type WorkerSpec added in v1.2.0

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

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

	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/dm
	// +optional
	BaseImage string `json:"baseImage,omitempty"`

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

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

	// StorageSize is the request storage size for dm-worker.
	// Defaults to "10Gi".
	// +optional
	StorageSize string `json:"storageSize,omitempty"`

	// Subdirectory within the volume to store dm-worker Data. By default, the data
	// is stored in the root directory of volume which is mounted at
	// /var/lib/dm-worker.
	// Specifying this will change the data directory to a subdirectory, e.g.
	// /var/lib/dm-worker/data if you set the value to "data".
	// It's dangerous to change this value for a running cluster as it will
	// upgrade your cluster to use a new storage directory.
	// Defaults to "" (volume's root).
	// +optional
	DataSubDir string `json:"dataSubDir,omitempty"`

	// Config is the Configuration of dm-worker-servers
	// +optional
	Config *WorkerConfig `json:"config,omitempty"`

	// RecoverFailover indicates that Operator can recover the failover Pods
	// +optional
	RecoverFailover bool `json:"recoverFailover,omitempty"`
}

+k8s:openapi-gen=true WorkerSpec contains details of dm-worker members

func (*WorkerSpec) DeepCopy added in v1.2.0

func (in *WorkerSpec) DeepCopy() *WorkerSpec

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

func (*WorkerSpec) DeepCopyInto added in v1.2.0

func (in *WorkerSpec) DeepCopyInto(out *WorkerSpec)

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

type WorkerStatus added in v1.2.0

type WorkerStatus struct {
	Synced         bool                           `json:"synced,omitempty"`
	Phase          MemberPhase                    `json:"phase,omitempty"`
	StatefulSet    *apps.StatefulSetStatus        `json:"statefulSet,omitempty"`
	Members        map[string]WorkerMember        `json:"members,omitempty"`
	FailureMembers map[string]WorkerFailureMember `json:"failureMembers,omitempty"`
	Image          string                         `json:"image,omitempty"`
}

WorkerStatus is dm-worker status

func (*WorkerStatus) DeepCopy added in v1.2.0

func (in *WorkerStatus) DeepCopy() *WorkerStatus

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

func (*WorkerStatus) DeepCopyInto added in v1.2.0

func (in *WorkerStatus) DeepCopyInto(out *WorkerStatus)

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