Skip to content

Latest commit

 

History

History
20960 lines (20960 loc) · 309 KB

docs.md

File metadata and controls

20960 lines (20960 loc) · 309 KB
title summary category
TiDB Operator API Document
Reference of TiDB Operator API
how-to

API Document

pingcap.com/v1alpha1

Package v1alpha1 is the v1alpha1 version of the API.

Resource Types:

Backup

Backup is a backup of tidb cluster.

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
Backup
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
BackupSpec


resources
Kubernetes core/v1.ResourceRequirements
from
TiDBAccessConfig

From is the tidb cluster that needs to backup.

backupType
BackupType

Type is the backup type for tidb cluster.

tikvGCLifeTime
string

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.

StorageProvider
StorageProvider

(Members of StorageProvider are embedded into this type.)

StorageProvider configures where and how backups should be stored.

storageClassName
string
(Optional)

The storageClassName of the persistent volume for Backup data storage. Defaults to Kubernetes default storage class.

storageSize
string

StorageSize is the request storage size for backup job

br
BRConfig

BRConfig is the configs for BR

dumpling
DumplingConfig

DumplingConfig is the configs for dumpling

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of backup Pods, components may add more tolerations upon this respectively

toolImage
string
(Optional)

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

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

tableFilter
[]string

TableFilter means Table filter expression for ‘db.table’ matching. BR supports this from v4.0.3.

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of backup Pods

useKMS
bool

Use KMS to decrypt the secrets

serviceAccount
string

Specify service account of backup

cleanPolicy
CleanPolicyType

CleanPolicy denotes whether to clean backup data when the object is deleted from the cluster, if not set, the backup data will be retained

status
BackupStatus

BackupSchedule

BackupSchedule is a backup schedule of tidb cluster.

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
BackupSchedule
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
BackupScheduleSpec


schedule
string

Schedule specifies the cron string used for backup scheduling.

pause
bool

Pause means paused backupSchedule

maxBackups
int32

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.

maxReservedTime
string

MaxReservedTime is to specify how long backups we want to keep.

backupTemplate
BackupSpec

BackupTemplate is the specification of the backup structure to get scheduled.

storageClassName
string
(Optional)

The storageClassName of the persistent volume for Backup data storage if not storage class name set in BackupSpec. Defaults to Kubernetes default storage class.

storageSize
string

StorageSize is the request storage size for backup job

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

status
BackupScheduleStatus

DMCluster

DMCluster is the control script’s spec

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
DMCluster
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
DMClusterSpec

Spec defines the behavior of a dm cluster



discovery
DMDiscoverySpec

Discovery spec

master
MasterSpec
(Optional)

dm-master cluster spec

worker
WorkerSpec
(Optional)

dm-worker cluster spec

paused
bool
(Optional)

Indicates that the dm cluster is paused and will not be processed by the controller.

version
string
(Optional)

dm cluster version

schedulerName
string

SchedulerName of DM cluster Pods

pvReclaimPolicy
Kubernetes core/v1.PersistentVolumeReclaimPolicy

Persistent volume reclaim policy applied to the PVs that consumed by DM cluster

imagePullPolicy
Kubernetes core/v1.PullPolicy

ImagePullPolicy of DM cluster Pods

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

enablePVReclaim
bool
(Optional)

Whether enable PVC reclaim for orphan PVC left by statefulset scale-in Optional: Defaults to false

tlsCluster
TLSCluster
(Optional)

Whether enable the TLS connection between DM server components Optional: Defaults to nil

tlsClientSecretNames
[]string
(Optional)

TLSClientSecretNames are the names of secrets which stores mysql/tidb server client certificates that used by dm-master and dm-worker.

hostNetwork
bool
(Optional)

Whether Hostnetwork is enabled for DM cluster Pods Optional: Defaults to false

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of DM cluster Pods

priorityClassName
string
(Optional)

PriorityClassName of DM cluster Pods Optional: Defaults to omitted

nodeSelector
map[string]string
(Optional)

Base node selectors of DM cluster Pods, components may add or override selectors upon this respectively

annotations
map[string]string
(Optional)

Base annotations of DM cluster Pods, components may add or override selectors upon this respectively

timezone
string
(Optional)

Time zone of DM cluster Pods Optional: Defaults to UTC

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of DM cluster Pods, components may add more tolerations upon this respectively

status
DMClusterStatus

Most recently observed status of the dm cluster

Restore

Restore represents the restoration of backup of a tidb cluster.

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
Restore
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
RestoreSpec


resources
Kubernetes core/v1.ResourceRequirements
to
TiDBAccessConfig

To is the tidb cluster that needs to restore.

backupType
BackupType

Type is the backup type for tidb cluster.

tikvGCLifeTime
string

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.

StorageProvider
StorageProvider

(Members of StorageProvider are embedded into this type.)

StorageProvider configures where and how backups should be stored.

storageClassName
string
(Optional)

The storageClassName of the persistent volume for Restore data storage. Defaults to Kubernetes default storage class.

storageSize
string

StorageSize is the request storage size for backup job

br
BRConfig

BR is the configs for BR.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of restore Pods, components may add more tolerations upon this respectively

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of restore Pods

useKMS
bool

Use KMS to decrypt the secrets

serviceAccount
string

Specify service account of restore

toolImage
string
(Optional)

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

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

tableFilter
[]string

TableFilter means Table filter expression for ‘db.table’ matching. BR supports this from v4.0.3.

status
RestoreStatus

TidbCluster

TidbCluster is the control script’s spec

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
TidbCluster
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
TidbClusterSpec

Spec defines the behavior of a tidb cluster



discovery
DiscoverySpec

Discovery spec

serviceAccount
string

Specify a Service Account

pd
PDSpec
(Optional)

PD cluster spec

tidb
TiDBSpec
(Optional)

TiDB cluster spec

tikv
TiKVSpec
(Optional)

TiKV cluster spec

tiflash
TiFlashSpec
(Optional)

TiFlash cluster spec

ticdc
TiCDCSpec
(Optional)

TiCDC cluster spec

pump
PumpSpec
(Optional)

Pump cluster spec

helper
HelperSpec
(Optional)

Helper spec

paused
bool
(Optional)

Indicates that the tidb cluster is paused and will not be processed by the controller.

version
string
(Optional)

TiDB cluster version

schedulerName
string

SchedulerName of TiDB cluster Pods

pvReclaimPolicy
Kubernetes core/v1.PersistentVolumeReclaimPolicy

Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

imagePullPolicy
Kubernetes core/v1.PullPolicy

ImagePullPolicy of TiDB cluster Pods

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

configUpdateStrategy
ConfigUpdateStrategy

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.

enablePVReclaim
bool
(Optional)

Whether enable PVC reclaim for orphan PVC left by statefulset scale-in Optional: Defaults to false

tlsCluster
TLSCluster
(Optional)

Whether enable the TLS connection between TiDB server components Optional: Defaults to nil

hostNetwork
bool
(Optional)

Whether Hostnetwork is enabled for TiDB cluster Pods Optional: Defaults to false

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of TiDB cluster Pods. Will be overwritten by each cluster component’s specific affinity setting, e.g. spec.tidb.affinity

priorityClassName
string
(Optional)

PriorityClassName of TiDB cluster Pods Optional: Defaults to omitted

nodeSelector
map[string]string
(Optional)

Base node selectors of TiDB cluster Pods, components may add or override selectors upon this respectively

annotations
map[string]string
(Optional)

Base annotations of TiDB cluster Pods, components may add or override selectors upon this respectively

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of TiDB cluster Pods, components may add more tolerations upon this respectively

timezone
string
(Optional)

Time zone of TiDB cluster Pods Optional: Defaults to UTC

services
[]Service

(Deprecated) Services list non-headless services type used in TidbCluster

enableDynamicConfiguration
bool
(Optional)

EnableDynamicConfiguration indicates whether to append --advertise-status-addr to the startup parameters of TiKV.

clusterDomain
string
(Optional)

ClusterDomain is the Kubernetes Cluster Domain of TiDB cluster Optional: Defaults to “”

cluster
TidbClusterRef
(Optional)

Cluster is the external cluster, if configured, the components in this TidbCluster will join to this configured cluster.

pdAddresses
[]string
(Optional)

PDAddresses are the external PD addresses, if configured, the PDs in this TidbCluster will join to the configured PD cluster.

statefulSetUpdateStrategy
Kubernetes apps/v1.StatefulSetUpdateStrategyType
(Optional)

StatefulSetUpdateStrategy of TiDB cluster StatefulSets

status
TidbClusterStatus

Most recently observed status of the tidb cluster

TidbClusterAutoScaler

TidbClusterAutoScaler is the control script’s spec

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
TidbClusterAutoScaler
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
TidbClusterAutoScalerSpec

Spec describes the state of the TidbClusterAutoScaler



cluster
TidbClusterRef

TidbClusterRef describe the target TidbCluster

tikv
TikvAutoScalerSpec
(Optional)

TiKV represents the auto-scaling spec for tikv

tidb
TidbAutoScalerSpec
(Optional)

TiDB represents the auto-scaling spec for tidb

status
TidbClusterAutoScalerStatus

Status describe the status of the TidbClusterAutoScaler

TidbInitializer

TidbInitializer is a TiDB cluster initializing job

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
TidbInitializer
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
TidbInitializerSpec

Spec defines the desired state of TidbInitializer



image
string
cluster
TidbClusterRef
imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)
imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

permitHost
string
(Optional)

permitHost is the host which will only be allowed to connect to the TiDB.

initSql
string
(Optional)

InitSql is the SQL statements executed after the TiDB cluster is bootstrapped.

initSqlConfigMap
string
(Optional)

InitSqlConfigMapName reference a configmap that provide init-sql, take high precedence than initSql if set

passwordSecret
string
(Optional)
resources
Kubernetes core/v1.ResourceRequirements
(Optional)
timezone
string
(Optional)

Time zone of TiDB initializer Pods

tlsClientSecretName
string
(Optional)

TLSClientSecretName is the name of secret which stores tidb server client certificate Optional: Defaults to nil

status
TidbInitializerStatus

Most recently observed status of the TidbInitializer

TidbMonitor

TidbMonitor encode the spec and status of the monitoring component of a TiDB cluster

Field Description
apiVersion
string
pingcap.com/v1alpha1
kind
string
TidbMonitor
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
TidbMonitorSpec

Spec defines the desired state of TidbMonitor



clusters
[]TidbClusterRef
prometheus
PrometheusSpec
grafana
GrafanaSpec
(Optional)
reloader
ReloaderSpec
initializer
InitializerSpec
dm
DMMonitorSpec
thanos
ThanosSpec
(Optional)
pvReclaimPolicy
Kubernetes core/v1.PersistentVolumeReclaimPolicy

Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

imagePullPolicy
Kubernetes core/v1.PullPolicy
imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

persistent
bool
(Optional)
storageClassName
string
(Optional)
storage
string
(Optional)
nodeSelector
map[string]string
(Optional)
annotations
map[string]string
(Optional)
tolerations
[]Kubernetes core/v1.Toleration
(Optional)
kubePrometheusURL
string
(Optional)

kubePrometheusURL is where tidb-monitoring get the common metrics of kube-prometheus. Ref: https://github.com/coreos/kube-prometheus

alertmanagerURL
string
(Optional)

alertmanagerURL is where tidb-monitoring push alerts to. Ref: https://prometheus.io/docs/alerting/alertmanager/

alertManagerRulesVersion
string
(Optional)

alertManagerRulesVersion is the version of the tidb cluster that used for alert rules. default to current tidb cluster version, for example: v3.0.15

additionalContainers
[]Kubernetes core/v1.Container
(Optional)
clusterScoped
bool

ClusterScoped indicates whether this monitor should manage Kubernetes cluster-wide TiDB clusters

externalLabels
map[string]string

The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager).

replicaExternalLabelName
string

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 ("").

status
TidbMonitorStatus

Most recently observed status of the TidbMonitor

AutoResource

(Appears on: BasicAutoScalerSpec)

AutoResource describes the resource type definitions

Field Description
cpu
k8s.io/apimachinery/pkg/api/resource.Quantity

CPU defines the CPU of this resource type

memory
k8s.io/apimachinery/pkg/api/resource.Quantity

Memory defines the memory of this resource type

storage
k8s.io/apimachinery/pkg/api/resource.Quantity

Storage defines the storage of this resource type

count
int32

Count defines the max availabel count of this resource type

AutoRule

(Appears on: BasicAutoScalerSpec)

AutoRule describes the rules for auto-scaling with PD API

Field Description
max_threshold
float64

MaxThreshold defines the threshold to scale out

min_threshold
float64

MinThreshold defines the threshold to scale in, not applicable to storage rule

resource_types
[]string

ResourceTypes defines the resource types that can be used for scaling

BRConfig

(Appears on: BackupSpec, RestoreSpec)

BRConfig contains config for BR

Field Description
cluster
string

ClusterName of backup/restore cluster

clusterNamespace
string

Namespace of backup/restore cluster

db
string

Deprecated from BR v4.0.3. Please use Spec.TableFilter instead. DB is the specific DB which will be backed-up or restored

table
string

Deprecated from BR v4.0.3. Please use Spec.TableFilter instead. Table is the specific table which will be backed-up or restored

logLevel
string

LogLevel is the log level

statusAddr
string

StatusAddr is the HTTP listening address for the status report service. Set to empty string to disable

concurrency
uint32

Concurrency is the size of thread pool on each node that execute the backup task

rateLimit
uint

RateLimit is the rate limit of the backup task, MB/s per node

timeAgo
string

TimeAgo is the history version of the backup task, e.g. 1m, 1h

checksum
bool

Checksum specifies whether to run checksum after backup

sendCredToTikv
bool

SendCredToTikv specifies whether to send credentials to TiKV

onLine
bool

OnLine specifies whether online during restore

options
[]string

Options means options for backup data to remote storage with BR. These options has highest priority.

BackupCondition

(Appears on: BackupStatus)

BackupCondition describes the observed state of a Backup at a certain point.

Field Description
type
BackupConditionType
status
Kubernetes core/v1.ConditionStatus
lastTransitionTime
Kubernetes meta/v1.Time
reason
string
message
string

BackupConditionType

(Appears on: BackupCondition, BackupStatus)

BackupConditionType represents a valid condition of a Backup.

BackupScheduleSpec

(Appears on: BackupSchedule)

BackupScheduleSpec contains the backup schedule specification for a tidb cluster.

Field Description
schedule
string

Schedule specifies the cron string used for backup scheduling.

pause
bool

Pause means paused backupSchedule

maxBackups
int32

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.

maxReservedTime
string

MaxReservedTime is to specify how long backups we want to keep.

backupTemplate
BackupSpec

BackupTemplate is the specification of the backup structure to get scheduled.

storageClassName
string
(Optional)

The storageClassName of the persistent volume for Backup data storage if not storage class name set in BackupSpec. Defaults to Kubernetes default storage class.

storageSize
string

StorageSize is the request storage size for backup job

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

BackupScheduleStatus

(Appears on: BackupSchedule)

BackupScheduleStatus represents the current state of a BackupSchedule.

Field Description
lastBackup
string

LastBackup represents the last backup.

lastBackupTime
Kubernetes meta/v1.Time

LastBackupTime represents the last time the backup was successfully created.

allBackupCleanTime
Kubernetes meta/v1.Time

AllBackupCleanTime represents the time when all backup entries are cleaned up

BackupSpec

(Appears on: Backup, BackupScheduleSpec)

BackupSpec contains the backup specification for a tidb cluster.

Field Description
resources
Kubernetes core/v1.ResourceRequirements
from
TiDBAccessConfig

From is the tidb cluster that needs to backup.

backupType
BackupType

Type is the backup type for tidb cluster.

tikvGCLifeTime
string

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.

StorageProvider
StorageProvider

(Members of StorageProvider are embedded into this type.)

StorageProvider configures where and how backups should be stored.

storageClassName
string
(Optional)

The storageClassName of the persistent volume for Backup data storage. Defaults to Kubernetes default storage class.

storageSize
string

StorageSize is the request storage size for backup job

br
BRConfig

BRConfig is the configs for BR

dumpling
DumplingConfig

DumplingConfig is the configs for dumpling

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of backup Pods, components may add more tolerations upon this respectively

toolImage
string
(Optional)

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

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

tableFilter
[]string

TableFilter means Table filter expression for ‘db.table’ matching. BR supports this from v4.0.3.

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of backup Pods

useKMS
bool

Use KMS to decrypt the secrets

serviceAccount
string

Specify service account of backup

cleanPolicy
CleanPolicyType

CleanPolicy denotes whether to clean backup data when the object is deleted from the cluster, if not set, the backup data will be retained

BackupStatus

(Appears on: Backup)

BackupStatus represents the current status of a backup.

Field Description
backupPath
string

BackupPath is the location of the backup.

timeStarted
Kubernetes meta/v1.Time

TimeStarted is the time at which the backup was started.

timeCompleted
Kubernetes meta/v1.Time

TimeCompleted is the time at which the backup was completed.

backupSizeReadable
string

BackupSizeReadable is the data size of the backup. the difference with BackupSize is that its format is human readable

backupSize
int64

BackupSize is the data size of the backup.

commitTs
string

CommitTs is the snapshot time point of tidb cluster.

phase
BackupConditionType

Phase is a user readable state inferred from the underlying Backup conditions

conditions
[]BackupCondition

BackupStorageType

BackupStorageType represents the backend storage type of backup.

BackupType

(Appears on: BackupSpec, RestoreSpec)

BackupType represents the backup type.

BasicAuth

(Appears on: RemoteWriteSpec)

BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints

Field Description
username
Kubernetes core/v1.SecretKeySelector

The secret in the service monitor namespace that contains the username for authentication.

password
Kubernetes core/v1.SecretKeySelector

The secret in the service monitor namespace that contains the password for authentication.

BasicAutoScalerSpec

(Appears on: TidbAutoScalerSpec, TikvAutoScalerSpec)

BasicAutoScalerSpec describes the basic spec for auto-scaling

Field Description
rules
map[k8s.io/api/core/v1.ResourceName]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.AutoRule

Rules defines the rules for auto-scaling with PD API

scaleInIntervalSeconds
int32
(Optional)

ScaleInIntervalSeconds represents the duration seconds between each auto-scaling-in If not set, the default ScaleInIntervalSeconds will be set to 500

scaleOutIntervalSeconds
int32
(Optional)

ScaleOutIntervalSeconds represents the duration seconds between each auto-scaling-out If not set, the default ScaleOutIntervalSeconds will be set to 300

external
ExternalConfig
(Optional)

External makes the auto-scaler controller able to query the external service to fetch the recommended replicas for TiKV/TiDB

resources
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.AutoResource
(Optional)

Resources represent the resource type definitions that can be used for TiDB/TiKV The key is resource_type name of the resource

BasicAutoScalerStatus

(Appears on: TidbAutoScalerStatus, TikvAutoScalerStatus)

BasicAutoScalerStatus describe the basic auto-scaling status

Field Description
lastAutoScalingTimestamp
Kubernetes meta/v1.Time
(Optional)

LastAutoScalingTimestamp describes the last auto-scaling timestamp for the component(tidb/tikv)

Binlog

(Appears on: TiDBConfig)

Binlog is the config for binlog.

Field Description
enable
bool

optional

write-timeout
string
(Optional)

Optional: Defaults to 15s

ignore-error
bool
(Optional)

If IgnoreError is true, when writing binlog meets error, TiDB would ignore the error.

binlog-socket
string
(Optional)

Use socket file to write binlog, for compatible with kafka version tidb-binlog.

strategy
string
(Optional)

The strategy for sending binlog to pump, value can be “range,omitempty” or “hash,omitempty” now. Optional: Defaults to range

CleanPolicyType

(Appears on: BackupSpec)

CleanPolicyType represents the clean policy of backup data in remote storage

ClusterRef

(Appears on: DMMonitorSpec)

ClusterRef reference to a TidbCluster

Field Description
namespace
string
(Optional)

Namespace is the namespace that TidbCluster object locates, default to the same namespace with TidbMonitor

name
string

Name is the name of TidbCluster object

clusterDomain
string
(Optional)

ClusterDomain is the domain of TidbCluster object

CommonConfig

(Appears on: TiFlashConfig)

CommonConfig is the configuration of TiFlash process.

Field Description
tmp_path
string
(Optional)

Optional: Defaults to “/data0/tmp”

path_realtime_mode
bool
(Optional)

Optional: Defaults to false

mark_cache_size
int64
(Optional)

Optional: Defaults to 5368709120

minmax_index_cache_size
int64
(Optional)

Optional: Defaults to 5368709120

flash
Flash
(Optional)
logger
FlashLogger
(Optional)
security
FlashSecurity
(Optional)

ComponentAccessor

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

ComponentSpec

(Appears on: MasterSpec, PDSpec, PumpSpec, TiCDCSpec, TiDBSpec, TiFlashSpec, TiKVSpec, WorkerSpec)

ComponentSpec is the base spec of each component, the fields should always accessed by the BasicSpec() method to respect the cluster-level properties

Field Description
image
string

(Deprecated) Image of the component Use baseImage and version instead

version
string
(Optional)

Version of the component. Override the cluster-level version if non-empty Optional: Defaults to cluster-level setting

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present Optional: Defaults to cluster-level setting

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

hostNetwork
bool
(Optional)

Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present Optional: Defaults to cluster-level setting

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of the component. Override the cluster-level setting if present. Optional: Defaults to cluster-level setting

priorityClassName
string
(Optional)

PriorityClassName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting

schedulerName
string
(Optional)

SchedulerName of the component. Override the cluster-level one if present Optional: Defaults to cluster-level setting

nodeSelector
map[string]string
(Optional)

NodeSelector of the component. Merged into the cluster-level nodeSelector if non-empty Optional: Defaults to cluster-level setting

annotations
map[string]string
(Optional)

Annotations of the component. Merged into the cluster-level annotations if non-empty Optional: Defaults to cluster-level setting

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Tolerations of the component. Override the cluster-level tolerations if non-empty Optional: Defaults to cluster-level setting

podSecurityContext
Kubernetes core/v1.PodSecurityContext
(Optional)

PodSecurityContext of the component

configUpdateStrategy
ConfigUpdateStrategy
(Optional)

ConfigUpdateStrategy of the component. Override the cluster-level updateStrategy if present Optional: Defaults to cluster-level setting

env
[]Kubernetes core/v1.EnvVar
(Optional)

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

initContainers
[]Kubernetes core/v1.Container
(Optional)

Init containers of the components

additionalContainers
[]Kubernetes core/v1.Container
(Optional)

Additional containers of the component.

additionalVolumes
[]Kubernetes core/v1.Volume
(Optional)

Additional volumes of component pod.

additionalVolumeMounts
[]Kubernetes core/v1.VolumeMount

Additional volume mounts of component pod.

terminationGracePeriodSeconds
int64
(Optional)

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.

statefulSetUpdateStrategy
Kubernetes apps/v1.StatefulSetUpdateStrategyType
(Optional)

StatefulSetUpdateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.

ConfigMapRef

(Appears on: PrometheusConfiguration)

ConfigMapRef is the external configMap

Field Description
name
string
namespace
string
(Optional)

if the namespace is omitted, the operator controller would use the Tidbmonitor’s namespace instead.

ConfigUpdateStrategy

(Appears on: ComponentSpec, TidbClusterSpec)

ConfigUpdateStrategy represents the strategy to update configuration

CoprocessorCache

(Appears on: TiKVClient)

CoprocessorCache is the config for coprocessor cache.

Field Description
enable
bool
(Optional)

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.

capacity-mb
float64
(Optional)

The capacity in MB of the cache.

admission-max-result-mb
float64
(Optional)

Only cache requests whose result set is small.

admission-min-process-ms
uint64
(Optional)

Only cache requests takes notable time to process.

CrdKind

(Appears on: CrdKinds)

Field Description
Kind
string
Plural
string
SpecName
string
ShortNames
[]string
AdditionalPrinterColums
[]k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1.CustomResourceColumnDefinition

CrdKinds

Field Description
KindsString
string
TiDBCluster
CrdKind
DMCluster
CrdKind
Backup
CrdKind
Restore
CrdKind
BackupSchedule
CrdKind
TiDBMonitor
CrdKind
TiDBInitializer
CrdKind
TidbClusterAutoScaler
CrdKind

DMClusterCondition

(Appears on: DMClusterStatus)

DMClusterCondition is dm cluster condition

Field Description
type
DMClusterConditionType

Type of the condition.

status
Kubernetes core/v1.ConditionStatus

Status of the condition, one of True, False, Unknown.

lastUpdateTime
Kubernetes meta/v1.Time

The last time this condition was updated.

lastTransitionTime
Kubernetes meta/v1.Time
(Optional)

Last time the condition transitioned from one status to another.

reason
string
(Optional)

The reason for the condition’s last transition.

message
string
(Optional)

A human readable message indicating details about the transition.

DMClusterConditionType

(Appears on: DMClusterCondition)

DMClusterConditionType represents a dm cluster condition value.

DMClusterSpec

(Appears on: DMCluster)

DMClusterSpec describes the attributes that a user creates on a dm cluster

Field Description
discovery
DMDiscoverySpec

Discovery spec

master
MasterSpec
(Optional)

dm-master cluster spec

worker
WorkerSpec
(Optional)

dm-worker cluster spec

paused
bool
(Optional)

Indicates that the dm cluster is paused and will not be processed by the controller.

version
string
(Optional)

dm cluster version

schedulerName
string

SchedulerName of DM cluster Pods

pvReclaimPolicy
Kubernetes core/v1.PersistentVolumeReclaimPolicy

Persistent volume reclaim policy applied to the PVs that consumed by DM cluster

imagePullPolicy
Kubernetes core/v1.PullPolicy

ImagePullPolicy of DM cluster Pods

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

enablePVReclaim
bool
(Optional)

Whether enable PVC reclaim for orphan PVC left by statefulset scale-in Optional: Defaults to false

tlsCluster
TLSCluster
(Optional)

Whether enable the TLS connection between DM server components Optional: Defaults to nil

tlsClientSecretNames
[]string
(Optional)

TLSClientSecretNames are the names of secrets which stores mysql/tidb server client certificates that used by dm-master and dm-worker.

hostNetwork
bool
(Optional)

Whether Hostnetwork is enabled for DM cluster Pods Optional: Defaults to false

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of DM cluster Pods

priorityClassName
string
(Optional)

PriorityClassName of DM cluster Pods Optional: Defaults to omitted

nodeSelector
map[string]string
(Optional)

Base node selectors of DM cluster Pods, components may add or override selectors upon this respectively

annotations
map[string]string
(Optional)

Base annotations of DM cluster Pods, components may add or override selectors upon this respectively

timezone
string
(Optional)

Time zone of DM cluster Pods Optional: Defaults to UTC

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of DM cluster Pods, components may add more tolerations upon this respectively

DMClusterStatus

(Appears on: DMCluster)

DMClusterStatus represents the current status of a dm cluster.

Field Description
master
MasterStatus
worker
WorkerStatus
conditions
[]DMClusterCondition
(Optional)

Represents the latest available observations of a dm cluster’s state.

DMDiscoverySpec

(Appears on: DMClusterSpec)

DMDiscoverySpec contains details of Discovery members for dm

Field Description
address
string

Address indicates the existed TiDB discovery address

DMMonitorSpec

(Appears on: TidbMonitorSpec)

Field Description
clusters
[]ClusterRef
initializer
InitializerSpec

DMSecurityConfig

(Appears on: MasterConfig, WorkerConfig)

DM common security config

Field Description
ssl-ca
string
(Optional)

SSLCA is the path of file that contains list of trusted SSL CAs.

ssl-cert
string
(Optional)

SSLCert is the path of file that contains X509 certificate in PEM format.

ssl-key
string
(Optional)

SSLKey is the path of file that contains X509 key in PEM format.

cert-allowed-cn
[]string
(Optional)

CertAllowedCN is the Common Name that allowed

DashboardConfig

(Appears on: PDConfig)

DashboardConfig is the configuration for tidb-dashboard.

Field Description
tidb-cacert-path
string
(Optional)
tidb-cert-path
string
(Optional)
tidb-key-path
string
(Optional)
public-path-prefix
string
(Optional)
internal-proxy
bool
(Optional)
disable-telemetry
bool
(Optional)

When not disabled, usage data will be sent to PingCAP for improving user experience. Optional: Defaults to false Deprecated in PD v4.0.3, use EnableTelemetry instead

enable-telemetry
bool
(Optional)

When enabled, usage data will be sent to PingCAP for improving user experience. Optional: Defaults to true

enable-experimental
bool
(Optional)

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

DeploymentStorageStatus

(Appears on: TidbMonitorStatus)

DeploymentStorageStatus is the storage information of the deployment

Field Description
pvName
string

PV name

DiscoverySpec

(Appears on: TidbClusterSpec)

DiscoverySpec contains details of Discovery members

Field Description
ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

DumplingConfig

(Appears on: BackupSpec)

DumplingConfig contains config for dumpling

Field Description
options
[]string

Options means options for backup data to remote storage with dumpling.

tableFilter
[]string

Deprecated. Please use Spec.TableFilter instead. TableFilter means Table filter expression for ‘db.table’ matching

Experimental

(Appears on: TiDBConfig)

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.

Field Description
allow-auto-random
bool
(Optional)

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.

allow-expression-index
bool
(Optional)

Whether enable creating expression index.

ExternalConfig

(Appears on: BasicAutoScalerSpec)

ExternalConfig represents the external config.

Field Description
endpoint
ExternalEndpoint
(Optional)

ExternalEndpoint makes the auto-scaler controller able to query the external service to fetch the recommended replicas for TiKV/TiDB

maxReplicas
int32

maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale out.

ExternalEndpoint

(Appears on: ExternalConfig)

ExternalEndpoint describes the external service endpoint which provides the ability to get the tikv/tidb auto-scaling recommended replicas

Field Description
host
string

Host indicates the external service’s host

port
int32

Port indicates the external service’s port

path
string

Path indicates the external service’s path

tlsSecret
SecretRef
(Optional)

TLSSecret indicates the Secret which stores the TLS configuration. If set, the operator will use https to communicate to the external service

FileLogConfig

(Appears on: Log, PDLogConfig)

Field Description
filename
string
(Optional)

Log filename, leave empty to disable file log.

log-rotate
bool
(Optional)

Deprecated in v4.0.0 Is log rotate enabled.

max-size
int
(Optional)

Max size for a single file, in MB.

max-days
int
(Optional)

Max log keep days, default is never deleting.

max-backups
int
(Optional)

Maximum number of old log files to retain.

Flash

(Appears on: CommonConfig)

Flash is the configuration of [flash] section.

Field Description
overlap_threshold
float64
(Optional)

Optional: Defaults to 0.6

compact_log_min_period
int32
(Optional)

Optional: Defaults to 200

flash_cluster
FlashCluster
(Optional)
proxy
FlashProxy
(Optional)

FlashCluster

(Appears on: Flash)

FlashCluster is the configuration of [flash.flash_cluster] section.

Field Description
log
string
(Optional)

Optional: Defaults to /data0/logs/flash_cluster_manager.log

refresh_interval
int32
(Optional)

Optional: Defaults to 20

update_rule_interval
int32
(Optional)

Optional: Defaults to 10

master_ttl
int32
(Optional)

Optional: Defaults to 60

FlashLogger

(Appears on: CommonConfig)

FlashLogger is the configuration of [logger] section.

Field Description
errorlog
string
(Optional)

Optional: Defaults to /data0/logs/error.log

size
string
(Optional)

Optional: Defaults to 100M

log
string
(Optional)

Optional: Defaults to /data0/logs/server.log

level
string
(Optional)

Optional: Defaults to information

count
int32
(Optional)

Optional: Defaults to 10

FlashProxy

(Appears on: Flash)

FlashProxy is the configuration of [flash.proxy] section.

Field Description
addr
string
(Optional)

Optional: Defaults to 0.0.0.0:20170

advertise-addr
string
(Optional)

Optional: Defaults to {clusterName}-tiflash-POD_NUM.{clusterName}-tiflash-peer.{namespace}:20170

data-dir
string
(Optional)

Optional: Defaults to /data0/proxy

config
string
(Optional)

Optional: Defaults to /data0/proxy.toml

log-file
string
(Optional)

Optional: Defaults to /data0/logs/proxy.log

FlashSecurity

(Appears on: CommonConfig)

Field Description
ca_path
string
(Optional)

Be set automatically by Operator

cert_path
string
(Optional)

Be set automatically by Operator

key_path
string
(Optional)

Be set automatically by Operator

cert_allowed_cn
[]string
(Optional)

CertAllowedCN is the Common Name that allowed

FlashServerConfig

(Appears on: ProxyConfig)

FlashServerConfig is the configuration of Proxy server.

Field Description
engine-addr
string
(Optional)

Default to {clusterName}-tiflash-POD_NUM.{clusterName}-tiflash-peer.{namespace}:3930

status-addr
string
(Optional)

Default to 0.0.0.0:20292

advertise-status-addr
string
(Optional)

Default to {clusterName}-tiflash-POD_NUM.{clusterName}-tiflash-peer.{namespace}:20292

TiKVServerConfig
TiKVServerConfig

(Members of TiKVServerConfig are embedded into this type.)

GcsStorageProvider

(Appears on: StorageProvider)

GcsStorageProvider represents the google cloud storage for storing backups.

Field Description
projectId
string

ProjectId represents the project that organizes all your Google Cloud Platform resources

location
string

Location in which the gcs bucket is located.

path
string

Path is the full path where the backup is saved. The format of the path must be: “/”

bucket
string

Bucket in which to store the backup data.

storageClass
string

StorageClass represents the storage class

objectAcl
string

ObjectAcl represents the access control list for new objects

bucketAcl
string

BucketAcl represents the access control list for new buckets

secretName
string

SecretName is the name of secret which stores the gcs service account credentials JSON.

prefix
string

Prefix of the data path.

GrafanaSpec

(Appears on: TidbMonitorSpec)

GrafanaSpec is the desired state of grafana

Field Description
MonitorContainer
MonitorContainer

(Members of MonitorContainer are embedded into this type.)

logLevel
string
service
ServiceSpec
username
string
password
string
envs
map[string]string
(Optional)
ingress
IngressSpec
(Optional)

HelperSpec

(Appears on: TidbClusterSpec)

HelperSpec contains details of helper component

Field Description
image
string
(Optional)

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

imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present Optional: Defaults to the cluster-level setting

IngressSpec

(Appears on: GrafanaSpec, PrometheusSpec)

IngressSpec describe the ingress desired state for the target component

Field Description
hosts
[]string

Hosts describe the hosts for the ingress

annotations
map[string]string
(Optional)

Annotations describe the desired annotations for the ingress

tls
[]Kubernetes extensions/v1beta1.IngressTLS
(Optional)

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.

InitializePhase

(Appears on: TidbInitializerStatus)

InitializerSpec

(Appears on: DMMonitorSpec, TidbMonitorSpec)

InitializerSpec is the desired state of initializer

Field Description
MonitorContainer
MonitorContainer

(Members of MonitorContainer are embedded into this type.)

envs
map[string]string
(Optional)

Interval

(Appears on: Quota)

Interval is the configuration of [quotas.default.interval] section.

Field Description
duration
int32
(Optional)

Optional: Defaults to 3600

queries
int32
(Optional)

Optional: Defaults to 0

errors
int32
(Optional)

Optional: Defaults to 0

result_rows
int32
(Optional)

Optional: Defaults to 0

read_rows
int32
(Optional)

Optional: Defaults to 0

execution_time
int32
(Optional)

Optional: Defaults to 0

IsolationRead

(Appears on: TiDBConfig)

IsolationRead is the config for isolation read.

Field Description
engines
[]string
(Optional)

Engines filters tidb-server access paths by engine type. imported from v3.1.0

LocalStorageProvider

(Appears on: StorageProvider)

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

Field Description
volume
Kubernetes core/v1.Volume
volumeMount
Kubernetes core/v1.VolumeMount
prefix
string

Log

(Appears on: TiDBConfig)

Log is the log section of config.

Field Description
level
string
(Optional)

Log level. Optional: Defaults to info

format
string
(Optional)

Log format. one of json, text, or console. Optional: Defaults to text

disable-timestamp
bool
(Optional)

Deprecated in v3.0.5. Use EnableTimestamp instead Disable automatic timestamps in output.

enable-timestamp
bool
(Optional)

EnableTimestamp enables automatic timestamps in log output.

enable-error-stack
bool
(Optional)

EnableErrorStack enables annotating logs with the full stack error message.

file
FileLogConfig
(Optional)

File log config.

enable-slow-log
bool
(Optional)
slow-query-file
string
(Optional)
slow-threshold
uint64
(Optional)

Optional: Defaults to 300

expensive-threshold
uint
(Optional)

Optional: Defaults to 10000

query-log-max-len
uint64
(Optional)

Optional: Defaults to 2048

record-plan-in-slow-log
uint32
(Optional)

Optional: Defaults to 1

LogTailerSpec

(Appears on: TiFlashSpec, TiKVSpec)

LogTailerSpec represents an optional log tailer sidecar container

Field Description
ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

MasterConfig

(Appears on: MasterSpec)

MasterConfig is the configuration of dm-master-server

Field Description
log-level
string
(Optional)

Log level. Optional: Defaults to info

log-file
string
(Optional)

File log config.

log-format
string
(Optional)

Log format. one of json or text.

rpc-timeout
string
(Optional)

RPC timeout when dm-master request to dm-worker Optional: Defaults to 30s

rpc-rate-limit
float64
(Optional)

RPC agent rate limit when dm-master request to dm-worker Optional: Defaults to 10

rpc-rate-burst
int
(Optional)

RPC agent rate burst when dm-master request to dm-worker Optional: Defaults to 40

DMSecurityConfig
DMSecurityConfig

(Members of DMSecurityConfig are embedded into this type.)

(Optional)

dm-master’s security config

MasterFailureMember

(Appears on: MasterStatus)

MasterFailureMember is the dm-master failure member information

Field Description
podName
string
memberID
string
pvcUID
k8s.io/apimachinery/pkg/types.UID
memberDeleted
bool
createdAt
Kubernetes meta/v1.Time

MasterKeyFileConfig

(Appears on: TiKVMasterKeyConfig, TiKVSecurityConfigEncryptionMasterKey, TiKVSecurityConfigEncryptionPreviousMasterKey)

Field Description
method
string

Encrypyion method, use master key encryption data key Possible values: plaintext, aes128-ctr, aes192-ctr, aes256-ctr Optional: Default to plaintext optional

path
string

Text file containing the key in hex form, end with ‘\n’

MasterKeyKMSConfig

(Appears on: TiKVMasterKeyConfig, TiKVSecurityConfigEncryptionMasterKey, TiKVSecurityConfigEncryptionPreviousMasterKey)

Field Description
key-id
string

AWS CMK key-id it can be find in AWS Console or use aws cli This field is required

access-key
string

AccessKey of AWS user, leave empty if using other authrization method optional

secret-access-key
string

SecretKey of AWS user, leave empty if using other authrization method optional

region
string

Region of this KMS key Optional: Default to us-east-1 optional

endpoint
string

Used for KMS compatible KMS, such as Ceph, minio, If use AWS, leave empty optional

MasterMember

(Appears on: MasterStatus)

MasterMember is dm-master member status

Field Description
name
string
id
string

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

clientURL
string
health
bool
lastTransitionTime
Kubernetes meta/v1.Time

Last time the health transitioned from one to another.

MasterServiceSpec

(Appears on: MasterSpec)

Field Description
ServiceSpec
ServiceSpec

(Members of ServiceSpec are embedded into this type.)

externalTrafficPolicy
Kubernetes core/v1.ServiceExternalTrafficPolicyType
(Optional)

ExternalTrafficPolicy of the service Optional: Defaults to omitted

masterNodePort
int
(Optional)

Optional: Defaults to 0

MasterSpec

(Appears on: DMClusterSpec)

MasterSpec contains details of dm-master members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

service
MasterServiceSpec
(Optional)

Service defines a Kubernetes service of Master cluster. Optional: Defaults to .spec.services in favor of backward compatibility

maxFailoverCount
int32
(Optional)

MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover. Optional: Defaults to 3

storageClassName
string
(Optional)

The storageClassName of the persistent volume for dm-master data storage. Defaults to Kubernetes default storage class.

storageSize
string
(Optional)

StorageSize is the request storage size for dm-master. Defaults to “10Gi”.

dataSubDir
string
(Optional)

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

config
MasterConfig
(Optional)

Config is the Configuration of dm-master-servers

MasterStatus

(Appears on: DMClusterStatus)

MasterStatus is dm-master status

Field Description
synced
bool
phase
MemberPhase
statefulSet
Kubernetes apps/v1.StatefulSetStatus
members
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MasterMember
leader
MasterMember
failureMembers
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MasterFailureMember
unjoinedMembers
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.UnjoinedMember
image
string

MemberPhase

(Appears on: MasterStatus, PDStatus, PumpStatus, TiCDCStatus, TiDBStatus, TiKVStatus, WorkerStatus)

MemberPhase is the current state of member

MemberType

MemberType represents member type

MonitorComponentAccessor

MonitorContainer

(Appears on: GrafanaSpec, InitializerSpec, PrometheusSpec, ReloaderSpec, ThanosSpec)

MonitorContainer is the common attributes of the container of monitoring

Field Description
ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

baseImage
string
version
string
imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)

Networks

(Appears on: User)

Networks is the configuration of [users.readonly.networks] section.

Field Description
ip
string
(Optional)

OpenTracing

(Appears on: TiDBConfig)

OpenTracing is the opentracing section of the config.

Field Description
enable
bool
(Optional)

Optional: Defaults to false

sampler
OpenTracingSampler
(Optional)
reporter
OpenTracingReporter
(Optional)
rpc-metrics
bool
(Optional)

OpenTracingReporter

(Appears on: OpenTracing)

OpenTracingReporter is the config for opentracing reporter. See https://godoc.org/github.com/uber/jaeger-client-go/config#ReporterConfig

Field Description
queue-size
int
(Optional)
buffer-flush-interval
time.Duration
(Optional)
log-spans
bool
(Optional)
local-agent-host-port
string
(Optional)

OpenTracingSampler

(Appears on: OpenTracing)

OpenTracingSampler is the config for opentracing sampler. See https://godoc.org/github.com/uber/jaeger-client-go/config#SamplerConfig

Field Description
type
string
(Optional)
param
float64
(Optional)
sampling-server-url
string
(Optional)
max-operations
int
(Optional)
sampling-refresh-interval
time.Duration
(Optional)

PDConfig

PDConfig is the configuration of pd-server

Field Description
force-new-cluster
bool
(Optional)
enable-grpc-gateway
bool
(Optional)

Optional: Defaults to true

initial-cluster-token
string
(Optional)

set different tokens to prevent communication between PDs in different clusters.

lease
int64
(Optional)

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

log
PDLogConfig
(Optional)

Log related config.

log-file
string
(Optional)

Backward compatibility.

log-level
string
(Optional)
tso-save-interval
string
(Optional)

TsoSaveInterval is the interval to save timestamp. Optional: Defaults to 3s

metric
PDMetricConfig
(Optional)
schedule
PDScheduleConfig
(Optional)

Immutable, change should be made through pd-ctl after cluster creation

replication
PDReplicationConfig
(Optional)

Immutable, change should be made through pd-ctl after cluster creation

namespace
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDNamespaceConfig
(Optional)
pd-server
PDServerConfig
(Optional)
cluster-version
string
(Optional)
quota-backend-bytes
string
(Optional)

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.

auto-compaction-mode
string
(Optional)

AutoCompactionMode is either ‘periodic’ or ‘revision’. The default value is ‘periodic’.

auto-compaction-retention-v2
string
(Optional)

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.

tikv-interval
string
(Optional)

TickInterval is the interval for etcd Raft tick.

election-interval
string
(Optional)

ElectionInterval is the interval for etcd Raft election.

enable-prevote
bool
(Optional)

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

security
PDSecurityConfig
(Optional)
label-property
PDLabelPropertyConfig
(Optional)
namespace-classifier
string
(Optional)

Deprecated in v4.0.0 NamespaceClassifier is for classifying stores/regions into different namespaces. Optional: Defaults to true

dashboard
DashboardConfig
(Optional)

PDConfigWraper

(Appears on: PDSpec)

Field Description
GenericConfig
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig

PDFailureMember

(Appears on: PDStatus)

PDFailureMember is the pd failure member information

Field Description
podName
string
memberID
string
pvcUID
k8s.io/apimachinery/pkg/types.UID
pvcUIDSet
map[k8s.io/apimachinery/pkg/types.UID]struct{}
memberDeleted
bool
createdAt
Kubernetes meta/v1.Time

PDLabelPropertyConfig

(Appears on: PDConfig)

PDLogConfig

(Appears on: PDConfig)

PDLogConfig serializes log related config in toml/json.

Field Description
level
string
(Optional)

Log level. Optional: Defaults to info

format
string
(Optional)

Log format. one of json, text, or console.

disable-timestamp
bool
(Optional)

Disable automatic timestamps in output.

file
FileLogConfig
(Optional)

File log config.

development
bool
(Optional)

Development puts the logger in development mode, which changes the behavior of DPanicLevel and takes stacktraces more liberally.

disable-caller
bool
(Optional)

DisableCaller stops annotating logs with the calling function’s file name and line number. By default, all logs are annotated.

disable-stacktrace
bool
(Optional)

DisableStacktrace completely disables automatic stacktrace capturing. By default, stacktraces are captured for WarnLevel and above logs in development and ErrorLevel and above in production.

disable-error-verbose
bool
(Optional)

DisableErrorVerbose stops annotating logs with the full verbose error message.

PDMember

(Appears on: PDStatus)

PDMember is PD member

Field Description
name
string
id
string

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

clientURL
string
health
bool
lastTransitionTime
Kubernetes meta/v1.Time

Last time the health transitioned from one to another.

PDMetricConfig

(Appears on: PDConfig)

Field Description
job
string
(Optional)
address
string
(Optional)
interval
string
(Optional)

PDNamespaceConfig

(Appears on: PDConfig)

PDNamespaceConfig is to overwrite the global setting for specific namespace

Field Description
leader-schedule-limit
uint64
(Optional)

LeaderScheduleLimit is the max coexist leader schedules.

region-schedule-limit
uint64
(Optional)

RegionScheduleLimit is the max coexist region schedules.

replica-schedule-limit
uint64
(Optional)

ReplicaScheduleLimit is the max coexist replica schedules.

merge-schedule-limit
uint64
(Optional)

MergeScheduleLimit is the max coexist merge schedules.

hot-region-schedule-limit
uint64
(Optional)

HotRegionScheduleLimit is the max coexist hot region schedules.

max-replicas
uint64
(Optional)

MaxReplicas is the number of replicas for each region.

PDReplicationConfig

(Appears on: PDConfig)

PDReplicationConfig is the replication configuration.

Field Description
max-replicas
uint64
(Optional)

MaxReplicas is the number of replicas for each region. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 3

location-labels
[]string
(Optional)

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

strictly-match-label
bool
(Optional)

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

enable-placement-rules
bool
(Optional)

When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not used anymore.

PDScheduleConfig

(Appears on: PDConfig)

ScheduleConfig is the schedule configuration.

Field Description
max-snapshot-count
uint64
(Optional)

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

max-pending-peer-count
uint64
(Optional)

Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 16

max-merge-region-size
uint64
(Optional)

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

max-merge-region-keys
uint64
(Optional)

Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 200000

split-merge-interval
string
(Optional)

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

patrol-region-interval
string
(Optional)

PatrolRegionInterval is the interval for scanning region during patrol. Immutable, change should be made through pd-ctl after cluster creation

max-store-down-time
string
(Optional)

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

leader-schedule-limit
uint64
(Optional)

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

region-schedule-limit
uint64
(Optional)

RegionScheduleLimit is the max coexist region schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 2048

replica-schedule-limit
uint64
(Optional)

ReplicaScheduleLimit is the max coexist replica schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 64

merge-schedule-limit
uint64
(Optional)

MergeScheduleLimit is the max coexist merge schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 8

hot-region-schedule-limit
uint64
(Optional)

HotRegionScheduleLimit is the max coexist hot region schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 4

hot-region-cache-hits-threshold
uint64
(Optional)

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

tolerant-size-ratio
float64
(Optional)

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

low-space-ratio
float64
(Optional)
 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

high-space-ratio
float64
(Optional)

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

disable-raft-learner
bool
(Optional)

DisableLearner is the option to disable using AddLearnerNode instead of AddNode Immutable, change should be made through pd-ctl after cluster creation

disable-remove-down-replica
bool
(Optional)

DisableRemoveDownReplica is the option to prevent replica checker from removing down replicas. Immutable, change should be made through pd-ctl after cluster creation

disable-replace-offline-replica
bool
(Optional)

DisableReplaceOfflineReplica is the option to prevent replica checker from repalcing offline replicas. Immutable, change should be made through pd-ctl after cluster creation

disable-make-up-replica
bool
(Optional)

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

disable-remove-extra-replica
bool
(Optional)

DisableRemoveExtraReplica is the option to prevent replica checker from removing extra replicas. Immutable, change should be made through pd-ctl after cluster creation

disable-location-replacement
bool
(Optional)

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

disable-namespace-relocation
bool
(Optional)

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

schedulers-v2
PDSchedulerConfigs
(Optional)

Schedulers support for loding customized schedulers Immutable, change should be made through pd-ctl after cluster creation

schedulers-payload
map[string]string
(Optional)

Only used to display

enable-one-way-merge
bool
(Optional)

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

enable-cross-table-merge
bool
(Optional)

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

PDSchedulerConfig

PDSchedulerConfig is customized scheduler configuration

Field Description
type
string
(Optional)

Immutable, change should be made through pd-ctl after cluster creation

args
[]string
(Optional)

Immutable, change should be made through pd-ctl after cluster creation

disable
bool
(Optional)

Immutable, change should be made through pd-ctl after cluster creation

PDSchedulerConfigs

(Appears on: PDScheduleConfig)

PDSecurityConfig

(Appears on: PDConfig)

PDSecurityConfig is the configuration for supporting tls.

Field Description
cacert-path
string
(Optional)

CAPath is the path of file that contains list of trusted SSL CAs.

cert-path
string
(Optional)

CertPath is the path of file that contains X509 certificate in PEM format.

key-path
string
(Optional)

KeyPath is the path of file that contains X509 key in PEM format.

cert-allowed-cn
[]string
(Optional)

CertAllowedCN is the Common Name that allowed

PDServerConfig

(Appears on: PDConfig)

PDServerConfig is the configuration for pd server.

Field Description
use-region-storage
bool
(Optional)

UseRegionStorage enables the independent region storage.

metric-storage
string
(Optional)

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

PDSpec

(Appears on: TidbClusterSpec)

PDSpec contains details of PD members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

serviceAccount
string

Specify a Service Account for pd

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

service
ServiceSpec
(Optional)

Service defines a Kubernetes service of PD cluster. Optional: Defaults to .spec.services in favor of backward compatibility

maxFailoverCount
int32
(Optional)

MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover. Optional: Defaults to 3

storageClassName
string
(Optional)

The storageClassName of the persistent volume for PD data storage. Defaults to Kubernetes default storage class.

storageVolumes
[]StorageVolume
(Optional)

StorageVolumes configure additional storage for PD pods.

dataSubDir
string
(Optional)

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

config
PDConfigWraper
(Optional)

Config is the Configuration of pd-servers

tlsClientSecretName
string
(Optional)

TLSClientSecretName is the name of secret which stores tidb server client certificate which used by Dashboard.

enableDashboardInternalProxy
bool
(Optional)

(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.

mountClusterClientSecret
bool
(Optional)

MountClusterClientSecret indicates whether to mount cluster-client-secret to the Pod

PDStatus

(Appears on: TidbClusterStatus)

PDStatus is PD status

Field Description
synced
bool
phase
MemberPhase
statefulSet
Kubernetes apps/v1.StatefulSetStatus
members
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMember

Members contains PDs in current TidbCluster

peerMembers
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMember

PeerMembers contains PDs NOT in current TidbCluster

leader
PDMember
failureMembers
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDFailureMember
unjoinedMembers
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.UnjoinedMember
image
string

PDStoreLabel

PDStoreLabel is the config item of LabelPropertyConfig.

Field Description
key
string
(Optional)
value
string
(Optional)

PDStoreLabels

Performance

(Appears on: TiDBConfig)

Performance is the performance section of the config.

Field Description
max-procs
uint
(Optional)
max-memory
uint64
(Optional)

Optional: Defaults to 0

stats-lease
string
(Optional)

Optional: Defaults to 3s

stmt-count-limit
uint
(Optional)

Optional: Defaults to 5000

feedback-probability
float64
(Optional)

Optional: Defaults to 0.05

query-feedback-limit
uint
(Optional)

Optional: Defaults to 512

pseudo-estimate-ratio
float64
(Optional)

Optional: Defaults to 0.8

force-priority
string
(Optional)

Optional: Defaults to NO_PRIORITY

bind-info-lease
string
(Optional)

Optional: Defaults to 3s

txn-total-size-limit
uint64
(Optional)

Optional: Defaults to 104857600

tcp-keep-alive
bool
(Optional)

Optional: Defaults to true

cross-join
bool
(Optional)

Optional: Defaults to true

run-auto-analyze
bool
(Optional)

Optional: Defaults to true

agg-push-down-join
bool
(Optional)
committer-concurrency
int
(Optional)
max-txn-ttl
uint64
(Optional)
txn-entry-count-limit
uint64
(Optional)

Deprecated in v4.0.0 Optional: Defaults to 300000

PessimisticTxn

(Appears on: TiDBConfig)

PessimisticTxn is the config for pessimistic transaction.

Field Description
enable
bool
(Optional)

Enable must be true for ‘begin lock’ or session variable to start a pessimistic transaction. Optional: Defaults to true

max-retry-count
uint
(Optional)

The max count of retry for a single statement in a pessimistic transaction. Optional: Defaults to 256

PlanCache

PlanCache is the PlanCache section of the config.

Field Description
enabled
bool
(Optional)
capacity
uint
(Optional)
shards
uint
(Optional)

Plugin

(Appears on: TiDBConfig)

Plugin is the config for plugin

Field Description
dir
string
(Optional)
load
string
(Optional)

PreparedPlanCache

(Appears on: TiDBConfig)

PreparedPlanCache is the PreparedPlanCache section of the config.

Field Description
enabled
bool
(Optional)

Optional: Defaults to false

capacity
uint
(Optional)

Optional: Defaults to 100

memory-guard-ratio
float64
(Optional)

Optional: Defaults to 0.1

Profile

Profile is the configuration profiles.

Field Description
readonly
int32
(Optional)
max_memory_usage
int64
(Optional)
use_uncompressed_cache
int32
(Optional)
load_balancing
string
(Optional)

PrometheusConfiguration

(Appears on: PrometheusSpec)

Config is the the desired state of Prometheus Configuration

Field Description
configMapRef
ConfigMapRef

user can mount prometheus rule config with external configMap.If use this feature, the external configMap must contain prometheus-config key in data.

commandOptions
[]string

user can use it specify prometheus command options

PrometheusSpec

(Appears on: TidbMonitorSpec)

PrometheusSpec is the desired state of prometheus

Field Description
MonitorContainer
MonitorContainer

(Members of MonitorContainer are embedded into this type.)

logLevel
string
service
ServiceSpec
reserveDays
int
(Optional)
ingress
IngressSpec
(Optional)
config
PrometheusConfiguration
(Optional)
disableCompaction
bool

Disable prometheus compaction.

remoteWrite
[]*github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.RemoteWriteSpec

If specified, the remote_write spec. This is an experimental feature, it may change in any upcoming release in a breaking way.

ProxyConfig

(Appears on: TiFlashConfig)

ProxyConfig is the configuration of TiFlash proxy process. All the configurations are same with those of TiKV except adding engine-addr in the TiKVServerConfig

Field Description
log-level
string
(Optional)

Optional: Defaults to info

log-file
string
(Optional)
log-rotation-timespan
string
(Optional)

Optional: Defaults to 24h

panic-when-unexpected-key-or-data
bool
(Optional)
server
FlashServerConfig
(Optional)
storage
TiKVStorageConfig
(Optional)
raftstore
TiKVRaftstoreConfig
(Optional)
rocksdb
TiKVDbConfig
(Optional)
coprocessor
TiKVCoprocessorConfig
(Optional)
readpool
TiKVReadPoolConfig
(Optional)
raftdb
TiKVRaftDBConfig
(Optional)
import
TiKVImportConfig
(Optional)
gc
TiKVGCConfig
(Optional)
pd
TiKVPDConfig
(Optional)
security
TiKVSecurityConfig
(Optional)

ProxyProtocol

(Appears on: TiDBConfig)

ProxyProtocol is the PROXY protocol section of the config.

Field Description
networks
string
(Optional)

PROXY protocol acceptable client networks. Empty *string means disable PROXY protocol, * means all networks.

header-timeout
uint
(Optional)

PROXY protocol header read timeout, Unit is second.

PumpSpec

(Appears on: TidbClusterSpec)

PumpSpec contains details of Pump members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

serviceAccount
string

Specify a Service Account for pump

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

storageClassName
string
(Optional)

The storageClassName of the persistent volume for Pump data storage. Defaults to Kubernetes default storage class.

config
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig
(Optional)

The configuration of Pump cluster.

setTimeZone
bool

For backward compatibility with helm chart

PumpStatus

(Appears on: TidbClusterStatus)

PumpStatus is Pump status

Field Description
phase
MemberPhase
statefulSet
Kubernetes apps/v1.StatefulSetStatus

QueueConfig

(Appears on: RemoteWriteSpec)

QueueConfig allows the tuning of remote_write queue_config parameters. This object is referenced in the RemoteWriteSpec object.

Field Description
capacity
int

Number of samples to buffer per shard before we start dropping them.

maxShards
int

Max number of shards, i.e. amount of concurrency.

maxSamplesPperSend
int

Maximum number of samples per send.

batchSendDeadline
time.Duration

Maximum time sample will wait in buffer.

maxRetries
int

Max number of times to retry a batch on recoverable errors.

minBackoff
time.Duration

On recoverable errors, backoff exponentially.

maxBackoff
time.Duration

Quota

Quota is the configuration of [quotas.default] section.

Field Description
interval
Interval
(Optional)

RelabelConfig

(Appears on: RemoteWriteSpec)

RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines <metric_relabel_configs>-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs

Field Description
sourceLabels
github.com/prometheus/common/model.LabelNames

A list of labels from which values are taken and concatenated with the configured separator in order.

separator
string

Separator is the string between concatenated values from the source labels.

regex
string

Regular expression against which the extracted value is matched. Default is ‘(.*)’

modulus
uint64

Modulus to take of the hash of concatenated values from the source labels.

targetLabel
string

TargetLabel is the label to which the resulting string is written in a replacement. Regexp interpolation is allowed for the replace action.

replacement
string

Replacement is the regex replacement pattern to be used.

action
github.com/prometheus/prometheus/config.RelabelAction

Action is the action to be performed for the relabeling.

ReloaderSpec

(Appears on: TidbMonitorSpec)

ReloaderSpec is the desired state of reloader

Field Description
MonitorContainer
MonitorContainer

(Members of MonitorContainer are embedded into this type.)

service
ServiceSpec

RemoteWriteSpec

RemoteWriteSpec defines the remote_write configuration for prometheus.

Field Description
url
string

The URL of the endpoint to send samples to.

remoteTimeout
github.com/prometheus/common/model.Duration
(Optional)
writeRelabelConfigs
[]RelabelConfig
(Optional)

The list of remote write relabel configurations.

basicAuth
BasicAuth
(Optional)

BasicAuth for the URL.

bearerToken
string
(Optional)

File to read bearer token for remote write.

bearerTokenFile
string
(Optional)

File to read bearer token for remote write.

tlsConfig
TLSConfig
(Optional)

TLS Config to use for remote write.

proxyUrl
string
(Optional)

Proxy url

queueConfig
QueueConfig
(Optional)

RestoreCondition

(Appears on: RestoreStatus)

RestoreCondition describes the observed state of a Restore at a certain point.

Field Description
type
RestoreConditionType
status
Kubernetes core/v1.ConditionStatus
lastTransitionTime
Kubernetes meta/v1.Time
reason
string
message
string

RestoreConditionType

(Appears on: RestoreCondition, RestoreStatus)

RestoreConditionType represents a valid condition of a Restore.

RestoreSpec

(Appears on: Restore)

RestoreSpec contains the specification for a restore of a tidb cluster backup.

Field Description
resources
Kubernetes core/v1.ResourceRequirements
to
TiDBAccessConfig

To is the tidb cluster that needs to restore.

backupType
BackupType

Type is the backup type for tidb cluster.

tikvGCLifeTime
string

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.

StorageProvider
StorageProvider

(Members of StorageProvider are embedded into this type.)

StorageProvider configures where and how backups should be stored.

storageClassName
string
(Optional)

The storageClassName of the persistent volume for Restore data storage. Defaults to Kubernetes default storage class.

storageSize
string

StorageSize is the request storage size for backup job

br
BRConfig

BR is the configs for BR.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of restore Pods, components may add more tolerations upon this respectively

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of restore Pods

useKMS
bool

Use KMS to decrypt the secrets

serviceAccount
string

Specify service account of restore

toolImage
string
(Optional)

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

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

tableFilter
[]string

TableFilter means Table filter expression for ‘db.table’ matching. BR supports this from v4.0.3.

RestoreStatus

(Appears on: Restore)

RestoreStatus represents the current status of a tidb cluster restore.

Field Description
timeStarted
Kubernetes meta/v1.Time

TimeStarted is the time at which the restore was started.

timeCompleted
Kubernetes meta/v1.Time

TimeCompleted is the time at which the restore was completed.

commitTs
string

CommitTs is the snapshot time point of tidb cluster.

phase
RestoreConditionType

Phase is a user readable state inferred from the underlying Restore conditions

conditions
[]RestoreCondition

S3StorageProvider

(Appears on: StorageProvider)

S3StorageProvider represents a S3 compliant storage for storing backups.

Field Description
provider
S3StorageProviderType

Provider represents the specific storage provider that implements the S3 interface

region
string

Region in which the S3 compatible bucket is located.

path
string

Path is the full path where the backup is saved. The format of the path must be: “/”

bucket
string

Bucket in which to store the backup data.

endpoint
string

Endpoint of S3 compatible storage service

storageClass
string

StorageClass represents the storage class

acl
string

Acl represents access control permissions for this bucket

secretName
string

SecretName is the name of secret which stores S3 compliant storage access key and secret key.

prefix
string

Prefix of the data path.

sse
string

SSE Sever-Side Encryption.

options
[]string

Options Rclone options for backup and restore with mydumper and lightning.

S3StorageProviderType

(Appears on: S3StorageProvider)

S3StorageProviderType represents the specific storage provider that implements the S3 interface

SafeTLSConfig

(Appears on: TLSConfig)

SafeTLSConfig specifies safe TLS configuration parameters.

Field Description
ca
SecretOrConfigMap

Struct containing the CA cert to use for the targets.

cert
SecretOrConfigMap

Struct containing the client cert file for the targets.

keySecret
Kubernetes core/v1.SecretKeySelector

Secret containing the client key file for the targets.

serverName
string

Used to verify the hostname for the targets.

insecureSkipVerify
bool

Disable target certificate validation.

SecretOrConfigMap

(Appears on: SafeTLSConfig)

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

Field Description
secret
Kubernetes core/v1.SecretKeySelector

Secret containing data to use for the targets.

configMap
Kubernetes core/v1.ConfigMapKeySelector

ConfigMap containing data to use for the targets.

SecretRef

(Appears on: ExternalEndpoint)

SecretRef indicates to secret ref

Field Description
name
string
namespace
string

Security

(Appears on: TiDBConfig)

Security is the security section of the config.

Field Description
skip-grant-table
bool
(Optional)
ssl-ca
string
(Optional)
ssl-cert
string
(Optional)
ssl-key
string
(Optional)
cluster-ssl-ca
string
(Optional)
cluster-ssl-cert
string
(Optional)
cluster-ssl-key
string
(Optional)
cluster-verify-cn
[]string
(Optional)

ClusterVerifyCN is the Common Name that allowed

Service

(Appears on: TidbClusterSpec)

(Deprecated) Service represent service type used in TidbCluster

Field Description
name
string
type
string

ServiceSpec

(Appears on: GrafanaSpec, MasterServiceSpec, PDSpec, PrometheusSpec, ReloaderSpec, TiDBServiceSpec)

ServiceSpec specifies the service object in k8s

Field Description
type
Kubernetes core/v1.ServiceType

Type of the real kubernetes service

annotations
map[string]string
(Optional)

Additional annotations of the kubernetes service object

loadBalancerIP
string
(Optional)

LoadBalancerIP is the loadBalancerIP of service Optional: Defaults to omitted

clusterIP
string
(Optional)

ClusterIP is the clusterIP of service

portName
string
(Optional)

PortName is the name of service port

loadBalancerSourceRanges
[]string
(Optional)

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

Status

(Appears on: TiDBConfig)

Status is the status section of the config.

Field Description
metrics-addr
string
(Optional)
metrics-interval
uint
(Optional)

Optional: Defaults to 15

report-status
bool
(Optional)

Optional: Defaults to true

record-db-qps
bool
(Optional)

Optional: Defaults to false

StmtSummary

(Appears on: TiDBConfig)

StmtSummary is the config for statement summary.

Field Description
enable
bool
(Optional)

Enable statement summary or not.

enable-internal-query
bool
(Optional)

Enable summary internal query.

max-stmt-count
uint
(Optional)

The maximum number of statements kept in memory. Optional: Defaults to 100

max-sql-length
uint
(Optional)

The maximum length of displayed normalized SQL and sample SQL. Optional: Defaults to 4096

refresh-interval
int
(Optional)

The refresh interval of statement summary.

history-size
int
(Optional)

The maximum history size of statement summary.

StorageClaim

(Appears on: TiFlashSpec)

StorageClaim contains details of TiFlash storages

Field Description
resources
Kubernetes core/v1.ResourceRequirements
(Optional)

Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

storageClassName
string
(Optional)

Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1

StorageProvider

(Appears on: BackupSpec, RestoreSpec)

StorageProvider defines the configuration for storing a backup in backend storage.

Field Description
s3
S3StorageProvider
gcs
GcsStorageProvider
local
LocalStorageProvider

StorageVolume

(Appears on: PDSpec, TiDBSpec, TiKVSpec)

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

Field Description
name
string
storageClassName
string
storageSize
string
mountPath
string

TLSCluster

(Appears on: DMClusterSpec, TidbClusterSpec)

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

Field Description
enabled
bool
(Optional)

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: --cluster-secret. For PD: kubectl create secret generic -pd-cluster-secret –namespace= –from-file=tls.crt= –from-file=tls.key= –from-file=ca.crt= For TiKV: kubectl create secret generic -tikv-cluster-secret –namespace= –from-file=tls.crt= –from-file=tls.key= –from-file=ca.crt= For TiDB: kubectl create secret generic -tidb-cluster-secret –namespace= –from-file=tls.crt= –from-file=tls.key= –from-file=ca.crt= For Client: kubectl create secret generic -cluster-client-secret –namespace= –from-file=tls.crt= –from-file=tls.key= –from-file=ca.crt= Same for other components.

TLSConfig

(Appears on: RemoteWriteSpec, ThanosSpec)

TLSConfig extends the safe TLS configuration with file parameters.

Field Description
SafeTLSConfig
SafeTLSConfig

(Members of SafeTLSConfig are embedded into this type.)

caFile
string

Path to the CA cert in the Prometheus container to use for the targets.

certFile
string

Path to the client cert file in the Prometheus container for the targets.

keyFile
string

Path to the client key file in the Prometheus container for the targets.

ThanosSpec

(Appears on: TidbMonitorSpec)

ThanosSpec is the desired state of thanos sidecar

Field Description
MonitorContainer
MonitorContainer

(Members of MonitorContainer are embedded into this type.)

objectStorageConfig
Kubernetes core/v1.SecretKeySelector

ObjectStorageConfig configures object storage in Thanos. Alternative to ObjectStorageConfigFile, and lower order priority.

objectStorageConfigFile
string

ObjectStorageConfigFile specifies the path of the object storage configuration file. When used alongside with ObjectStorageConfig, ObjectStorageConfigFile takes precedence.

listenLocal
bool

ListenLocal makes the Thanos sidecar listen on loopback, so that it does not bind against the Pod IP.

tracingConfig
Kubernetes core/v1.SecretKeySelector

TracingConfig configures tracing in Thanos. This is an experimental feature, it may change in any upcoming release in a breaking way.

tracingConfigFile
string

TracingConfig specifies the path of the tracing configuration file. When used alongside with TracingConfig, TracingConfigFile takes precedence.

grpcServerTlsConfig
TLSConfig

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.

logLevel
string

LogLevel for Thanos sidecar to be configured with.

logFormat
string

LogFormat for Thanos sidecar to be configured with.

minTime
string

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.

routePrefix
string

RoutePrefix is prometheus prefix url

TiCDCCapture

(Appears on: TiCDCStatus)

TiCDCCapture is TiCDC Capture status

Field Description
podName
string
id
string

TiCDCConfig

(Appears on: TiCDCSpec)

TiCDCConfig is the configuration of tidbcdc

Field Description
timezone
string
(Optional)

Time zone of TiCDC Optional: Defaults to UTC

gcTTL
int32
(Optional)

CDC GC safepoint TTL duration, specified in seconds Optional: Defaults to 86400

logLevel
string
(Optional)

LogLevel is the log level Optional: Defaults to info

logFile
string
(Optional)

LogFile is the log file Optional: Defaults to /dev/stderr

TiCDCSpec

(Appears on: TidbClusterSpec)

TiCDCSpec contains details of TiCDC members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

serviceAccount
string

Specify a Service Account for TiCDC

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

config
TiCDCConfig
(Optional)

Config is the Configuration of tidbcdc servers

TiCDCStatus

(Appears on: TidbClusterStatus)

TiCDCStatus is TiCDC status

Field Description
synced
bool
phase
MemberPhase
statefulSet
Kubernetes apps/v1.StatefulSetStatus
captures
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiCDCCapture

TiDBAccessConfig

(Appears on: BackupSpec, RestoreSpec)

TiDBAccessConfig defines the configuration for access tidb cluster

Field Description
host
string

Host is the tidb cluster access address

port
int32

Port is the port number to use for connecting tidb cluster

user
string

User is the user for login tidb cluster

secretName
string

SecretName is the name of secret which stores tidb cluster’s password.

tlsClientSecretName
string
(Optional)

TLSClientSecretName is the name of secret which stores tidb server client certificate Optional: Defaults to nil

TiDBConfig

TiDBConfig is the configuration of tidb-server For more detail, refer to https://pingcap.com/docs/stable/reference/configuration/tidb-server/configuration/

Field Description
cors
string
(Optional)
socket
string
(Optional)
lease
string
(Optional)

Optional: Defaults to 45s

run-ddl
bool
(Optional)

Optional: Defaults to true

split-table
bool
(Optional)

Optional: Defaults to true

token-limit
uint
(Optional)

Optional: Defaults to 1000

oom-use-tmp-storage
bool
(Optional)
tmp-storage-path
string
(Optional)
oom-action
string
(Optional)

Optional: Defaults to log

max-index-length
int64
(Optional)

Optional: Defaults to 3072

mem-quota-query
int64
(Optional)

Optional: Defaults to 34359738368

tmp-storage-quota
int64
(Optional)

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

enable-streaming
bool
(Optional)

Optional: Defaults to false

enable-batch-dml
bool
(Optional)

Optional: Defaults to false

txn-local-latches
TxnLocalLatches
(Optional)

Deprecated in v4.0.0

lower-case-table-names
int
(Optional)
log
Log
(Optional)
security
Security
(Optional)
status
Status
(Optional)
performance
Performance
(Optional)
prepared-plan-cache
PreparedPlanCache
(Optional)
opentracing
OpenTracing
(Optional)
proxy-protocol
ProxyProtocol
(Optional)
tikv-client
TiKVClient
(Optional)
binlog
Binlog
(Optional)
compatible-kill-query
bool
(Optional)
plugin
Plugin
(Optional)
pessimistic-txn
PessimisticTxn
(Optional)
check-mb4-value-in-utf8
bool
(Optional)

Optional: Defaults to true

alter-primary-key
bool
(Optional)

Optional: Defaults to false

treat-old-version-utf8-as-utf8mb4
bool
(Optional)

Optional: Defaults to true

split-region-max-num
uint64
(Optional)

Optional: Defaults to 1000

stmt-summary
StmtSummary
(Optional)
repair-mode
bool
(Optional)

RepairMode indicates that the TiDB is in the repair mode for table meta.

repair-table-list
[]string
(Optional)
isolation-read
IsolationRead
(Optional)

IsolationRead indicates that the TiDB reads data from which isolation level(engine and label).

max-server-connections
uint32
(Optional)

MaxServerConnections is the maximum permitted number of simultaneous client connections.

new_collations_enabled_on_first_bootstrap
bool
(Optional)

NewCollationsEnabledOnFirstBootstrap indicates if the new collations are enabled, it effects only when a TiDB cluster bootstrapped on the first time.

experimental
Experimental
(Optional)

Experimental contains parameters for experimental features.

enable-dynamic-config
bool
(Optional)

EnableDynamicConfig enables the TiDB to fetch configs from PD and update itself during runtime. see pingcap/tidb#13660 for more details.

enable-table-lock
bool
(Optional)

imported from v3.1.0

delay-clean-table-lock
uint64
(Optional)

imported from v3.1.0

skip-register-to-dashboard
bool
(Optional)

imported from v4.0.5 SkipRegisterToDashboard tells TiDB don’t register itself to the dashboard.

enable-telemetry
bool
(Optional)

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

labels
map[string]string
(Optional)

Labels are labels for TiDB server

TiDBConfigWraper

(Appears on: TiDBSpec)

TiDBConfigWraper simply wrapps a GenericConfig

Field Description
GenericConfig
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig

TiDBFailureMember

(Appears on: TiDBStatus)

TiDBFailureMember is the tidb failure member information

Field Description
podName
string
createdAt
Kubernetes meta/v1.Time

TiDBMember

(Appears on: TiDBStatus)

TiDBMember is TiDB member

Field Description
name
string
health
bool
lastTransitionTime
Kubernetes meta/v1.Time

Last time the health transitioned from one to another.

node
string

Node hosting pod of this TiDB member.

TiDBProbe

(Appears on: TiDBSpec)

TiDBProbe contains details of probing tidb. default probe by TCPPort on 4000.

Field Description
type
string
(Optional)

“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.

TiDBServiceSpec

(Appears on: TiDBSpec)

TiDBServiceSpec defines .tidb.service field of TidbCluster.spec.

Field Description
ServiceSpec
ServiceSpec
externalTrafficPolicy
Kubernetes core/v1.ServiceExternalTrafficPolicyType
(Optional)

ExternalTrafficPolicy of the service Optional: Defaults to omitted

exposeStatus
bool
(Optional)

Whether expose the status port Optional: Defaults to true

mysqlNodePort
int
(Optional)

Expose the tidb cluster mysql port to MySQLNodePort Optional: Defaults to 0

statusNodePort
int
(Optional)

Expose the tidb status node port to StatusNodePort Optional: Defaults to 0

additionalPorts
[]Kubernetes core/v1.ServicePort
(Optional)

Expose additional ports for TiDB Optional: Defaults to omitted

TiDBSlowLogTailerSpec

(Appears on: TiDBSpec)

TiDBSlowLogTailerSpec represents an optional log tailer sidecar with TiDB

Field Description
ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

image
string

(Deprecated) Image used for slowlog tailer. Use spec.helper.image instead

imagePullPolicy
Kubernetes core/v1.PullPolicy

(Deprecated) ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present Use spec.helper.imagePullPolicy instead

TiDBSpec

(Appears on: TidbClusterSpec)

TiDBSpec contains details of TiDB members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

serviceAccount
string

Specify a Service Account for tidb

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

service
TiDBServiceSpec
(Optional)

Service defines a Kubernetes service of TiDB cluster. Optional: No kubernetes service will be created by default.

binlogEnabled
bool
(Optional)

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

maxFailoverCount
int32
(Optional)

MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover Optional: Defaults to 3

separateSlowLog
bool
(Optional)

Whether output the slow log in an separate sidecar container Optional: Defaults to true

slowLogVolumeName
string
(Optional)

Optional volume name configuration for slow query log.

slowLogTailer
TiDBSlowLogTailerSpec
(Optional)

The specification of the slow log tailer sidecar

tlsClient
TiDBTLSClient
(Optional)

Whether enable the TLS connection between the SQL client and TiDB server Optional: Defaults to nil

plugins
[]string
(Optional)

Plugins is a list of plugins that are loaded by TiDB server, empty means plugin disabled

config
TiDBConfigWraper
(Optional)

Config is the Configuration of tidb-servers

lifecycle
Kubernetes core/v1.Lifecycle
(Optional)

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.

storageVolumes
[]StorageVolume
(Optional)

StorageVolumes configure additional storage for TiDB pods.

storageClassName
string
(Optional)

The storageClassName of the persistent volume for TiDB data storage. Defaults to Kubernetes default storage class.

readinessProbe
TiDBProbe
(Optional)

ReadinessProbe describes actions that probe the tidb’s readiness. the default behavior is like setting type as “tcp”

TiDBStatus

(Appears on: TidbClusterStatus)

TiDBStatus is TiDB status

Field Description
phase
MemberPhase
statefulSet
Kubernetes apps/v1.StatefulSetStatus
members
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBMember
failureMembers
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBFailureMember
resignDDLOwnerRetryCount
int32
image
string

TiDBTLSClient

(Appears on: TiDBSpec)

TiDBTLSClient can enable TLS connection between TiDB server and MySQL client

Field Description
enabled
bool
(Optional)

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: -tidb-server-secret. kubectl create secret generic -tidb-server-secret –namespace= –from-file=tls.crt= –from-file=tls.key= –from-file=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: -tidb-client-secret. kubectl create secret generic -tidb-client-secret –namespace= –from-file=tls.crt= –from-file=tls.key= –from-file=ca.crt= 4. Set Enabled to true.

TiFlashCommonConfigWraper

(Appears on: TiFlashConfigWraper)

Field Description
GenericConfig
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig

TiFlashConfig

TiFlashConfig is the configuration of TiFlash.

Field Description
config
CommonConfig
(Optional)

commonConfig is the Configuration of TiFlash process

proxy
ProxyConfig
(Optional)

proxyConfig is the Configuration of proxy process

TiFlashConfigWraper

(Appears on: TiFlashSpec)

Field Description
config
TiFlashCommonConfigWraper
proxy
TiFlashProxyConfigWraper

TiFlashProxyConfigWraper

(Appears on: TiFlashConfigWraper)

Field Description
GenericConfig
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig

TiFlashSpec

(Appears on: TidbClusterSpec)

TiFlashSpec contains details of TiFlash members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

serviceAccount
string

Specify a Service Account for TiFlash

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

privileged
bool
(Optional)

Whether create the TiFlash container in privileged mode, it is highly discouraged to enable this in critical environment. Optional: defaults to false

maxFailoverCount
int32
(Optional)

MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover Optional: Defaults to 3

storageClaims
[]StorageClaim

The persistent volume claims of the TiFlash data storages. TiFlash supports multiple disks.

config
TiFlashConfigWraper
(Optional)

Config is the Configuration of TiFlash

logTailer
LogTailerSpec
(Optional)

LogTailer is the configurations of the log tailers for TiFlash

recoverFailover
bool
(Optional)

RecoverFailover indicates that Operator can recover the failover Pods

TiKVBackupConfig

(Appears on: TiKVConfig)

Field Description
num-threads
int64
(Optional)

TiKVBlockCacheConfig

(Appears on: TiKVStorageConfig)

TiKVBlockCacheConfig is the config of a block cache

Field Description
shared
bool
(Optional)

Optional: Defaults to true

capacity
string
(Optional)
num-shard-bits
int64
(Optional)
strict-capacity-limit
bool
(Optional)
high-pri-pool-ratio
float64
(Optional)
memory-allocator
string
(Optional)

TiKVCfConfig

(Appears on: TiKVDbConfig, TiKVRaftDBConfig)

TiKVCfConfig is the config of a cf

Field Description
block-size
string
(Optional)
block-cache-size
string
(Optional)
disable-block-cache
bool
(Optional)
cache-index-and-filter-blocks
bool
(Optional)
pin-l0-filter-and-index-blocks
bool
(Optional)
use-bloom-filter
bool
(Optional)
optimize-filters-for-hits
bool
(Optional)
whole-key-filtering
bool
(Optional)
bloom-filter-bits-per-key
int64
(Optional)
block-based-bloom-filter
bool
(Optional)
read-amp-bytes-per-bit
int64
(Optional)
compression-per-level
[]string
(Optional)
write-buffer-size
string
(Optional)
max-write-buffer-number
int64
(Optional)
min-write-buffer-number-to-merge
int64
(Optional)
max-bytes-for-level-base
string
(Optional)
target-file-size-base
string
(Optional)
level0-file-num-compaction-trigger
int64
(Optional)
level0-slowdown-writes-trigger
int64
(Optional)
level0-stop-writes-trigger
int64
(Optional)
max-compaction-bytes
string
(Optional)
compaction-pri
int64
(Optional)
dynamic-level-bytes
bool
(Optional)
num-levels
int64
(Optional)
max-bytes-for-level-multiplier
int64
(Optional)
compaction-style
int64
(Optional)
disable-auto-compactions
bool
(Optional)
soft-pending-compaction-bytes-limit
string
(Optional)
hard-pending-compaction-bytes-limit
string
(Optional)
force-consistency-checks
bool
(Optional)
prop-size-index-distance
int64
(Optional)
prop-keys-index-distance
int64
(Optional)
enable-doubly-skiplist
bool
(Optional)
titan
TiKVTitanCfConfig
(Optional)

TiKVClient

(Appears on: TiDBConfig)

TiKVClient is the config for tikv client.

Field Description
grpc-connection-count
uint
(Optional)

GrpcConnectionCount is the max gRPC connections that will be established with each tikv-server. Optional: Defaults to 16

grpc-keepalive-time
uint
(Optional)

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

grpc-keepalive-timeout
uint
(Optional)

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

commit-timeout
string
(Optional)

CommitTimeout is the max time which command ‘commit’ will wait. Optional: Defaults to 41s

max-txn-time-use
uint
(Optional)

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

max-batch-size
uint
(Optional)

MaxBatchSize is the max batch size when calling batch commands API. Optional: Defaults to 128

overload-threshold
uint
(Optional)

If TiKV load is greater than this, TiDB will wait for a while to avoid little batch. Optional: Defaults to 200

max-batch-wait-time
time.Duration
(Optional)

MaxBatchWaitTime in nanosecond is the max wait time for batch. Optional: Defaults to 0

batch-wait-size
uint
(Optional)

BatchWaitSize is the max wait size for batch. Optional: Defaults to 8

region-cache-ttl
uint
(Optional)

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

store-limit
int64
(Optional)

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

store-liveness-timeout
string
(Optional)

StoreLivenessTimeout is the timeout for store liveness check request.

copr-cache
CoprocessorCache
(Optional)

TiKVConfig

TiKVConfig is the configuration of TiKV.

Field Description
log-level
string
(Optional)

Optional: Defaults to info

log-file
string
(Optional)
log-format
string
(Optional)
slow-log-file
string
(Optional)
slow-log-threshold
string
(Optional)
log-rotation-timespan
string
(Optional)

Optional: Defaults to 24h

log-rotation-size
string
(Optional)
refresh-config-interval
string
(Optional)
panic-when-unexpected-key-or-data
bool
(Optional)
server
TiKVServerConfig
(Optional)
storage
TiKVStorageConfig
(Optional)
raftstore
TiKVRaftstoreConfig
(Optional)
rocksdb
TiKVDbConfig
(Optional)
coprocessor
TiKVCoprocessorConfig
(Optional)
readpool
TiKVReadPoolConfig
(Optional)
raftdb
TiKVRaftDBConfig
(Optional)
import
TiKVImportConfig
(Optional)
gc
TiKVGCConfig
(Optional)
pd
TiKVPDConfig
(Optional)
security
TiKVSecurityConfig
(Optional)
pessimistic-txn
TiKVPessimisticTxn
(Optional)
backup
TiKVBackupConfig
(Optional)

TiKVConfigWraper

(Appears on: TiKVSpec)

Field Description
GenericConfig
github.com/pingcap/tidb-operator/pkg/util/config.GenericConfig

TiKVCoprocessorConfig

(Appears on: ProxyConfig, TiKVConfig)

TiKVCoprocessorConfig is the configuration of TiKV Coprocessor component.

Field Description
split-region-on-table
bool

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

batch-split-limit
int64

One split check produces several split keys in batch. This config limits the number of produced split keys in one batch. optional

region-max-size
string

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

region-split-size
string

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

region-max-keys
int64

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

region-split-keys
int64

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

TiKVCoprocessorReadPoolConfig

(Appears on: TiKVReadPoolConfig)

Field Description
high-concurrency
int64
(Optional)

Optional: Defaults to 8

normal-concurrency
int64
(Optional)

Optional: Defaults to 8

low-concurrency
int64
(Optional)

Optional: Defaults to 8

max-tasks-per-worker-high
int64
(Optional)

Optional: Defaults to 2000

max-tasks-per-worker-normal
int64
(Optional)

Optional: Defaults to 2000

max-tasks-per-worker-low
int64
(Optional)

Optional: Defaults to 2000

stack-size
string
(Optional)

Optional: Defaults to 10MB

use-unified-pool
bool
(Optional)

Optional: Defaults to true

TiKVDbConfig

(Appears on: ProxyConfig, TiKVConfig)

TiKVDbConfig is the rocksdb config.

Field Description
wal-recovery-mode
int64
(Optional)

Optional: Defaults to 2

wal-ttl-seconds
int64
(Optional)
wal-size-limit
string
(Optional)
max-total-wal-size
string
(Optional)

Optional: Defaults to 4GB

max-background-jobs
int64
(Optional)

Optional: Defaults to 8

max-manifest-file-size
string
(Optional)

Optional: Defaults to 128MB

create-if-missing
bool
(Optional)

Optional: Defaults to true

max-open-files
int64
(Optional)

Optional: Defaults to 40960

enable-statistics
bool
(Optional)

Optional: Defaults to true

stats-dump-period
string
(Optional)

Optional: Defaults to 10m

compaction-readahead-size
string
(Optional)

Optional: Defaults to 0

info-log-max-size
string
(Optional)
info-log-roll-time
string
(Optional)
info-log-keep-log-file-num
int64
(Optional)
info-log-dir
string
(Optional)
rate-bytes-per-sec
string
(Optional)
rate-limiter-mode
int64
(Optional)
auto-tuned
bool
(Optional)
bytes-per-sync
string
(Optional)
wal-bytes-per-sync
string
(Optional)
max-sub-compactions
int64
(Optional)

Optional: Defaults to 3

writable-file-max-buffer-size
string
(Optional)
use-direct-io-for-flush-and-compaction
bool
(Optional)
enable-pipelined-write
bool
(Optional)
defaultcf
TiKVCfConfig
(Optional)
writecf
TiKVCfConfig
(Optional)
lockcf
TiKVCfConfig
(Optional)
raftcf
TiKVCfConfig
(Optional)
titan
TiKVTitanDBConfig
(Optional)

TiKVEncryptionConfig

Field Description
data-encryption-method
string

Encrypyion method, use data key encryption raw rocksdb data Possible values: plaintext, aes128-ctr, aes192-ctr, aes256-ctr Optional: Default to plaintext optional

data-key-rotation-period
string

The frequency of datakey rotation, It managered by tikv Optional: default to 7d optional

master-key
TiKVMasterKeyConfig

Master key config

previous-master-key
TiKVMasterKeyConfig

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

TiKVFailureStore

(Appears on: TiKVStatus)

TiKVFailureStore is the tikv failure store information

Field Description
podName
string
storeID
string
createdAt
Kubernetes meta/v1.Time

TiKVGCConfig

(Appears on: ProxyConfig, TiKVConfig)

Field Description
batch-keys
int64
(Optional)

Optional: Defaults to 512

max-write-bytes-per-sec
string
(Optional)
enable-compaction-filter
bool
(Optional)
compaction-filter-skip-version-check
bool
(Optional)

TiKVImportConfig

(Appears on: ProxyConfig, TiKVConfig)

Field Description
import-dir
string
(Optional)
num-threads
int64
(Optional)
num-import-jobs
int64
(Optional)
num-import-sst-jobs
int64
(Optional)
max-prepare-duration
string
(Optional)
region-split-size
string
(Optional)
stream-channel-window
int64
(Optional)
max-open-engines
int64
(Optional)
upload-speed-limit
string
(Optional)

TiKVMasterKeyConfig

(Appears on: TiKVEncryptionConfig)

Field Description
type
string

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

MasterKeyFileConfig
MasterKeyFileConfig

(Members of MasterKeyFileConfig are embedded into this type.)

Master key file config If the type set to file, this config should be filled

MasterKeyKMSConfig
MasterKeyKMSConfig

(Members of MasterKeyKMSConfig are embedded into this type.)

Master key KMS config If the type set to kms, this config should be filled

TiKVPDConfig

(Appears on: ProxyConfig, TiKVConfig)

Field Description
endpoints
[]string
(Optional)

The PD endpoints for the client.

Default is empty.

retry-interval
string
(Optional)

The interval at which to retry a PD connection initialization.

Default is 300ms. Optional: Defaults to 300ms

retry-max-count
int64
(Optional)

The maximum number of times to retry a PD connection initialization.

Default is isize::MAX, represented by -1. Optional: Defaults to -1

retry-log-every
int64
(Optional)

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

TiKVPessimisticTxn

(Appears on: TiKVConfig)

Field Description
enabled
bool
(Optional)
wait-for-lock-timeout
string
(Optional)

The default and maximum delay before responding to TiDB when pessimistic transactions encounter locks

wake-up-delay-duration
string
(Optional)

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.

pipelined
bool
(Optional)

TiKVRaftDBConfig

(Appears on: ProxyConfig, TiKVConfig)

Field Description
wal-recovery-mode
string
(Optional)
wal-dir
string
(Optional)
wal-ttl-seconds
int64
(Optional)
wal-size-limit
string
(Optional)
max-total-wal-size
string
(Optional)
max-background-jobs
int64
(Optional)
max-manifest-file-size
string
(Optional)
create-if-missing
bool
(Optional)
max-open-files
int64
(Optional)
enable-statistics
bool
(Optional)
stats-dump-period
string
(Optional)
compaction-readahead-size
string
(Optional)
info-log-max-size
string
(Optional)
info-log-roll-time
string
(Optional)
info-log-keep-log-file-num
int64
(Optional)
info-log-dir
string
(Optional)
max-sub-compactions
int64
(Optional)
writable-file-max-buffer-size
string
(Optional)
use-direct-io-for-flush-and-compaction
bool
(Optional)
enable-pipelined-write
bool
(Optional)
allow-concurrent-memtable-write
bool
(Optional)
bytes-per-sync
string
(Optional)
wal-bytes-per-sync
string
(Optional)
defaultcf
TiKVCfConfig
(Optional)

TiKVRaftstoreConfig

(Appears on: ProxyConfig, TiKVConfig)

TiKVRaftstoreConfig is the configuration of TiKV raftstore component.

Field Description
sync-log
bool
(Optional)

true for high reliability, prevent data loss when power failure. Optional: Defaults to true

prevote
bool
(Optional)

Optional: Defaults to true

raft-base-tick-interval
string
(Optional)

raft-base-tick-interval is a base tick interval (ms).

raft-heartbeat-ticks
int64
(Optional)
raft-election-timeout-ticks
int64
(Optional)
raft-entry-max-size
string
(Optional)

When the entry exceed the max size, reject to propose it. Optional: Defaults to 8MB

raft-max-size-per-msg
string
(Optional)

Limit the max size of each append message. Optional: Defaults to 1MB

raft-max-inflight-msgs
int64
(Optional)

Limit the max number of in-flight append messages during optimistic replication phase. Optional: Defaults to 256

raft-log-gc-tick-interval
string
(Optional)

Interval to gc unnecessary raft log (ms). Optional: Defaults to 10s

raft-log-gc-threshold
int64
(Optional)

A threshold to gc stale raft log, must >= 1. Optional: Defaults to 50

raft-log-gc-count-limit
int64
(Optional)

When entry count exceed this value, gc will be forced trigger. Optional: Defaults to 72000

raft-log-gc-size-limit
string
(Optional)

When the approximate size of raft log entries exceed this value gc will be forced trigger. Optional: Defaults to 72MB

raft-entry-cache-life-time
string
(Optional)

When a peer is not responding for this time, leader will not keep entry cache for it.

raft-reject-transfer-leader-duration
string
(Optional)

When a peer is newly added, reject transferring leader to the peer for a while.

split-region-check-tick-interval
string
(Optional)

Interval (ms) to check region whether need to be split or not. Optional: Defaults to 10s

region-split-check-diff
string
(Optional)

/ 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

region-compact-check-interval
string
(Optional)

/ Interval (ms) to check whether start compaction for a region. Optional: Defaults to 5m

clean-stale-peer-delay
string
(Optional)

delay time before deleting a stale peer Optional: Defaults to 10m

region-compact-check-step
int64
(Optional)

/ Number of regions for each time checking. Optional: Defaults to 100

region-compact-min-tombstones
int64
(Optional)

/ Minimum number of tombstones to trigger manual compaction. Optional: Defaults to 10000

region-compact-tombstones-percent
int64
(Optional)

/ Minimum percentage of tombstones to trigger manual compaction. / Should between 1 and 100. Optional: Defaults to 30

pd-heartbeat-tick-interval
string
(Optional)

Optional: Defaults to 60s

pd-store-heartbeat-tick-interval
string
(Optional)

Optional: Defaults to 10s

snap-mgr-gc-tick-interval
string
(Optional)
snap-gc-timeout
string
(Optional)
lock-cf-compact-interval
string
(Optional)

Optional: Defaults to 10m

lock-cf-compact-bytes-threshold
string
(Optional)

Optional: Defaults to 256MB

notify-capacity
int64
(Optional)
messages-per-tick
int64
(Optional)
max-peer-down-duration
string
(Optional)

/ 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

max-leader-missing-duration
string
(Optional)

/ 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.

abnormal-leader-missing-duration
string
(Optional)

/ Similar to the max-leader-missing-duration, instead it will log warnings and / try to alert monitoring systems, if there is any.

peer-stale-state-check-interval
string
(Optional)
leader-transfer-max-log-lag
int64
(Optional)
snap-apply-batch-size
string
(Optional)
consistency-check-interval
string
(Optional)

Interval (ms) to check region whether the data is consistent. Optional: Defaults to 0

report-region-flow-interval
string
(Optional)
raft-store-max-leader-lease
string
(Optional)

The lease provided by a successfully proposed and applied entry.

right-derive-when-split
bool
(Optional)

Right region derive origin region id when split.

allow-remove-leader
bool
(Optional)
merge-max-log-gap
int64
(Optional)

/ Max log gap allowed to propose merge.

merge-check-tick-interval
string
(Optional)

/ Interval to re-propose merge.

use-delete-range
bool
(Optional)
cleanup-import-sst-interval
string
(Optional)

Optional: Defaults to 10m

apply-max-batch-size
int64
(Optional)
apply-pool-size
int64
(Optional)

Optional: Defaults to 2

store-max-batch-size
int64
(Optional)
store-pool-size
int64
(Optional)

Optional: Defaults to 2

store-reschedule-duration
string
(Optional)

Optional: Defaults to 3s

apply-yield-duration
string
(Optional)

Optional: Defaults to 500ms

hibernate-regions
bool
(Optional)
apply-early
bool
(Optional)

Optional: Defaults to false

perf-level
int64
(Optional)

Optional: Defaults to 0

dev-assert
bool
(Optional)

Optional: Defaults to false

TiKVReadPoolConfig

(Appears on: ProxyConfig, TiKVConfig)

Field Description
unified
TiKVUnifiedReadPoolConfig
(Optional)
coprocessor
TiKVCoprocessorReadPoolConfig
(Optional)
storage
TiKVStorageReadPoolConfig
(Optional)

TiKVSecurityConfig

(Appears on: ProxyConfig, TiKVConfig)

Field Description
ca-path
string
(Optional)
cert-path
string
(Optional)
key-path
string
(Optional)
cert-allowed-cn
[]string
(Optional)

CertAllowedCN is the Common Name that allowed

override-ssl-target
string
(Optional)
cipher-file
string
(Optional)
encryption
TiKVSecurityConfigEncryption
(Optional)

TiKVSecurityConfigEncryption

(Appears on: TiKVSecurityConfig)

Field Description
data-encryption-method
string
(Optional)

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.

data-key-rotation-period
string
(Optional)

Specifies how often TiKV rotates data encryption key.

master-key
TiKVSecurityConfigEncryptionMasterKey
(Optional)

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”

previous-master-key
TiKVSecurityConfigEncryptionPreviousMasterKey
(Optional)

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.

TiKVSecurityConfigEncryptionMasterKey

(Appears on: TiKVSecurityConfigEncryption)

Field Description
type
string
(Optional)
MasterKeyFileConfig
MasterKeyFileConfig

(Members of MasterKeyFileConfig are embedded into this type.)

Master key file config If the type set to file, this config should be filled

MasterKeyKMSConfig
MasterKeyKMSConfig

(Members of MasterKeyKMSConfig are embedded into this type.)

Master key KMS config If the type set to kms, this config should be filled

TiKVSecurityConfigEncryptionPreviousMasterKey

(Appears on: TiKVSecurityConfigEncryption)

Field Description
type
string
(Optional)
MasterKeyFileConfig
MasterKeyFileConfig

(Members of MasterKeyFileConfig are embedded into this type.)

Master key file config If the type set to file, this config should be filled

MasterKeyKMSConfig
MasterKeyKMSConfig

(Members of MasterKeyKMSConfig are embedded into this type.)

Master key KMS config If the type set to kms, this config should be filled

TiKVServerConfig

(Appears on: FlashServerConfig, TiKVConfig)

TiKVServerConfig is the configuration of TiKV server.

Field Description
status-thread-pool-size
string
(Optional)

Optional: Defaults to 1

max-grpc-send-msg-len
uint
(Optional)

Optional: Defaults to 10485760

grpc-compression-type
string
(Optional)

Optional: Defaults to none

grpc-concurrency
uint
(Optional)

Optional: Defaults to 4

grpc-concurrent-stream
uint
(Optional)

Optional: Defaults to 1024

grpc-memory-pool-quota
string
(Optional)

Optional: Defaults to 32G

grpc-raft-conn-num
uint
(Optional)

Optional: Defaults to 10

grpc-stream-initial-window-size
string
(Optional)

Optional: Defaults to 2MB

grpc-keepalive-time
string
(Optional)

Optional: Defaults to 10s

grpc-keepalive-timeout
string
(Optional)

Optional: Defaults to 3s

concurrent-send-snap-limit
uint
(Optional)

Optional: Defaults to 32

concurrent-recv-snap-limit
uint
(Optional)

Optional: Defaults to 32

end-point-recursion-limit
uint
(Optional)

Optional: Defaults to 1000

end-point-stream-channel-size
uint
(Optional)
end-point-batch-row-limit
uint
(Optional)
end-point-stream-batch-row-limit
uint
(Optional)
end-point-enable-batch-if-possible
uint
(Optional)
end-point-request-max-handle-duration
string
(Optional)
snap-max-write-bytes-per-sec
string
(Optional)

Optional: Defaults to 100MB

snap-max-total-size
string
(Optional)
stats-concurrency
uint
(Optional)
heavy-load-threshold
uint
(Optional)
heavy-load-wait-duration
string
(Optional)

Optional: Defaults to 60s

labels
map[string]string
(Optional)
enable-request-batch
bool
(Optional)
request-batch-enable-cross-command
bool
(Optional)
request-batch-wait-duration
string
(Optional)

TiKVSpec

(Appears on: TidbClusterSpec)

TiKVSpec contains details of TiKV members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

serviceAccount
string

Specify a Service Account for tikv

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

privileged
bool
(Optional)

Whether create the TiKV container in privileged mode, it is highly discouraged to enable this in critical environment. Optional: defaults to false

maxFailoverCount
int32
(Optional)

MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover Optional: Defaults to 3

separateRocksDBLog
bool
(Optional)

Whether output the RocksDB log in a separate sidecar container Optional: Defaults to false

separateRaftLog
bool
(Optional)

Whether output the Raft log in a separate sidecar container Optional: Defaults to false

logTailer
LogTailerSpec
(Optional)

LogTailer is the configurations of the log tailers for TiKV

storageClassName
string
(Optional)

The storageClassName of the persistent volume for TiKV data storage. Defaults to Kubernetes default storage class.

dataSubDir
string
(Optional)

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

config
TiKVConfigWraper
(Optional)

Config is the Configuration of tikv-servers

recoverFailover
bool
(Optional)

RecoverFailover indicates that Operator can recover the failed Pods

mountClusterClientSecret
bool
(Optional)

MountClusterClientSecret indicates whether to mount cluster-client-secret to the Pod

evictLeaderTimeout
string
(Optional)

EvictLeaderTimeout indicates the timeout to evict tikv leader, in the format of Go Duration. Defaults to 10m

storageVolumes
[]StorageVolume
(Optional)

StorageVolumes configure additional storage for TiKV pods.

storeLabels
[]string
(Optional)

StoreLabels configures additional labels for TiKV stores.

TiKVStatus

(Appears on: TidbClusterStatus)

TiKVStatus is TiKV status

Field Description
synced
bool
phase
MemberPhase
bootStrapped
bool
statefulSet
Kubernetes apps/v1.StatefulSetStatus
stores
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStore
peerStores
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStore
tombstoneStores
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStore
failureStores
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVFailureStore
image
string

TiKVStorageConfig

(Appears on: ProxyConfig, TiKVConfig)

TiKVStorageConfig is the config of storage

Field Description
max-key-size
int64
(Optional)
scheduler-notify-capacity
int64
(Optional)

Deprecated in v4.0.0

scheduler-concurrency
int64
(Optional)

Optional: Defaults to 2048000

scheduler-worker-pool-size
int64
(Optional)

Optional: Defaults to 4

scheduler-pending-write-threshold
string
(Optional)

Optional: Defaults to 100MB

block-cache
TiKVBlockCacheConfig
(Optional)
reserve-space
string
(Optional)

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.

TiKVStorageReadPoolConfig

(Appears on: TiKVReadPoolConfig)

Field Description
high-concurrency
int64
(Optional)

Optional: Defaults to 4

normal-concurrency
int64
(Optional)

Optional: Defaults to 4

low-concurrency
int64
(Optional)

Optional: Defaults to 4

max-tasks-per-worker-high
int64
(Optional)

Optional: Defaults to 2000

max-tasks-per-worker-normal
int64
(Optional)

Optional: Defaults to 2000

max-tasks-per-worker-low
int64
(Optional)

Optional: Defaults to 2000

stack-size
string
(Optional)

Optional: Defaults to 10MB

use-unified-pool
bool
(Optional)

Optional: Defaults to true

TiKVStore

(Appears on: TiKVStatus)

TiKVStores is either Up/Down/Offline/Tombstone

Field Description
id
string

store id is also uint64, due to the same reason as pd id, we store id as string

podName
string
ip
string
leaderCount
int32
state
string
lastHeartbeatTime
Kubernetes meta/v1.Time
lastTransitionTime
Kubernetes meta/v1.Time

Last time the health transitioned from one to another.

TiKVTitanCfConfig

(Appears on: TiKVCfConfig)

TiKVTitanCfConfig is the titian config.

Field Description
min-blob-size
string
(Optional)
blob-file-compression
string
(Optional)
blob-cache-size
string
(Optional)
min-gc-batch-size
string
(Optional)
max-gc-batch-size
string
(Optional)
discardable-ratio
float64
(Optional)
sample-ratio
float64
(Optional)
merge-small-file-threshold
string
(Optional)
blob-run-mode
string
(Optional)
level_merge
bool

optional

gc-merge-rewrite
bool

optional

TiKVTitanDBConfig

(Appears on: TiKVDbConfig)

TiKVTitanDBConfig is the config a titian db.

Field Description
enabled
bool
(Optional)
dirname
string
(Optional)
disable-gc
bool
(Optional)
max-background-gc
int64
(Optional)
purge-obsolete-files-period
string
(Optional)

The value of this field will be truncated to seconds.

TiKVUnifiedReadPoolConfig

(Appears on: TiKVReadPoolConfig)

Field Description
min-thread-count
int32
(Optional)
max-thread-count
int32
(Optional)
stack-size
string
(Optional)

Deprecated in v4.0.0

max-tasks-per-worker
int32
(Optional)

TidbAutoScalerSpec

(Appears on: TidbClusterAutoScalerSpec)

TidbAutoScalerSpec describes the spec for tidb auto-scaling

Field Description
BasicAutoScalerSpec
BasicAutoScalerSpec

(Members of BasicAutoScalerSpec are embedded into this type.)

TidbAutoScalerStatus

(Appears on: TidbClusterAutoScalerStatus)

TidbAutoScalerStatus describe the auto-scaling status of tidb

Field Description
BasicAutoScalerStatus
BasicAutoScalerStatus

(Members of BasicAutoScalerStatus are embedded into this type.)

TidbClusterAutoScalerRef

(Appears on: TidbClusterStatus)

TidbClusterAutoScalerRef indicates to the target auto-scaler ref

Field Description
name
string
namespace
string

TidbClusterAutoScalerSpec

(Appears on: TidbClusterAutoScaler)

TidbAutoScalerSpec describes the state of the TidbClusterAutoScaler

Field Description
cluster
TidbClusterRef

TidbClusterRef describe the target TidbCluster

tikv
TikvAutoScalerSpec
(Optional)

TiKV represents the auto-scaling spec for tikv

tidb
TidbAutoScalerSpec
(Optional)

TiDB represents the auto-scaling spec for tidb

TidbClusterAutoScalerStatus

(Appears on: TidbClusterAutoScaler)

TidbClusterAutoScalerStatus describe the whole status

Field Description
tikv
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TikvAutoScalerStatus
(Optional)

Tikv describes the status of each group for the tikv in the last auto-scaling reconciliation

tidb
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbAutoScalerStatus
(Optional)

Tidb describes the status of each group for the tidb in the last auto-scaling reconciliation

TidbClusterCondition

(Appears on: TidbClusterStatus)

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

Field Description
type
TidbClusterConditionType

Type of the condition.

status
Kubernetes core/v1.ConditionStatus

Status of the condition, one of True, False, Unknown.

lastUpdateTime
Kubernetes meta/v1.Time

The last time this condition was updated.

lastTransitionTime
Kubernetes meta/v1.Time
(Optional)

Last time the condition transitioned from one status to another.

reason
string
(Optional)

The reason for the condition’s last transition.

message
string
(Optional)

A human readable message indicating details about the transition.

TidbClusterConditionType

(Appears on: TidbClusterCondition)

TidbClusterConditionType represents a tidb cluster condition value.

TidbClusterRef

(Appears on: TidbClusterAutoScalerSpec, TidbClusterSpec, TidbInitializerSpec, TidbMonitorSpec)

TidbClusterRef reference to a TidbCluster

Field Description
namespace
string
(Optional)

Namespace is the namespace that TidbCluster object locates, default to the same namespace with TidbMonitor

name
string

Name is the name of TidbCluster object

clusterDomain
string
(Optional)

ClusterDomain is the domain of TidbCluster object

TidbClusterSpec

(Appears on: TidbCluster)

TidbClusterSpec describes the attributes that a user creates on a tidb cluster

Field Description
discovery
DiscoverySpec

Discovery spec

serviceAccount
string

Specify a Service Account

pd
PDSpec
(Optional)

PD cluster spec

tidb
TiDBSpec
(Optional)

TiDB cluster spec

tikv
TiKVSpec
(Optional)

TiKV cluster spec

tiflash
TiFlashSpec
(Optional)

TiFlash cluster spec

ticdc
TiCDCSpec
(Optional)

TiCDC cluster spec

pump
PumpSpec
(Optional)

Pump cluster spec

helper
HelperSpec
(Optional)

Helper spec

paused
bool
(Optional)

Indicates that the tidb cluster is paused and will not be processed by the controller.

version
string
(Optional)

TiDB cluster version

schedulerName
string

SchedulerName of TiDB cluster Pods

pvReclaimPolicy
Kubernetes core/v1.PersistentVolumeReclaimPolicy

Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

imagePullPolicy
Kubernetes core/v1.PullPolicy

ImagePullPolicy of TiDB cluster Pods

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

configUpdateStrategy
ConfigUpdateStrategy

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.

enablePVReclaim
bool
(Optional)

Whether enable PVC reclaim for orphan PVC left by statefulset scale-in Optional: Defaults to false

tlsCluster
TLSCluster
(Optional)

Whether enable the TLS connection between TiDB server components Optional: Defaults to nil

hostNetwork
bool
(Optional)

Whether Hostnetwork is enabled for TiDB cluster Pods Optional: Defaults to false

affinity
Kubernetes core/v1.Affinity
(Optional)

Affinity of TiDB cluster Pods. Will be overwritten by each cluster component’s specific affinity setting, e.g. spec.tidb.affinity

priorityClassName
string
(Optional)

PriorityClassName of TiDB cluster Pods Optional: Defaults to omitted

nodeSelector
map[string]string
(Optional)

Base node selectors of TiDB cluster Pods, components may add or override selectors upon this respectively

annotations
map[string]string
(Optional)

Base annotations of TiDB cluster Pods, components may add or override selectors upon this respectively

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

Base tolerations of TiDB cluster Pods, components may add more tolerations upon this respectively

timezone
string
(Optional)

Time zone of TiDB cluster Pods Optional: Defaults to UTC

services
[]Service

(Deprecated) Services list non-headless services type used in TidbCluster

enableDynamicConfiguration
bool
(Optional)

EnableDynamicConfiguration indicates whether to append --advertise-status-addr to the startup parameters of TiKV.

clusterDomain
string
(Optional)

ClusterDomain is the Kubernetes Cluster Domain of TiDB cluster Optional: Defaults to “”

cluster
TidbClusterRef
(Optional)

Cluster is the external cluster, if configured, the components in this TidbCluster will join to this configured cluster.

pdAddresses
[]string
(Optional)

PDAddresses are the external PD addresses, if configured, the PDs in this TidbCluster will join to the configured PD cluster.

statefulSetUpdateStrategy
Kubernetes apps/v1.StatefulSetUpdateStrategyType
(Optional)

StatefulSetUpdateStrategy of TiDB cluster StatefulSets

TidbClusterStatus

(Appears on: TidbCluster)

TidbClusterStatus represents the current status of a tidb cluster.

Field Description
clusterID
string
pd
PDStatus
tikv
TiKVStatus
tidb
TiDBStatus
pump
PumpStatus
tiflash
TiFlashStatus
ticdc
TiCDCStatus
monitor
TidbMonitorRef
auto-scaler
TidbClusterAutoScalerRef
conditions
[]TidbClusterCondition
(Optional)

Represents the latest available observations of a tidb cluster’s state.

TidbInitializerSpec

(Appears on: TidbInitializer)

TidbInitializer spec encode the desired state of tidb initializer Job

Field Description
image
string
cluster
TidbClusterRef
imagePullPolicy
Kubernetes core/v1.PullPolicy
(Optional)
imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

permitHost
string
(Optional)

permitHost is the host which will only be allowed to connect to the TiDB.

initSql
string
(Optional)

InitSql is the SQL statements executed after the TiDB cluster is bootstrapped.

initSqlConfigMap
string
(Optional)

InitSqlConfigMapName reference a configmap that provide init-sql, take high precedence than initSql if set

passwordSecret
string
(Optional)
resources
Kubernetes core/v1.ResourceRequirements
(Optional)
timezone
string
(Optional)

Time zone of TiDB initializer Pods

tlsClientSecretName
string
(Optional)

TLSClientSecretName is the name of secret which stores tidb server client certificate Optional: Defaults to nil

TidbInitializerStatus

(Appears on: TidbInitializer)

Field Description
JobStatus
Kubernetes batch/v1.JobStatus

(Members of JobStatus are embedded into this type.)

phase
InitializePhase

Phase is a user readable state inferred from the underlying Job status and TidbCluster status

TidbMonitorRef

(Appears on: TidbClusterStatus)

TidbMonitorRef reference to a TidbMonitor

Field Description
namespace
string
(Optional)

Namespace is the namespace that TidbMonitor object locates, default to the same namespace with TidbClusterAutoScaler

name
string

Name is the name of TidbMonitor object

grafanaEnabled
bool
(Optional)

GrafanaEnabled indicate whether the grafana is enabled for this target tidbmonitor

TidbMonitorSpec

(Appears on: TidbMonitor)

TidbMonitor spec encode the desired state of tidb monitoring component

Field Description
clusters
[]TidbClusterRef
prometheus
PrometheusSpec
grafana
GrafanaSpec
(Optional)
reloader
ReloaderSpec
initializer
InitializerSpec
dm
DMMonitorSpec
thanos
ThanosSpec
(Optional)
pvReclaimPolicy
Kubernetes core/v1.PersistentVolumeReclaimPolicy

Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster

imagePullPolicy
Kubernetes core/v1.PullPolicy
imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.

persistent
bool
(Optional)
storageClassName
string
(Optional)
storage
string
(Optional)
nodeSelector
map[string]string
(Optional)
annotations
map[string]string
(Optional)
tolerations
[]Kubernetes core/v1.Toleration
(Optional)
kubePrometheusURL
string
(Optional)

kubePrometheusURL is where tidb-monitoring get the common metrics of kube-prometheus. Ref: https://github.com/coreos/kube-prometheus

alertmanagerURL
string
(Optional)

alertmanagerURL is where tidb-monitoring push alerts to. Ref: https://prometheus.io/docs/alerting/alertmanager/

alertManagerRulesVersion
string
(Optional)

alertManagerRulesVersion is the version of the tidb cluster that used for alert rules. default to current tidb cluster version, for example: v3.0.15

additionalContainers
[]Kubernetes core/v1.Container
(Optional)
clusterScoped
bool

ClusterScoped indicates whether this monitor should manage Kubernetes cluster-wide TiDB clusters

externalLabels
map[string]string

The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager).

replicaExternalLabelName
string

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 ("").

TidbMonitorStatus

(Appears on: TidbMonitor)

Field Description
deploymentStorageStatus
DeploymentStorageStatus

Storage status for deployment

TikvAutoScalerSpec

(Appears on: TidbClusterAutoScalerSpec)

TikvAutoScalerSpec describes the spec for tikv auto-scaling

Field Description
BasicAutoScalerSpec
BasicAutoScalerSpec

(Members of BasicAutoScalerSpec are embedded into this type.)

TikvAutoScalerStatus

(Appears on: TidbClusterAutoScalerStatus)

TikvAutoScalerStatus describe the auto-scaling status of tikv

Field Description
BasicAutoScalerStatus
BasicAutoScalerStatus

(Members of BasicAutoScalerStatus are embedded into this type.)

TxnLocalLatches

(Appears on: TiDBConfig)

TxnLocalLatches is the TxnLocalLatches section of the config.

Field Description
enabled
bool
(Optional)
capacity
uint
(Optional)

UnjoinedMember

(Appears on: MasterStatus, PDStatus)

UnjoinedMember is the pd unjoin cluster member information

Field Description
podName
string
pvcUID
k8s.io/apimachinery/pkg/types.UID
createdAt
Kubernetes meta/v1.Time

User

User is the configuration of users.

Field Description
password
string
(Optional)
profile
string
(Optional)
quota
string
(Optional)
networks
Networks
(Optional)

WorkerConfig

(Appears on: WorkerSpec)

WorkerConfig is the configuration of dm-worker-server

Field Description
log-level
string
(Optional)

Log level. Optional: Defaults to info

log-file
string
(Optional)

File log config.

log-format
string
(Optional)

Log format. one of json or text.

keepalive-ttl
int64
(Optional)

KeepAliveTTL is the keepalive TTL when dm-worker writes to the embedded etcd of dm-master Optional: Defaults to 10

DMSecurityConfig
DMSecurityConfig

(Members of DMSecurityConfig are embedded into this type.)

(Optional)

dm-worker’s security config

WorkerFailureMember

(Appears on: WorkerStatus)

WorkerFailureMember is the dm-worker failure member information

Field Description
podName
string
createdAt
Kubernetes meta/v1.Time

WorkerMember

(Appears on: WorkerStatus)

WorkerMember is dm-worker member status

Field Description
name
string
addr
string
stage
string
lastTransitionTime
Kubernetes meta/v1.Time

Last time the health transitioned from one to another.

WorkerSpec

(Appears on: DMClusterSpec)

WorkerSpec contains details of dm-worker members

Field Description
ComponentSpec
ComponentSpec

(Members of ComponentSpec are embedded into this type.)

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

replicas
int32

The desired ready replicas

baseImage
string
(Optional)

Base image of the component, image tag is now allowed during validation

maxFailoverCount
int32
(Optional)

MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover. Optional: Defaults to 3

storageClassName
string
(Optional)

The storageClassName of the persistent volume for dm-worker data storage. Defaults to Kubernetes default storage class.

storageSize
string
(Optional)

StorageSize is the request storage size for dm-worker. Defaults to “10Gi”.

dataSubDir
string
(Optional)

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

config
WorkerConfig
(Optional)

Config is the Configuration of dm-worker-servers

recoverFailover
bool
(Optional)

RecoverFailover indicates that Operator can recover the failover Pods

WorkerStatus

(Appears on: DMClusterStatus)

WorkerStatus is dm-worker status

Field Description
synced
bool
phase
MemberPhase
statefulSet
Kubernetes apps/v1.StatefulSetStatus
members
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.WorkerMember
failureMembers
map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.WorkerFailureMember
image
string

Generated with gen-crd-api-reference-docs