From 482b152a3a86e21fb74d7065e6eef458211c87b2 Mon Sep 17 00:00:00 2001 From: luolibin Date: Fri, 8 May 2020 18:56:57 +0800 Subject: [PATCH 01/10] enable customizing mydumper options in CRD backup --- cmd/backup-manager/app/export/export.go | 9 +- cmd/backup-manager/app/export/manager.go | 2 +- cmd/backup-manager/app/util/util.go | 31 + docs/api-references/docs.md | 1110 +++++++++-------- manifests/crd.yaml | 18 + .../pingcap/v1alpha1/openapi_generated.go | 43 +- pkg/apis/pingcap/v1alpha1/types.go | 11 + .../pingcap/v1alpha1/zz_generated.deepcopy.go | 31 + 8 files changed, 725 insertions(+), 530 deletions(-) diff --git a/cmd/backup-manager/app/export/export.go b/cmd/backup-manager/app/export/export.go index e1b0814cac8..3515fd602fb 100644 --- a/cmd/backup-manager/app/export/export.go +++ b/cmd/backup-manager/app/export/export.go @@ -25,6 +25,7 @@ import ( "github.com/mholt/archiver" "github.com/pingcap/tidb-operator/cmd/backup-manager/app/constants" "github.com/pingcap/tidb-operator/cmd/backup-manager/app/util" + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" "k8s.io/klog" ) @@ -48,7 +49,7 @@ func (bo *Options) getDestBucketURI(remotePath string) string { return fmt.Sprintf("%s://%s", bo.StorageType, remotePath) } -func (bo *Options) dumpTidbClusterData() (string, error) { +func (bo *Options) dumpTidbClusterData(backup *v1alpha1.Backup) (string, error) { bfPath := bo.getBackupFullPath() err := util.EnsureDirectoryExist(bfPath) if err != nil { @@ -60,12 +61,8 @@ func (bo *Options) dumpTidbClusterData() (string, error) { fmt.Sprintf("--port=%d", bo.Port), fmt.Sprintf("--user=%s", bo.User), fmt.Sprintf("--password=%s", bo.Password), - "--long-query-guard=3600", - "--tidb-force-priority=LOW_PRIORITY", - "--verbose=3", - "--regex", - "^(?!(mysql|test|INFORMATION_SCHEMA|PERFORMANCE_SCHEMA|METRICS_SCHEMA|INSPECTION_SCHEMA))", } + args = append(args, util.ConstructMydumperOptionsForBackup(backup)...) output, err := exec.Command("/mydumper", args...).CombinedOutput() if err != nil { diff --git a/cmd/backup-manager/app/export/manager.go b/cmd/backup-manager/app/export/manager.go index b4259f3fbd8..1987be89227 100644 --- a/cmd/backup-manager/app/export/manager.go +++ b/cmd/backup-manager/app/export/manager.go @@ -190,7 +190,7 @@ func (bm *BackupManager) performBackup(backup *v1alpha1.Backup, db *sql.DB) erro klog.Infof("set cluster %s %s to %s success", bm, constants.TikvGCVariable, constants.TikvGCLifeTime) } - backupFullPath, backupErr := bm.dumpTidbClusterData() + backupFullPath, backupErr := bm.dumpTidbClusterData(backup) if oldTikvGCTimeDuration < tikvGCTimeDuration { err = bm.SetTikvGCLifeTime(db, oldTikvGCTime) if err != nil { diff --git a/cmd/backup-manager/app/util/util.go b/cmd/backup-manager/app/util/util.go index bad36d8b47b..309acb03160 100644 --- a/cmd/backup-manager/app/util/util.go +++ b/cmd/backup-manager/app/util/util.go @@ -135,6 +135,37 @@ func ConstructBRGlobalOptionsForBackup(backup *v1alpha1.Backup) ([]string, strin return args, remotePath, nil } +// ConstructMydumperOptionsForBackup constructs mydumper options for backup +func ConstructMydumperOptionsForBackup(backup *v1alpha1.Backup) []string { + var args []string + defaultOptions := []string{ + "--long-query-guard=3600", + "--tidb-force-priority=LOW_PRIORITY", + "--verbose=3", + "--compress-protocol", + "--threads=16", + "--rows=10000", + "--skip-tz-utc", + } + defaultTableRegexOptions := []string{ + "--regex", + "^(?!(mysql|test|INFORMATION_SCHEMA|PERFORMANCE_SCHEMA|METRICS_SCHEMA|INSPECTION_SCHEMA))", + } + config := backup.Spec.Mydumper + if config == nil { + args = append(args, defaultOptions...) + args = append(args, defaultTableRegexOptions...) + return args + } + if len(config.Options) != 0 { + args = append(args, config.Options...) + } + if config.TableRegex != nil { + args = append(args, "--regex", *config.TableRegex) + } + return args +} + // ConstructBRGlobalOptionsForRestore constructs BR global options for restore. func ConstructBRGlobalOptionsForRestore(restore *v1alpha1.Restore) ([]string, error) { var args []string diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index 5117b603ecc..6086f0a82a9 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -10,21 +10,21 @@ category: how-to

Resource Types: -

Backup

+

Backup

Backup is a backup of tidb cluster.

@@ -71,7 +71,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + BackupSpec @@ -84,7 +84,7 @@ BackupSpec from
- + TiDBAccessConfig @@ -97,7 +97,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -123,7 +123,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -163,7 +163,7 @@ string br
- + BRConfig @@ -174,6 +174,19 @@ BRConfig +mydumper, omitempty
+ + +MydumperConfig + + + + +

MydumperConfig is the configs for mydumper

+ + + + tolerations
@@ -229,7 +242,7 @@ string status
-
+ BackupStatus @@ -239,7 +252,7 @@ BackupStatus -

BackupSchedule

+

BackupSchedule

BackupSchedule is a backup schedule of tidb cluster.

@@ -286,7 +299,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + BackupScheduleSpec @@ -344,7 +357,7 @@ string backupTemplate
- + BackupSpec @@ -384,7 +397,7 @@ string status
- + BackupScheduleStatus @@ -394,7 +407,7 @@ BackupScheduleStatus -

Restore

+

Restore

Restore represents the restoration of backup of a tidb cluster.

@@ -441,7 +454,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + RestoreSpec @@ -454,7 +467,7 @@ RestoreSpec to
- + TiDBAccessConfig @@ -467,7 +480,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -493,7 +506,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -533,7 +546,7 @@ string br
- + BRConfig @@ -599,7 +612,7 @@ string status
- + RestoreStatus @@ -609,7 +622,7 @@ RestoreStatus -

TidbCluster

+

TidbCluster

TidbCluster is the control script’s spec

@@ -656,7 +669,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbClusterSpec @@ -670,7 +683,7 @@ TidbClusterSpec pd
- + PDSpec @@ -683,7 +696,7 @@ PDSpec tidb
- + TiDBSpec @@ -696,7 +709,7 @@ TiDBSpec tikv
- + TiKVSpec @@ -709,7 +722,7 @@ TiKVSpec tiflash
- + TiFlashSpec @@ -723,7 +736,7 @@ TiFlashSpec pump
- + PumpSpec @@ -737,7 +750,7 @@ PumpSpec helper
- + HelperSpec @@ -814,7 +827,7 @@ Kubernetes core/v1.PullPolicy configUpdateStrategy
- + ConfigUpdateStrategy @@ -844,7 +857,7 @@ Optional: Defaults to false

tlsCluster
- + TLSCluster @@ -950,7 +963,7 @@ Optional: Defaults to UTC

services
- + []Service @@ -967,7 +980,7 @@ Deprecated

status
- + TidbClusterStatus @@ -978,7 +991,7 @@ TidbClusterStatus -

TidbClusterAutoScaler

+

TidbClusterAutoScaler

TidbClusterAutoScaler is the control script’s spec

@@ -1025,7 +1038,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbClusterAutoScalerSpec @@ -1039,7 +1052,7 @@ TidbClusterAutoScalerSpec cluster
- + TidbClusterRef @@ -1065,7 +1078,7 @@ MetricsUrl represents the url to fetch the metrics info

monitor
- + TidbMonitorRef @@ -1080,7 +1093,7 @@ Operator will use MetricsUrl

tikv
- + TikvAutoScalerSpec @@ -1094,7 +1107,7 @@ TikvAutoScalerSpec tidb
- + TidbAutoScalerSpec @@ -1111,7 +1124,7 @@ TidbAutoScalerSpec status
- + TidbClusterAutoSclaerStatus @@ -1122,7 +1135,7 @@ TidbClusterAutoSclaerStatus -

TidbInitializer

+

TidbInitializer

TidbInitializer is a TiDB cluster initializing job

@@ -1169,7 +1182,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbInitializerSpec @@ -1193,7 +1206,7 @@ string cluster
- + TidbClusterRef @@ -1293,7 +1306,7 @@ string status
- + TidbInitializerStatus @@ -1304,7 +1317,7 @@ TidbInitializerStatus -

TidbMonitor

+

TidbMonitor

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

@@ -1351,7 +1364,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbMonitorSpec @@ -1365,7 +1378,7 @@ TidbMonitorSpec clusters
- + []TidbClusterRef @@ -1377,7 +1390,7 @@ TidbMonitorSpec prometheus
- + PrometheusSpec @@ -1389,7 +1402,7 @@ PrometheusSpec grafana
- + GrafanaSpec @@ -1402,7 +1415,7 @@ GrafanaSpec reloader
- + ReloaderSpec @@ -1414,7 +1427,7 @@ ReloaderSpec initializer
- + InitializerSpec @@ -1535,7 +1548,7 @@ Ref: https://prometh status
-
+ TidbMonitorStatus @@ -1546,11 +1559,11 @@ TidbMonitorStatus -

BRConfig

+

BRConfig

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

BRConfig contains config for BR

@@ -1697,10 +1710,10 @@ bool -

BackupCondition

+

BackupCondition

(Appears on: -BackupStatus) +BackupStatus)

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

@@ -1717,7 +1730,7 @@ bool type
- + BackupConditionType @@ -1771,18 +1784,18 @@ string -

BackupConditionType

+

BackupConditionType

(Appears on: -BackupCondition) +BackupCondition)

BackupConditionType represents a valid condition of a Backup.

-

BackupScheduleSpec

+

BackupScheduleSpec

(Appears on: -BackupSchedule) +BackupSchedule)

BackupScheduleSpec contains the backup schedule specification for a tidb cluster.

@@ -1844,7 +1857,7 @@ string backupTemplate
- + BackupSpec @@ -1879,10 +1892,10 @@ string -

BackupScheduleStatus

+

BackupScheduleStatus

(Appears on: -BackupSchedule) +BackupSchedule)

BackupScheduleStatus represents the current state of a BackupSchedule.

@@ -1934,11 +1947,11 @@ Kubernetes meta/v1.Time -

BackupSpec

+

BackupSpec

(Appears on: -Backup, -BackupScheduleSpec) +Backup, +BackupScheduleSpec)

BackupSpec contains the backup specification for a tidb cluster.

@@ -1955,7 +1968,7 @@ Kubernetes meta/v1.Time from
- + TiDBAccessConfig @@ -1968,7 +1981,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -1994,7 +2007,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -2034,7 +2047,7 @@ string br
- + BRConfig @@ -2045,6 +2058,19 @@ BRConfig +mydumper, omitempty
+ + +MydumperConfig + + + + +

MydumperConfig is the configs for mydumper

+ + + + tolerations
@@ -2095,10 +2121,10 @@ string -

BackupStatus

+

BackupStatus

(Appears on: -Backup) +Backup)

BackupStatus represents the current status of a backup.

@@ -2174,7 +2200,7 @@ string conditions
- + []BackupCondition @@ -2184,24 +2210,24 @@ string -

BackupStorageType

+

BackupStorageType

BackupStorageType represents the backend storage type of backup.

-

BackupType

+

BackupType

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

BackupType represents the backup type.

-

BasicAutoScalerSpec

+

BasicAutoScalerSpec

(Appears on: -TidbAutoScalerSpec, -TikvAutoScalerSpec) +TidbAutoScalerSpec, +TikvAutoScalerSpec)

BasicAutoScalerSpec describes the basic spec for auto-scaling

@@ -2333,7 +2359,7 @@ If not set, the default value is 5.

externalEndpoint
- + ExternalEndpoint @@ -2346,11 +2372,11 @@ to fetch the recommended replicas for TiKV/TiDB

-

BasicAutoScalerStatus

+

BasicAutoScalerStatus

(Appears on: -TidbAutoScalerStatus, -TikvAutoScalerStatus) +TidbAutoScalerStatus, +TikvAutoScalerStatus)

BasicAutoScalerStatus describe the basic auto-scaling status

@@ -2367,7 +2393,7 @@ to fetch the recommended replicas for TiKV/TiDB

metrics
- + []MetricsStatus @@ -2416,10 +2442,10 @@ Kubernetes meta/v1.Time -

Binlog

+

Binlog

(Appears on: -TiDBConfig) +TiDBConfig)

Binlog is the config for binlog.

@@ -2495,10 +2521,10 @@ Optional: Defaults to range

-

CommonConfig

+

CommonConfig

(Appears on: -TiFlashConfig) +TiFlashConfig)

CommonConfig is the configuration of TiFlash process.

@@ -2551,7 +2577,7 @@ int64 logger
- + FlashLogger @@ -2562,19 +2588,19 @@ FlashLogger -

ComponentAccessor

+

ComponentAccessor

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

-

ComponentSpec

+

ComponentSpec

(Appears on: -PDSpec, -PumpSpec, -TiDBSpec, -TiFlashSpec, -TiKVSpec) +PDSpec, +PumpSpec, +TiDBSpec, +TiFlashSpec, +TiKVSpec)

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

@@ -2740,7 +2766,7 @@ Kubernetes core/v1.PodSecurityContext configUpdateStrategy
- + ConfigUpdateStrategy @@ -2781,19 +2807,19 @@ tidb-operator built envs. -

ConfigUpdateStrategy

+

ConfigUpdateStrategy

(Appears on: -ComponentSpec, -TidbClusterSpec) +ComponentSpec, +TidbClusterSpec)

ConfigUpdateStrategy represents the strategy to update configuration

-

CoprocessorCache

+

CoprocessorCache

(Appears on: -TiKVClient) +TiKVClient)

CoprocessorCache is the config for coprocessor cache.

@@ -2857,10 +2883,10 @@ uint64 -

CrdKind

+

CrdKind

(Appears on: -CrdKinds) +CrdKinds)

@@ -2924,7 +2950,7 @@ string -

CrdKinds

+

CrdKinds

@@ -2949,7 +2975,7 @@ string
TiDBCluster
- + CrdKind @@ -2961,7 +2987,7 @@ CrdKind
Backup
- + CrdKind @@ -2973,7 +2999,7 @@ CrdKind
Restore
- + CrdKind @@ -2985,7 +3011,7 @@ CrdKind
BackupSchedule
- + CrdKind @@ -2997,7 +3023,7 @@ CrdKind
TiDBMonitor
- + CrdKind @@ -3009,7 +3035,7 @@ CrdKind
TiDBInitializer
- + CrdKind @@ -3021,7 +3047,7 @@ CrdKind
TidbClusterAutoScaler
- + CrdKind @@ -3031,10 +3057,10 @@ CrdKind
-

DashboardConfig

+

DashboardConfig

(Appears on: -PDConfig) +PDConfig)

DashboardConfig is the configuration for tidb-dashboard.

@@ -3079,10 +3105,10 @@ string -

Experimental

+

Experimental

(Appears on: -TiDBConfig) +TiDBConfig)

Experimental controls the features that are still experimental: their semantics, interfaces are subject to change. @@ -3123,10 +3149,10 @@ bool -

ExternalEndpoint

+

ExternalEndpoint

(Appears on: -BasicAutoScalerSpec) +BasicAutoScalerSpec)

ExternalEndpoint describes the external service endpoint @@ -3166,7 +3192,7 @@ int32 tlsSecret
- + SecretRef @@ -3179,11 +3205,11 @@ to communicate to the external service

-

FileLogConfig

+

FileLogConfig

(Appears on: -Log, -PDLogConfig) +Log, +PDLogConfig)

@@ -3257,10 +3283,10 @@ int -

Flash

+

Flash

(Appears on: -CommonConfig) +CommonConfig)

Flash is the configuration of [flash] section.

@@ -3301,7 +3327,7 @@ int32 flash_cluster
- + FlashCluster @@ -3312,10 +3338,10 @@ FlashCluster -

FlashLogger

+

FlashLogger

(Appears on: -CommonConfig) +CommonConfig)

FlashLogger is the configuration of [logger] section.

@@ -3366,10 +3392,10 @@ int32 -

GcsStorageProvider

+

GcsStorageProvider

(Appears on: -StorageProvider) +StorageProvider)

GcsStorageProvider represents the google cloud storage for storing backups.

@@ -3473,10 +3499,10 @@ string -

GrafanaSpec

+

GrafanaSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

GrafanaSpec is the desired state of grafana

@@ -3493,7 +3519,7 @@ string MonitorContainer
- + MonitorContainer @@ -3518,7 +3544,7 @@ string service
- + ServiceSpec @@ -3561,7 +3587,7 @@ map[string]string ingress
- + IngressSpec @@ -3572,10 +3598,10 @@ IngressSpec -

HelperSpec

+

HelperSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

HelperSpec contains details of helper component

@@ -3618,11 +3644,11 @@ Optional: Defaults to the cluster-level setting

-

IngressSpec

+

IngressSpec

(Appears on: -GrafanaSpec, -PrometheusSpec) +GrafanaSpec, +PrometheusSpec)

IngressSpec describe the ingress desired state for the target component

@@ -3678,17 +3704,17 @@ ingress supports SNI.

-

InitializePhase

+

InitializePhase

(Appears on: -TidbInitializerStatus) +TidbInitializerStatus)

-

InitializerSpec

+

InitializerSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

InitializerSpec is the desired state of initializer

@@ -3705,7 +3731,7 @@ ingress supports SNI.

MonitorContainer
- + MonitorContainer @@ -3729,10 +3755,10 @@ map[string]string -

Interval

+

Interval

(Appears on: -Quota) +Quota)

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

@@ -3819,10 +3845,10 @@ int32 -

IsolationRead

+

IsolationRead

(Appears on: -TiDBConfig) +TiDBConfig)

IsolationRead is the config for isolation read.

@@ -3850,10 +3876,10 @@ imported from v3.1.0

-

Log

+

Log

(Appears on: -TiDBConfig) +TiDBConfig)

Log is the log section of config.

@@ -3933,7 +3959,7 @@ message.

file
- + FileLogConfig @@ -4015,10 +4041,10 @@ uint32 -

LogTailerSpec

+

LogTailerSpec

(Appears on: -TiFlashSpec) +TiFlashSpec)

LogTailerSpec represents an optional log tailer sidecar container

@@ -4048,10 +4074,10 @@ Kubernetes core/v1.ResourceRequirements -

MasterKeyFileConfig

+

MasterKeyFileConfig

(Appears on: -TiKVMasterKeyConfig) +TiKVMasterKeyConfig)

@@ -4079,10 +4105,10 @@ optional

-

MasterKeyKMSConfig

+

MasterKeyKMSConfig

(Appears on: -TiKVMasterKeyConfig) +TiKVMasterKeyConfig)

@@ -4157,25 +4183,25 @@ optional

-

MemberPhase

+

MemberPhase

(Appears on: -PDStatus, -PumpStatus, -TiDBStatus, -TiKVStatus) +PDStatus, +PumpStatus, +TiDBStatus, +TiKVStatus)

MemberPhase is the current state of member

-

MemberType

+

MemberType

MemberType represents member type

-

MetricsStatus

+

MetricsStatus

(Appears on: -BasicAutoScalerStatus) +BasicAutoScalerStatus)

MetricsStatus describe the basic metrics status in the last auto-scaling reconciliation

@@ -4223,16 +4249,16 @@ string -

MonitorComponentAccessor

+

MonitorComponentAccessor

-

MonitorContainer

+

MonitorContainer

(Appears on: -GrafanaSpec, -InitializerSpec, -PrometheusSpec, -ReloaderSpec) +GrafanaSpec, +InitializerSpec, +PrometheusSpec, +ReloaderSpec)

MonitorContainer is the common attributes of the container of monitoring

@@ -4295,10 +4321,50 @@ Kubernetes core/v1.PullPolicy -

Networks

+

MydumperConfig

+

+(Appears on: +BackupSpec) +

+

+

MydumperConfig contains config for mydumper

+

+ + + + + + + + + + + + + + + + + +
FieldDescription
+options
+ +[]string + +
+

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

+
+option
+ +string + +
+

TableRegex means Regular expression for ‘db.table’ matching

+
+

Networks

(Appears on: -User) +User)

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

@@ -4324,10 +4390,10 @@ string -

OpenTracing

+

OpenTracing

(Appears on: -TiDBConfig) +TiDBConfig)

OpenTracing is the opentracing section of the config.

@@ -4356,7 +4422,7 @@ bool sampler
- + OpenTracingSampler @@ -4369,7 +4435,7 @@ OpenTracingSampler reporter
- + OpenTracingReporter @@ -4391,10 +4457,10 @@ bool -

OpenTracingReporter

+

OpenTracingReporter

(Appears on: -OpenTracing) +OpenTracing)

OpenTracingReporter is the config for opentracing reporter. @@ -4454,10 +4520,10 @@ string -

OpenTracingSampler

+

OpenTracingSampler

(Appears on: -OpenTracing) +OpenTracing)

OpenTracingSampler is the config for opentracing sampler. @@ -4528,10 +4594,10 @@ time.Duration -

PDConfig

+

PDConfig

(Appears on: -PDSpec) +PDSpec)

PDConfig is the configuration of pd-server

@@ -4587,7 +4653,7 @@ Optional: Defaults to 3

log
- + PDLogConfig @@ -4637,7 +4703,7 @@ Optional: Defaults to 3s

metric
- + PDMetricConfig @@ -4650,7 +4716,7 @@ PDMetricConfig schedule
- + PDScheduleConfig @@ -4664,7 +4730,7 @@ PDScheduleConfig replication
- + PDReplicationConfig @@ -4678,7 +4744,7 @@ PDReplicationConfig namespace
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDNamespaceConfig @@ -4691,7 +4757,7 @@ map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDNamespac pd-server
- + PDServerConfig @@ -4797,7 +4863,7 @@ Optional: Defaults to true

security
- + PDSecurityConfig @@ -4810,7 +4876,7 @@ PDSecurityConfig label-property
- + PDLabelPropertyConfig @@ -4837,7 +4903,7 @@ Optional: Defaults to true

dashboard
- + DashboardConfig @@ -4848,10 +4914,10 @@ DashboardConfig -

PDFailureMember

+

PDFailureMember

(Appears on: -PDStatus) +PDStatus)

PDFailureMember is the pd failure member information

@@ -4918,17 +4984,17 @@ Kubernetes meta/v1.Time -

PDLabelPropertyConfig

+

PDLabelPropertyConfig

(Appears on: -PDConfig) +PDConfig)

-

PDLogConfig

+

PDLogConfig

(Appears on: -PDConfig) +PDConfig)

PDLogConfig serializes log related config in toml/json.

@@ -4982,7 +5048,7 @@ bool file
- + FileLogConfig @@ -5047,10 +5113,10 @@ message.

-

PDMember

+

PDMember

(Appears on: -PDStatus) +PDStatus)

PDMember is PD member

@@ -5120,10 +5186,10 @@ Kubernetes meta/v1.Time -

PDMetricConfig

+

PDMetricConfig

(Appears on: -PDConfig) +PDConfig)

@@ -5170,10 +5236,10 @@ string -

PDNamespaceConfig

+

PDNamespaceConfig

(Appears on: -PDConfig) +PDConfig)

PDNamespaceConfig is to overwrite the global setting for specific namespace

@@ -5260,10 +5326,10 @@ uint64 -

PDReplicationConfig

+

PDReplicationConfig

(Appears on: -PDConfig) +PDConfig)

PDReplicationConfig is the replication configuration.

@@ -5334,10 +5400,10 @@ bool -

PDScheduleConfig

+

PDScheduleConfig

(Appears on: -PDConfig) +PDConfig)

ScheduleConfig is the schedule configuration.

@@ -5683,7 +5749,7 @@ Immutable, change should be made through pd-ctl after cluster creation

schedulers-v2
- + PDSchedulerConfigs @@ -5735,7 +5801,7 @@ Imported from v3.1.0

-

PDSchedulerConfig

+

PDSchedulerConfig

PDSchedulerConfig is customized scheduler configuration

@@ -5785,17 +5851,17 @@ bool -

PDSchedulerConfigs

+

PDSchedulerConfigs

(Appears on: -PDScheduleConfig) +PDScheduleConfig)

-

PDSecurityConfig

+

PDSecurityConfig

(Appears on: -PDConfig) +PDConfig)

PDSecurityConfig is the configuration for supporting tls.

@@ -5858,10 +5924,10 @@ string -

PDServerConfig

+

PDServerConfig

(Appears on: -PDConfig) +PDConfig)

PDServerConfig is the configuration for pd server.

@@ -5902,10 +5968,10 @@ Imported from v3.1.0

-

PDSpec

+

PDSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

PDSpec contains details of PD members

@@ -5922,7 +5988,7 @@ Imported from v3.1.0

ComponentSpec
- + ComponentSpec @@ -5976,7 +6042,7 @@ Base image of the component, image tag is now allowed during validation

service
- + ServiceSpec @@ -6017,7 +6083,7 @@ Defaults to Kubernetes default storage class.

config
- + PDConfig @@ -6029,10 +6095,10 @@ PDConfig -

PDStatus

+

PDStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

PDStatus is PD status

@@ -6059,7 +6125,7 @@ bool phase
- + MemberPhase @@ -6083,7 +6149,7 @@ Kubernetes apps/v1.StatefulSetStatus members
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMember @@ -6095,7 +6161,7 @@ map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMember leader
- + PDMember @@ -6107,7 +6173,7 @@ PDMember failureMembers
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDFailureMember @@ -6119,7 +6185,7 @@ map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDFailureM unjoinedMembers
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.UnjoinedMember @@ -6139,7 +6205,7 @@ string -

PDStoreLabel

+

PDStoreLabel

PDStoreLabel is the config item of LabelPropertyConfig.

@@ -6175,13 +6241,13 @@ string -

PDStoreLabels

+

PDStoreLabels

-

Performance

+

Performance

(Appears on: -TiDBConfig) +TiDBConfig)

Performance is the performance section of the config.

@@ -6363,10 +6429,10 @@ uint64 -

PessimisticTxn

+

PessimisticTxn

(Appears on: -TiDBConfig) +TiDBConfig)

PessimisticTxn is the config for pessimistic transaction.

@@ -6407,7 +6473,7 @@ Optional: Defaults to 256

-

PlanCache

+

PlanCache

PlanCache is the PlanCache section of the config.

@@ -6454,10 +6520,10 @@ uint -

Plugin

+

Plugin

(Appears on: -TiDBConfig) +TiDBConfig)

Plugin is the config for plugin

@@ -6494,10 +6560,10 @@ string -

PreparedPlanCache

+

PreparedPlanCache

(Appears on: -TiDBConfig) +TiDBConfig)

PreparedPlanCache is the PreparedPlanCache section of the config.

@@ -6548,7 +6614,7 @@ float64 -

Profile

+

Profile

Profile is the configuration profiles.

@@ -6606,10 +6672,10 @@ string -

PrometheusSpec

+

PrometheusSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

PrometheusSpec is the desired state of prometheus

@@ -6626,7 +6692,7 @@ string MonitorContainer
- + MonitorContainer @@ -6651,7 +6717,7 @@ string service
- + ServiceSpec @@ -6674,7 +6740,7 @@ int ingress
- + IngressSpec @@ -6685,10 +6751,10 @@ IngressSpec -

ProxyProtocol

+

ProxyProtocol

(Appears on: -TiDBConfig) +TiDBConfig)

ProxyProtocol is the PROXY protocol section of the config.

@@ -6729,10 +6795,10 @@ uint -

PumpSpec

+

PumpSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

PumpSpec contains details of Pump members

@@ -6749,7 +6815,7 @@ uint ComponentSpec
- + ComponentSpec @@ -6841,10 +6907,10 @@ bool -

PumpStatus

+

PumpStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

PumpStatus is Pump status

@@ -6861,7 +6927,7 @@ bool phase
- + MemberPhase @@ -6883,7 +6949,7 @@ Kubernetes apps/v1.StatefulSetStatus -

Quota

+

Quota

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

@@ -6899,7 +6965,7 @@ Kubernetes apps/v1.StatefulSetStatus interval
- + Interval @@ -6910,10 +6976,10 @@ Interval -

ReloaderSpec

+

ReloaderSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

ReloaderSpec is the desired state of reloader

@@ -6930,7 +6996,7 @@ Interval MonitorContainer
- + MonitorContainer @@ -6945,7 +7011,7 @@ MonitorContainer service
- + ServiceSpec @@ -6955,10 +7021,10 @@ ServiceSpec -

RestoreCondition

+

RestoreCondition

(Appears on: -RestoreStatus) +RestoreStatus)

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

@@ -6975,7 +7041,7 @@ ServiceSpec type
- + RestoreConditionType @@ -7029,18 +7095,18 @@ string -

RestoreConditionType

+

RestoreConditionType

(Appears on: -RestoreCondition) +RestoreCondition)

RestoreConditionType represents a valid condition of a Restore.

-

RestoreSpec

+

RestoreSpec

(Appears on: -Restore) +Restore)

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

@@ -7057,7 +7123,7 @@ string to
- + TiDBAccessConfig @@ -7070,7 +7136,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -7096,7 +7162,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -7136,7 +7202,7 @@ string br
- + BRConfig @@ -7197,10 +7263,10 @@ string -

RestoreStatus

+

RestoreStatus

(Appears on: -Restore) +Restore)

RestoreStatus represents the current status of a tidb cluster restore.

@@ -7243,7 +7309,7 @@ Kubernetes meta/v1.Time conditions
- + []RestoreCondition @@ -7253,10 +7319,10 @@ Kubernetes meta/v1.Time -

S3StorageProvider

+

S3StorageProvider

(Appears on: -StorageProvider) +StorageProvider)

S3StorageProvider represents a S3 compliant storage for storing backups.

@@ -7273,7 +7339,7 @@ Kubernetes meta/v1.Time provider
- + S3StorageProviderType @@ -7384,18 +7450,18 @@ string -

S3StorageProviderType

+

S3StorageProviderType

(Appears on: -S3StorageProvider) +S3StorageProvider)

S3StorageProviderType represents the specific storage provider that implements the S3 interface

-

SecretRef

+

SecretRef

(Appears on: -ExternalEndpoint) +ExternalEndpoint)

SecretRef indicates to secret ref

@@ -7430,10 +7496,10 @@ string -

Security

+

Security

(Appears on: -TiDBConfig) +TiDBConfig)

Security is the security section of the config.

@@ -7537,10 +7603,10 @@ string -

Service

+

Service

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

Deprecated @@ -7576,14 +7642,14 @@ string -

ServiceSpec

+

ServiceSpec

(Appears on: -GrafanaSpec, -PDSpec, -PrometheusSpec, -ReloaderSpec, -TiDBServiceSpec) +GrafanaSpec, +PDSpec, +PrometheusSpec, +ReloaderSpec, +TiDBServiceSpec)

@@ -7659,10 +7725,10 @@ string -

Status

+

Status

(Appears on: -TiDBConfig) +TiDBConfig)

Status is the status section of the config.

@@ -7724,10 +7790,10 @@ bool -

StmtSummary

+

StmtSummary

(Appears on: -TiDBConfig) +TiDBConfig)

StmtSummary is the config for statement summary.

@@ -7816,10 +7882,10 @@ int -

StorageClaim

+

StorageClaim

(Appears on: -TiFlashSpec) +TiFlashSpec)

StorageClaim contains details of TiFlash storages

@@ -7862,11 +7928,11 @@ More info: StorageProvider +

StorageProvider

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

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

@@ -7883,7 +7949,7 @@ More info: + S3StorageProvider
@@ -7895,7 +7961,7 @@ S3StorageProvider gcs
- + GcsStorageProvider @@ -7905,10 +7971,10 @@ GcsStorageProvider -

TLSCluster

+

TLSCluster

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TLSCluster can enable TLS connection between TiDB server components @@ -7951,11 +8017,11 @@ Same for other components.

-

TiDBAccessConfig

+

TiDBAccessConfig

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

TiDBAccessConfig defines the configuration for access tidb cluster

@@ -8016,7 +8082,7 @@ string tlsClient
- + TiDBTLSClient @@ -8029,10 +8095,10 @@ Optional: Defaults to nil

-

TiDBConfig

+

TiDBConfig

(Appears on: -TiDBSpec) +TiDBSpec)

TiDBConfig is the configuration of tidb-server @@ -8190,7 +8256,7 @@ bool txn-local-latches
- + TxnLocalLatches @@ -8214,7 +8280,7 @@ int log
- + Log @@ -8227,7 +8293,7 @@ Log security
- + Security @@ -8240,7 +8306,7 @@ Security status
- + Status @@ -8253,7 +8319,7 @@ Status performance
- + Performance @@ -8266,7 +8332,7 @@ Performance prepared-plan-cache
- + PreparedPlanCache @@ -8279,7 +8345,7 @@ PreparedPlanCache opentracing
- + OpenTracing @@ -8292,7 +8358,7 @@ OpenTracing proxy-protocol
- + ProxyProtocol @@ -8305,7 +8371,7 @@ ProxyProtocol tikv-client
- + TiKVClient @@ -8318,7 +8384,7 @@ TiKVClient binlog
- + Binlog @@ -8342,7 +8408,7 @@ bool plugin
- + Plugin @@ -8355,7 +8421,7 @@ Plugin pessimistic-txn
- + PessimisticTxn @@ -8416,7 +8482,7 @@ uint64 stmt-summary
- + StmtSummary @@ -8452,7 +8518,7 @@ bool isolation-read
- + IsolationRead @@ -8490,7 +8556,7 @@ bool experimental
- + Experimental @@ -8539,10 +8605,10 @@ optional

-

TiDBFailureMember

+

TiDBFailureMember

(Appears on: -TiDBStatus) +TiDBStatus)

TiDBFailureMember is the tidb failure member information

@@ -8579,10 +8645,10 @@ Kubernetes meta/v1.Time -

TiDBMember

+

TiDBMember

(Appears on: -TiDBStatus) +TiDBStatus)

TiDBMember is TiDB member

@@ -8641,10 +8707,10 @@ string -

TiDBServiceSpec

+

TiDBServiceSpec

(Appears on: -TiDBSpec) +TiDBSpec)

@@ -8660,7 +8726,7 @@ string ServiceSpec
- + ServiceSpec @@ -8698,10 +8764,10 @@ Optional: Defaults to true

-

TiDBSlowLogTailerSpec

+

TiDBSlowLogTailerSpec

(Appears on: -TiDBSpec) +TiDBSpec)

TiDBSlowLogTailerSpec represents an optional log tailer sidecar with TiDB

@@ -8757,10 +8823,10 @@ Deprecated, use TidbCluster.HelperImagePullPolicy instead

-

TiDBSpec

+

TiDBSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TiDBSpec contains details of TiDB members

@@ -8777,7 +8843,7 @@ Deprecated, use TidbCluster.HelperImagePullPolicy instead

ComponentSpec
- + ComponentSpec @@ -8831,7 +8897,7 @@ Base image of the component, image tag is now allowed during validation

service
- + TiDBServiceSpec @@ -8885,7 +8951,7 @@ Optional: Defaults to true

tlsClient
- + TiDBTLSClient @@ -8900,7 +8966,7 @@ Optional: Defaults to nil

slowLogTailer
- + TiDBSlowLogTailerSpec @@ -8926,7 +8992,7 @@ TiDBSlowLogTailerSpec config
- + TiDBConfig @@ -8938,10 +9004,10 @@ TiDBConfig -

TiDBStatus

+

TiDBStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

TiDBStatus is TiDB status

@@ -8958,7 +9024,7 @@ TiDBConfig phase
- + MemberPhase @@ -8982,7 +9048,7 @@ Kubernetes apps/v1.StatefulSetStatus members
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBMember @@ -8994,7 +9060,7 @@ 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 @@ -9024,11 +9090,11 @@ string -

TiDBTLSClient

+

TiDBTLSClient

(Appears on: -TiDBAccessConfig, -TiDBSpec) +TiDBAccessConfig, +TiDBSpec)

TiDBTLSClient can enable TLS connection between TiDB server and MySQL client

@@ -9083,10 +9149,10 @@ this field only work in backup/restore process

-

TiFlashConfig

+

TiFlashConfig

(Appears on: -TiFlashSpec) +TiFlashSpec)

TiFlashConfig is the configuration of TiFlash.

@@ -9103,7 +9169,7 @@ this field only work in backup/restore process

config
- + CommonConfig @@ -9115,10 +9181,10 @@ CommonConfig -

TiFlashSpec

+

TiFlashSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TiFlashSpec contains details of TiFlash members

@@ -9135,7 +9201,7 @@ CommonConfig ComponentSpec
- + ComponentSpec @@ -9226,7 +9292,7 @@ Optional: Defaults to 3

storageClaims
- + []StorageClaim @@ -9240,7 +9306,7 @@ TiFlash supports multiple disks.

config
- + TiFlashConfig @@ -9254,7 +9320,7 @@ TiFlashConfig logTailer
- + LogTailerSpec @@ -9266,10 +9332,10 @@ LogTailerSpec -

TiKVBlockCacheConfig

+

TiKVBlockCacheConfig

(Appears on: -TiKVStorageConfig) +TiKVStorageConfig)

TiKVBlockCacheConfig is the config of a block cache

@@ -9351,11 +9417,11 @@ string -

TiKVCfConfig

+

TiKVCfConfig

(Appears on: -TiKVDbConfig, -TiKVRaftDBConfig) +TiKVDbConfig, +TiKVRaftDBConfig)

TiKVCfConfig is the config of a cf

@@ -9735,7 +9801,7 @@ bool titan
- + TiKVTitanCfConfig @@ -9746,10 +9812,10 @@ TiKVTitanCfConfig -

TiKVClient

+

TiKVClient

(Appears on: -TiDBConfig) +TiDBConfig)

TiKVClient is the config for tikv client.

@@ -9914,7 +9980,7 @@ Optional: Defaults to 0

copr-cache
- + CoprocessorCache @@ -9925,10 +9991,10 @@ CoprocessorCache -

TiKVConfig

+

TiKVConfig

(Appears on: -TiKVSpec) +TiKVSpec)

TiKVConfig is the configuration of TiKV.

@@ -10035,7 +10101,7 @@ bool server
- + TiKVServerConfig @@ -10048,7 +10114,7 @@ TiKVServerConfig storage
- + TiKVStorageConfig @@ -10061,7 +10127,7 @@ TiKVStorageConfig raftstore
- + TiKVRaftstoreConfig @@ -10074,7 +10140,7 @@ TiKVRaftstoreConfig rocksdb
- + TiKVDbConfig @@ -10087,7 +10153,7 @@ TiKVDbConfig coprocessor
- + TiKVCoprocessorConfig @@ -10100,7 +10166,7 @@ TiKVCoprocessorConfig readpool
- + TiKVReadPoolConfig @@ -10113,7 +10179,7 @@ TiKVReadPoolConfig raftdb
- + TiKVRaftDBConfig @@ -10126,7 +10192,7 @@ TiKVRaftDBConfig import
- + TiKVImportConfig @@ -10139,7 +10205,7 @@ TiKVImportConfig gc
- + TiKVGCConfig @@ -10152,7 +10218,7 @@ TiKVGCConfig pd
- + TiKVPDConfig @@ -10165,7 +10231,7 @@ TiKVPDConfig security
- + TiKVSecurityConfig @@ -10178,7 +10244,7 @@ TiKVSecurityConfig encryption
- + TiKVEncryptionConfig @@ -10191,7 +10257,7 @@ TiKVEncryptionConfig pessimistic-txn
- + TiKVPessimisticTxn @@ -10202,10 +10268,10 @@ TiKVPessimisticTxn -

TiKVCoprocessorConfig

+

TiKVCoprocessorConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVCoprocessorConfig is the configuration of TiKV Coprocessor component.

@@ -10308,10 +10374,10 @@ optional

-

TiKVCoprocessorReadPoolConfig

+

TiKVCoprocessorReadPoolConfig

(Appears on: -TiKVReadPoolConfig) +TiKVReadPoolConfig)

@@ -10409,10 +10475,10 @@ string -

TiKVDbConfig

+

TiKVDbConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVDbConfig is the rocksdb config.

@@ -10703,7 +10769,7 @@ bool defaultcf
- + TiKVCfConfig @@ -10716,7 +10782,7 @@ TiKVCfConfig writecf
- + TiKVCfConfig @@ -10729,7 +10795,7 @@ TiKVCfConfig lockcf
- + TiKVCfConfig @@ -10742,7 +10808,7 @@ TiKVCfConfig raftcf
- + TiKVCfConfig @@ -10755,7 +10821,7 @@ TiKVCfConfig titan
- + TiKVTitanDBConfig @@ -10766,10 +10832,10 @@ TiKVTitanDBConfig -

TiKVEncryptionConfig

+

TiKVEncryptionConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -10812,7 +10878,7 @@ optional

master-key
- + TiKVMasterKeyConfig @@ -10825,7 +10891,7 @@ TiKVMasterKeyConfig previous-master-key
- + TiKVMasterKeyConfig @@ -10837,10 +10903,10 @@ It used in master key rotation, the data key should decryption by previous maste -

TiKVFailureStore

+

TiKVFailureStore

(Appears on: -TiKVStatus) +TiKVStatus)

TiKVFailureStore is the tikv failure store information

@@ -10887,10 +10953,10 @@ Kubernetes meta/v1.Time -

TiKVGCConfig

+

TiKVGCConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -10927,10 +10993,10 @@ string -

TiKVImportConfig

+

TiKVImportConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11043,10 +11109,10 @@ string -

TiKVMasterKeyConfig

+

TiKVMasterKeyConfig

(Appears on: -TiKVEncryptionConfig) +TiKVEncryptionConfig)

@@ -11075,7 +11141,7 @@ optional

MasterKeyFileConfig
- + MasterKeyFileConfig @@ -11092,7 +11158,7 @@ If the type set to file, this config should be filled

MasterKeyKMSConfig
- + MasterKeyKMSConfig @@ -11107,10 +11173,10 @@ If the type set to kms, this config should be filled

-

TiKVPDConfig

+

TiKVPDConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11180,10 +11246,10 @@ Optional: Defaults to 10

-

TiKVPessimisticTxn

+

TiKVPessimisticTxn

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11241,10 +11307,10 @@ bool -

TiKVRaftDBConfig

+

TiKVRaftDBConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11513,7 +11579,7 @@ string defaultcf
- + TiKVCfConfig @@ -11524,10 +11590,10 @@ TiKVCfConfig -

TiKVRaftstoreConfig

+

TiKVRaftstoreConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVRaftstoreConfig is the configuration of TiKV raftstore component.

@@ -12113,10 +12179,10 @@ bool -

TiKVReadPoolConfig

+

TiKVReadPoolConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -12132,7 +12198,7 @@ bool unified
- + TiKVUnifiedReadPoolConfig @@ -12145,7 +12211,7 @@ TiKVUnifiedReadPoolConfig coprocessor
- + TiKVCoprocessorReadPoolConfig @@ -12158,7 +12224,7 @@ TiKVCoprocessorReadPoolConfig storage
- + TiKVStorageReadPoolConfig @@ -12169,10 +12235,10 @@ TiKVStorageReadPoolConfig -

TiKVSecurityConfig

+

TiKVSecurityConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -12253,10 +12319,10 @@ string -

TiKVServerConfig

+

TiKVServerConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVServerConfig is the configuration of TiKV server.

@@ -12571,10 +12637,10 @@ string -

TiKVSpec

+

TiKVSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TiKVSpec contains details of TiKV members

@@ -12591,7 +12657,7 @@ string ComponentSpec
- + ComponentSpec @@ -12696,7 +12762,7 @@ Defaults to Kubernetes default storage class.

config
- + TiKVConfig @@ -12708,10 +12774,10 @@ TiKVConfig -

TiKVStatus

+

TiKVStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

TiKVStatus is TiKV status

@@ -12738,7 +12804,7 @@ bool phase
- + MemberPhase @@ -12762,7 +12828,7 @@ Kubernetes apps/v1.StatefulSetStatus stores
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStore @@ -12774,7 +12840,7 @@ 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 @@ -12786,7 +12852,7 @@ 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 @@ -12806,10 +12872,10 @@ string -

TiKVStorageConfig

+

TiKVStorageConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVStorageConfig is the config of storage

@@ -12884,7 +12950,7 @@ string block-cache
- + TiKVBlockCacheConfig @@ -12895,10 +12961,10 @@ TiKVBlockCacheConfig -

TiKVStorageReadPoolConfig

+

TiKVStorageReadPoolConfig

(Appears on: -TiKVReadPoolConfig) +TiKVReadPoolConfig)

@@ -12996,10 +13062,10 @@ string -

TiKVStore

+

TiKVStore

(Appears on: -TiKVStatus) +TiKVStatus)

TiKVStores is either Up/Down/Offline/Tombstone

@@ -13090,10 +13156,10 @@ Kubernetes meta/v1.Time -

TiKVTitanCfConfig

+

TiKVTitanCfConfig

(Appears on: -TiKVCfConfig) +TiKVCfConfig)

TiKVTitanCfConfig is the titian config.

@@ -13207,10 +13273,10 @@ string -

TiKVTitanDBConfig

+

TiKVTitanDBConfig

(Appears on: -TiKVDbConfig) +TiKVDbConfig)

TiKVTitanDBConfig is the config a titian db.

@@ -13281,10 +13347,10 @@ string -

TiKVUnifiedReadPoolConfig

+

TiKVUnifiedReadPoolConfig

(Appears on: -TiKVReadPoolConfig) +TiKVReadPoolConfig)

@@ -13342,10 +13408,10 @@ int32 -

TidbAutoScalerSpec

+

TidbAutoScalerSpec

(Appears on: -TidbClusterAutoScalerSpec) +TidbClusterAutoScalerSpec)

TidbAutoScalerSpec describes the spec for tidb auto-scaling

@@ -13362,7 +13428,7 @@ int32 BasicAutoScalerSpec
- + BasicAutoScalerSpec @@ -13375,10 +13441,10 @@ BasicAutoScalerSpec -

TidbAutoScalerStatus

+

TidbAutoScalerStatus

(Appears on: -TidbClusterAutoSclaerStatus) +TidbClusterAutoSclaerStatus)

TidbAutoScalerStatus describe the auto-scaling status of tidb

@@ -13395,7 +13461,7 @@ BasicAutoScalerSpec BasicAutoScalerStatus
- + BasicAutoScalerStatus @@ -13408,10 +13474,10 @@ BasicAutoScalerStatus -

TidbClusterAutoScalerSpec

+

TidbClusterAutoScalerSpec

(Appears on: -TidbClusterAutoScaler) +TidbClusterAutoScaler)

TidbAutoScalerSpec describes the state of the TidbClusterAutoScaler

@@ -13428,7 +13494,7 @@ BasicAutoScalerStatus cluster
- + TidbClusterRef @@ -13454,7 +13520,7 @@ MetricsUrl represents the url to fetch the metrics info

monitor
- + TidbMonitorRef @@ -13469,7 +13535,7 @@ Operator will use MetricsUrl

tikv
- + TikvAutoScalerSpec @@ -13483,7 +13549,7 @@ TikvAutoScalerSpec tidb
- + TidbAutoScalerSpec @@ -13495,10 +13561,10 @@ TidbAutoScalerSpec -

TidbClusterAutoSclaerStatus

+

TidbClusterAutoSclaerStatus

(Appears on: -TidbClusterAutoScaler) +TidbClusterAutoScaler)

TidbClusterAutoSclaerStatus describe the whole status

@@ -13515,7 +13581,7 @@ TidbAutoScalerSpec tikv
- + TikvAutoScalerStatus @@ -13529,7 +13595,7 @@ TikvAutoScalerStatus tidb
- + TidbAutoScalerStatus @@ -13541,12 +13607,12 @@ TidbAutoScalerStatus -

TidbClusterRef

+

TidbClusterRef

(Appears on: -TidbClusterAutoScalerSpec, -TidbInitializerSpec, -TidbMonitorSpec) +TidbClusterAutoScalerSpec, +TidbInitializerSpec, +TidbMonitorSpec)

TidbClusterRef reference to a TidbCluster

@@ -13585,10 +13651,10 @@ string -

TidbClusterSpec

+

TidbClusterSpec

(Appears on: -TidbCluster) +TidbCluster)

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

@@ -13605,7 +13671,7 @@ string pd
- + PDSpec @@ -13618,7 +13684,7 @@ PDSpec tidb
- + TiDBSpec @@ -13631,7 +13697,7 @@ TiDBSpec tikv
- + TiKVSpec @@ -13644,7 +13710,7 @@ TiKVSpec tiflash
- + TiFlashSpec @@ -13658,7 +13724,7 @@ TiFlashSpec pump
- + PumpSpec @@ -13672,7 +13738,7 @@ PumpSpec helper
- + HelperSpec @@ -13749,7 +13815,7 @@ Kubernetes core/v1.PullPolicy configUpdateStrategy
- + ConfigUpdateStrategy @@ -13779,7 +13845,7 @@ Optional: Defaults to false

tlsCluster
- + TLSCluster @@ -13885,7 +13951,7 @@ Optional: Defaults to UTC

services
- + []Service @@ -13897,10 +13963,10 @@ Deprecated

-

TidbClusterStatus

+

TidbClusterStatus

(Appears on: -TidbCluster) +TidbCluster)

TidbClusterStatus represents the current status of a tidb cluster.

@@ -13927,7 +13993,7 @@ string pd
- + PDStatus @@ -13939,7 +14005,7 @@ PDStatus tikv
- + TiKVStatus @@ -13951,7 +14017,7 @@ TiKVStatus tidb
- + TiDBStatus @@ -13963,7 +14029,7 @@ TiDBStatus Pump
- + PumpStatus @@ -13975,7 +14041,7 @@ PumpStatus tiflash
- + TiFlashStatus @@ -13985,10 +14051,10 @@ TiFlashStatus -

TidbInitializerSpec

+

TidbInitializerSpec

(Appears on: -TidbInitializer) +TidbInitializer)

TidbInitializer spec encode the desired state of tidb initializer Job

@@ -14015,7 +14081,7 @@ string cluster
- + TidbClusterRef @@ -14110,10 +14176,10 @@ string -

TidbInitializerStatus

+

TidbInitializerStatus

(Appears on: -TidbInitializer) +TidbInitializer)

@@ -14144,7 +14210,7 @@ Kubernetes batch/v1.JobStatus phase
- + InitializePhase @@ -14155,10 +14221,10 @@ InitializePhase -

TidbMonitorRef

+

TidbMonitorRef

(Appears on: -TidbClusterAutoScalerSpec) +TidbClusterAutoScalerSpec)

TidbMonitorRef reference to a TidbMonitor

@@ -14197,10 +14263,10 @@ string -

TidbMonitorSpec

+

TidbMonitorSpec

(Appears on: -TidbMonitor) +TidbMonitor)

TidbMonitor spec encode the desired state of tidb monitoring component

@@ -14217,7 +14283,7 @@ string clusters
- + []TidbClusterRef @@ -14229,7 +14295,7 @@ string prometheus
- + PrometheusSpec @@ -14241,7 +14307,7 @@ PrometheusSpec grafana
- + GrafanaSpec @@ -14254,7 +14320,7 @@ GrafanaSpec reloader
- + ReloaderSpec @@ -14266,7 +14332,7 @@ ReloaderSpec initializer
- + InitializerSpec @@ -14382,18 +14448,18 @@ Ref: https://prometh -

TidbMonitorStatus

+

TidbMonitorStatus

(Appears on: -TidbMonitor) +TidbMonitor)

TODO: sync status

-

TikvAutoScalerSpec

+

TikvAutoScalerSpec

(Appears on: -TidbClusterAutoScalerSpec) +TidbClusterAutoScalerSpec)

TikvAutoScalerSpec describes the spec for tikv auto-scaling

@@ -14410,7 +14476,7 @@ Ref: https://prometh BasicAutoScalerSpec
-
+ BasicAutoScalerSpec @@ -14423,10 +14489,10 @@ BasicAutoScalerSpec -

TikvAutoScalerStatus

+

TikvAutoScalerStatus

(Appears on: -TidbClusterAutoSclaerStatus) +TidbClusterAutoSclaerStatus)

TikvAutoScalerStatus describe the auto-scaling status of tikv

@@ -14443,7 +14509,7 @@ BasicAutoScalerSpec BasicAutoScalerStatus
- + BasicAutoScalerStatus @@ -14456,10 +14522,10 @@ BasicAutoScalerStatus -

TxnLocalLatches

+

TxnLocalLatches

(Appears on: -TiDBConfig) +TiDBConfig)

TxnLocalLatches is the TxnLocalLatches section of the config.

@@ -14496,10 +14562,10 @@ uint -

UnjoinedMember

+

UnjoinedMember

(Appears on: -PDStatus) +PDStatus)

UnjoinedMember is the pd unjoin cluster member information

@@ -14546,7 +14612,7 @@ Kubernetes meta/v1.Time -

User

+

User

User is the configuration of users.

@@ -14595,7 +14661,7 @@ string networks
- + Networks diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 65a7cb0a498..8221c9e0404 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -4535,6 +4535,15 @@ spec: - projectId - secretName type: object + mydumper: + properties: + option: + type: string + options: + items: + type: string + type: array + type: object s3: properties: acl: @@ -5387,6 +5396,15 @@ spec: - projectId - secretName type: object + mydumper: + properties: + option: + type: string + options: + items: + type: string + type: array + type: object s3: properties: acl: diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index aaab4d615fb..ff82be52da8 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -55,6 +55,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MasterKeyKMSConfig": schema_pkg_apis_pingcap_v1alpha1_MasterKeyKMSConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MetricsStatus": schema_pkg_apis_pingcap_v1alpha1_MetricsStatus(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MonitorContainer": schema_pkg_apis_pingcap_v1alpha1_MonitorContainer(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MydumperConfig": schema_pkg_apis_pingcap_v1alpha1_MydumperConfig(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracing": schema_pkg_apis_pingcap_v1alpha1_OpenTracing(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracingReporter": schema_pkg_apis_pingcap_v1alpha1_OpenTracingReporter(ref), "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.OpenTracingSampler": schema_pkg_apis_pingcap_v1alpha1_OpenTracingSampler(ref), @@ -770,6 +771,12 @@ func schema_pkg_apis_pingcap_v1alpha1_BackupSpec(ref common.ReferenceCallback) c Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BRConfig"), }, }, + "mydumper": { + SchemaProps: spec.SchemaProps{ + Description: "MydumperConfig is the configs for mydumper", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MydumperConfig"), + }, + }, "tolerations": { SchemaProps: spec.SchemaProps{ Description: "Base tolerations of backup Pods, components may add more tolerations upon this respectively", @@ -807,7 +814,7 @@ func schema_pkg_apis_pingcap_v1alpha1_BackupSpec(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BRConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GcsStorageProvider", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.S3StorageProvider", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Toleration"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BRConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GcsStorageProvider", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.MydumperConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.S3StorageProvider", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Toleration"}, } } @@ -1881,6 +1888,40 @@ func schema_pkg_apis_pingcap_v1alpha1_MonitorContainer(ref common.ReferenceCallb } } +func schema_pkg_apis_pingcap_v1alpha1_MydumperConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MydumperConfig contains config for mydumper", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "options": { + SchemaProps: spec.SchemaProps{ + Description: "Options means options for backup data to remote storage with mydumper.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "option": { + SchemaProps: spec.SchemaProps{ + Description: "TableRegex means Regular expression for 'db.table' matching", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_pkg_apis_pingcap_v1alpha1_OpenTracing(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/pkg/apis/pingcap/v1alpha1/types.go b/pkg/apis/pingcap/v1alpha1/types.go index 34a8c37ccd0..d0a544145c0 100644 --- a/pkg/apis/pingcap/v1alpha1/types.go +++ b/pkg/apis/pingcap/v1alpha1/types.go @@ -926,6 +926,8 @@ type BackupSpec struct { StorageSize string `json:"storageSize,omitempty"` // BRConfig is the configs for BR BR *BRConfig `json:"br,omitempty"` + // MydumperConfig is the configs for mydumper + Mydumper *MydumperConfig `json:"mydumper, omitempty"` // Base tolerations of backup Pods, components may add more tolerations upon this respectively // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` @@ -938,6 +940,15 @@ type BackupSpec struct { ServiceAccount string `json:"serviceAccount,omitempty"` } +// +k8s:openapi-gen=true +// MydumperConfig contains config for mydumper +type MydumperConfig struct { + // Options means options for backup data to remote storage with mydumper. + Options []string `json:"options,omitempty"` + // TableRegex means Regular expression for 'db.table' matching + TableRegex *string `json:"option,omitempty"` +} + // +k8s:openapi-gen=true // BRConfig contains config for BR type BRConfig struct { diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index f89c5a35cdd..d2d574f045a 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -282,6 +282,11 @@ func (in *BackupSpec) DeepCopyInto(out *BackupSpec) { *out = new(BRConfig) (*in).DeepCopyInto(*out) } + if in.Mydumper != nil { + in, out := &in.Mydumper, &out.Mydumper + *out = new(MydumperConfig) + (*in).DeepCopyInto(*out) + } if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations *out = make([]v1.Toleration, len(*in)) @@ -1497,6 +1502,32 @@ func (in *MonitorContainer) DeepCopy() *MonitorContainer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MydumperConfig) DeepCopyInto(out *MydumperConfig) { + *out = *in + if in.Options != nil { + in, out := &in.Options, &out.Options + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.TableRegex != nil { + in, out := &in.TableRegex, &out.TableRegex + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MydumperConfig. +func (in *MydumperConfig) DeepCopy() *MydumperConfig { + if in == nil { + return nil + } + out := new(MydumperConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Networks) DeepCopyInto(out *Networks) { *out = *in From 221a8836805ac65abb950773bffba0cead8f0308 Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 10:25:39 +0800 Subject: [PATCH 02/10] fix CI --- pkg/apis/pingcap/v1alpha1/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/pingcap/v1alpha1/types.go b/pkg/apis/pingcap/v1alpha1/types.go index d0a544145c0..efde5c636e5 100644 --- a/pkg/apis/pingcap/v1alpha1/types.go +++ b/pkg/apis/pingcap/v1alpha1/types.go @@ -927,7 +927,7 @@ type BackupSpec struct { // BRConfig is the configs for BR BR *BRConfig `json:"br,omitempty"` // MydumperConfig is the configs for mydumper - Mydumper *MydumperConfig `json:"mydumper, omitempty"` + Mydumper *MydumperConfig `json:"mydumper,omitempty"` // Base tolerations of backup Pods, components may add more tolerations upon this respectively // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` From 22aa89b5d3aa2c420a20562d2f931aafc11f0f2c Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 12:05:52 +0800 Subject: [PATCH 03/10] fix CI --- docs/api-references/docs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index 6086f0a82a9..91e533eebc0 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -174,7 +174,7 @@ BRConfig -mydumper, omitempty
+mydumper
MydumperConfig @@ -2058,7 +2058,7 @@ BRConfig -mydumper, omitempty
+mydumper
MydumperConfig From 0666b64c1233396b7c1a8008ca459b66bab51275 Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 13:01:51 +0800 Subject: [PATCH 04/10] update api docs --- docs/api-references/docs.md | 1052 +++++++++++++++++------------------ 1 file changed, 526 insertions(+), 526 deletions(-) diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index 91e533eebc0..ea03766e639 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -10,21 +10,21 @@ category: how-to

Resource Types:
-

Backup

+

Backup

Backup is a backup of tidb cluster.

@@ -71,7 +71,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + BackupSpec @@ -84,7 +84,7 @@ BackupSpec from
- + TiDBAccessConfig @@ -97,7 +97,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -123,7 +123,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -163,7 +163,7 @@ string br
- + BRConfig @@ -176,7 +176,7 @@ BRConfig mydumper
- + MydumperConfig @@ -242,7 +242,7 @@ string status
- + BackupStatus @@ -252,7 +252,7 @@ BackupStatus -

BackupSchedule

+

BackupSchedule

BackupSchedule is a backup schedule of tidb cluster.

@@ -299,7 +299,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + BackupScheduleSpec @@ -357,7 +357,7 @@ string backupTemplate
- + BackupSpec @@ -397,7 +397,7 @@ string status
- + BackupScheduleStatus @@ -407,7 +407,7 @@ BackupScheduleStatus -

Restore

+

Restore

Restore represents the restoration of backup of a tidb cluster.

@@ -454,7 +454,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + RestoreSpec @@ -467,7 +467,7 @@ RestoreSpec to
- + TiDBAccessConfig @@ -480,7 +480,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -506,7 +506,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -546,7 +546,7 @@ string br
- + BRConfig @@ -612,7 +612,7 @@ string status
- + RestoreStatus @@ -622,7 +622,7 @@ RestoreStatus -

TidbCluster

+

TidbCluster

TidbCluster is the control script’s spec

@@ -669,7 +669,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbClusterSpec @@ -683,7 +683,7 @@ TidbClusterSpec pd
- + PDSpec @@ -696,7 +696,7 @@ PDSpec tidb
- + TiDBSpec @@ -709,7 +709,7 @@ TiDBSpec tikv
- + TiKVSpec @@ -722,7 +722,7 @@ TiKVSpec tiflash
- + TiFlashSpec @@ -736,7 +736,7 @@ TiFlashSpec pump
- + PumpSpec @@ -750,7 +750,7 @@ PumpSpec helper
- + HelperSpec @@ -827,7 +827,7 @@ Kubernetes core/v1.PullPolicy configUpdateStrategy
- + ConfigUpdateStrategy @@ -857,7 +857,7 @@ Optional: Defaults to false

tlsCluster
- + TLSCluster @@ -963,7 +963,7 @@ Optional: Defaults to UTC

services
- + []Service @@ -980,7 +980,7 @@ Deprecated

status
- + TidbClusterStatus @@ -991,7 +991,7 @@ TidbClusterStatus -

TidbClusterAutoScaler

+

TidbClusterAutoScaler

TidbClusterAutoScaler is the control script’s spec

@@ -1038,7 +1038,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbClusterAutoScalerSpec @@ -1052,7 +1052,7 @@ TidbClusterAutoScalerSpec cluster
- + TidbClusterRef @@ -1078,7 +1078,7 @@ MetricsUrl represents the url to fetch the metrics info

monitor
- + TidbMonitorRef @@ -1093,7 +1093,7 @@ Operator will use MetricsUrl

tikv
- + TikvAutoScalerSpec @@ -1107,7 +1107,7 @@ TikvAutoScalerSpec tidb
- + TidbAutoScalerSpec @@ -1124,7 +1124,7 @@ TidbAutoScalerSpec status
- + TidbClusterAutoSclaerStatus @@ -1135,7 +1135,7 @@ TidbClusterAutoSclaerStatus -

TidbInitializer

+

TidbInitializer

TidbInitializer is a TiDB cluster initializing job

@@ -1182,7 +1182,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbInitializerSpec @@ -1206,7 +1206,7 @@ string cluster
- + TidbClusterRef @@ -1306,7 +1306,7 @@ string status
- + TidbInitializerStatus @@ -1317,7 +1317,7 @@ TidbInitializerStatus -

TidbMonitor

+

TidbMonitor

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

@@ -1364,7 +1364,7 @@ Refer to the Kubernetes API documentation for the fields of the spec
- + TidbMonitorSpec @@ -1378,7 +1378,7 @@ TidbMonitorSpec clusters
- + []TidbClusterRef @@ -1390,7 +1390,7 @@ TidbMonitorSpec prometheus
- + PrometheusSpec @@ -1402,7 +1402,7 @@ PrometheusSpec grafana
- + GrafanaSpec @@ -1415,7 +1415,7 @@ GrafanaSpec reloader
- + ReloaderSpec @@ -1427,7 +1427,7 @@ ReloaderSpec initializer
- + InitializerSpec @@ -1548,7 +1548,7 @@ Ref: https://prometh status
-
+ TidbMonitorStatus @@ -1559,11 +1559,11 @@ TidbMonitorStatus -

BRConfig

+

BRConfig

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

BRConfig contains config for BR

@@ -1710,10 +1710,10 @@ bool -

BackupCondition

+

BackupCondition

(Appears on: -BackupStatus) +BackupStatus)

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

@@ -1730,7 +1730,7 @@ bool type
- + BackupConditionType @@ -1784,18 +1784,18 @@ string -

BackupConditionType

+

BackupConditionType

(Appears on: -BackupCondition) +BackupCondition)

BackupConditionType represents a valid condition of a Backup.

-

BackupScheduleSpec

+

BackupScheduleSpec

(Appears on: -BackupSchedule) +BackupSchedule)

BackupScheduleSpec contains the backup schedule specification for a tidb cluster.

@@ -1857,7 +1857,7 @@ string backupTemplate
- + BackupSpec @@ -1892,10 +1892,10 @@ string -

BackupScheduleStatus

+

BackupScheduleStatus

(Appears on: -BackupSchedule) +BackupSchedule)

BackupScheduleStatus represents the current state of a BackupSchedule.

@@ -1947,11 +1947,11 @@ Kubernetes meta/v1.Time -

BackupSpec

+

BackupSpec

(Appears on: -Backup, -BackupScheduleSpec) +Backup, +BackupScheduleSpec)

BackupSpec contains the backup specification for a tidb cluster.

@@ -1968,7 +1968,7 @@ Kubernetes meta/v1.Time from
- + TiDBAccessConfig @@ -1981,7 +1981,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -2007,7 +2007,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -2047,7 +2047,7 @@ string br
- + BRConfig @@ -2060,7 +2060,7 @@ BRConfig mydumper
- + MydumperConfig @@ -2121,10 +2121,10 @@ string -

BackupStatus

+

BackupStatus

(Appears on: -Backup) +Backup)

BackupStatus represents the current status of a backup.

@@ -2200,7 +2200,7 @@ string conditions
- + []BackupCondition @@ -2210,24 +2210,24 @@ string -

BackupStorageType

+

BackupStorageType

BackupStorageType represents the backend storage type of backup.

-

BackupType

+

BackupType

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

BackupType represents the backup type.

-

BasicAutoScalerSpec

+

BasicAutoScalerSpec

(Appears on: -TidbAutoScalerSpec, -TikvAutoScalerSpec) +TidbAutoScalerSpec, +TikvAutoScalerSpec)

BasicAutoScalerSpec describes the basic spec for auto-scaling

@@ -2359,7 +2359,7 @@ If not set, the default value is 5.

externalEndpoint
- + ExternalEndpoint @@ -2372,11 +2372,11 @@ to fetch the recommended replicas for TiKV/TiDB

-

BasicAutoScalerStatus

+

BasicAutoScalerStatus

(Appears on: -TidbAutoScalerStatus, -TikvAutoScalerStatus) +TidbAutoScalerStatus, +TikvAutoScalerStatus)

BasicAutoScalerStatus describe the basic auto-scaling status

@@ -2393,7 +2393,7 @@ to fetch the recommended replicas for TiKV/TiDB

metrics
- + []MetricsStatus @@ -2442,10 +2442,10 @@ Kubernetes meta/v1.Time -

Binlog

+

Binlog

(Appears on: -TiDBConfig) +TiDBConfig)

Binlog is the config for binlog.

@@ -2521,10 +2521,10 @@ Optional: Defaults to range

-

CommonConfig

+

CommonConfig

(Appears on: -TiFlashConfig) +TiFlashConfig)

CommonConfig is the configuration of TiFlash process.

@@ -2577,7 +2577,7 @@ int64 logger
- + FlashLogger @@ -2588,19 +2588,19 @@ FlashLogger -

ComponentAccessor

+

ComponentAccessor

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

-

ComponentSpec

+

ComponentSpec

(Appears on: -PDSpec, -PumpSpec, -TiDBSpec, -TiFlashSpec, -TiKVSpec) +PDSpec, +PumpSpec, +TiDBSpec, +TiFlashSpec, +TiKVSpec)

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

@@ -2766,7 +2766,7 @@ Kubernetes core/v1.PodSecurityContext configUpdateStrategy
- + ConfigUpdateStrategy @@ -2807,19 +2807,19 @@ tidb-operator built envs. -

ConfigUpdateStrategy

+

ConfigUpdateStrategy

(Appears on: -ComponentSpec, -TidbClusterSpec) +ComponentSpec, +TidbClusterSpec)

ConfigUpdateStrategy represents the strategy to update configuration

-

CoprocessorCache

+

CoprocessorCache

(Appears on: -TiKVClient) +TiKVClient)

CoprocessorCache is the config for coprocessor cache.

@@ -2883,10 +2883,10 @@ uint64 -

CrdKind

+

CrdKind

(Appears on: -CrdKinds) +CrdKinds)

@@ -2950,7 +2950,7 @@ string -

CrdKinds

+

CrdKinds

@@ -2975,7 +2975,7 @@ string
TiDBCluster
- + CrdKind @@ -2987,7 +2987,7 @@ CrdKind
Backup
- + CrdKind @@ -2999,7 +2999,7 @@ CrdKind
Restore
- + CrdKind @@ -3011,7 +3011,7 @@ CrdKind
BackupSchedule
- + CrdKind @@ -3023,7 +3023,7 @@ CrdKind
TiDBMonitor
- + CrdKind @@ -3035,7 +3035,7 @@ CrdKind
TiDBInitializer
- + CrdKind @@ -3047,7 +3047,7 @@ CrdKind
TidbClusterAutoScaler
- + CrdKind @@ -3057,10 +3057,10 @@ CrdKind
-

DashboardConfig

+

DashboardConfig

(Appears on: -PDConfig) +PDConfig)

DashboardConfig is the configuration for tidb-dashboard.

@@ -3105,10 +3105,10 @@ string -

Experimental

+

Experimental

(Appears on: -TiDBConfig) +TiDBConfig)

Experimental controls the features that are still experimental: their semantics, interfaces are subject to change. @@ -3149,10 +3149,10 @@ bool -

ExternalEndpoint

+

ExternalEndpoint

(Appears on: -BasicAutoScalerSpec) +BasicAutoScalerSpec)

ExternalEndpoint describes the external service endpoint @@ -3192,7 +3192,7 @@ int32 tlsSecret
- + SecretRef @@ -3205,11 +3205,11 @@ to communicate to the external service

-

FileLogConfig

+

FileLogConfig

(Appears on: -Log, -PDLogConfig) +Log, +PDLogConfig)

@@ -3283,10 +3283,10 @@ int -

Flash

+

Flash

(Appears on: -CommonConfig) +CommonConfig)

Flash is the configuration of [flash] section.

@@ -3327,7 +3327,7 @@ int32 flash_cluster
- + FlashCluster @@ -3338,10 +3338,10 @@ FlashCluster -

FlashLogger

+

FlashLogger

(Appears on: -CommonConfig) +CommonConfig)

FlashLogger is the configuration of [logger] section.

@@ -3392,10 +3392,10 @@ int32 -

GcsStorageProvider

+

GcsStorageProvider

(Appears on: -StorageProvider) +StorageProvider)

GcsStorageProvider represents the google cloud storage for storing backups.

@@ -3499,10 +3499,10 @@ string -

GrafanaSpec

+

GrafanaSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

GrafanaSpec is the desired state of grafana

@@ -3519,7 +3519,7 @@ string MonitorContainer
- + MonitorContainer @@ -3544,7 +3544,7 @@ string service
- + ServiceSpec @@ -3587,7 +3587,7 @@ map[string]string ingress
- + IngressSpec @@ -3598,10 +3598,10 @@ IngressSpec -

HelperSpec

+

HelperSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

HelperSpec contains details of helper component

@@ -3644,11 +3644,11 @@ Optional: Defaults to the cluster-level setting

-

IngressSpec

+

IngressSpec

(Appears on: -GrafanaSpec, -PrometheusSpec) +GrafanaSpec, +PrometheusSpec)

IngressSpec describe the ingress desired state for the target component

@@ -3704,17 +3704,17 @@ ingress supports SNI.

-

InitializePhase

+

InitializePhase

(Appears on: -TidbInitializerStatus) +TidbInitializerStatus)

-

InitializerSpec

+

InitializerSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

InitializerSpec is the desired state of initializer

@@ -3731,7 +3731,7 @@ ingress supports SNI.

MonitorContainer
- + MonitorContainer @@ -3755,10 +3755,10 @@ map[string]string -

Interval

+

Interval

(Appears on: -Quota) +Quota)

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

@@ -3845,10 +3845,10 @@ int32 -

IsolationRead

+

IsolationRead

(Appears on: -TiDBConfig) +TiDBConfig)

IsolationRead is the config for isolation read.

@@ -3876,10 +3876,10 @@ imported from v3.1.0

-

Log

+

Log

(Appears on: -TiDBConfig) +TiDBConfig)

Log is the log section of config.

@@ -3959,7 +3959,7 @@ message.

file
- + FileLogConfig @@ -4041,10 +4041,10 @@ uint32 -

LogTailerSpec

+

LogTailerSpec

(Appears on: -TiFlashSpec) +TiFlashSpec)

LogTailerSpec represents an optional log tailer sidecar container

@@ -4074,10 +4074,10 @@ Kubernetes core/v1.ResourceRequirements -

MasterKeyFileConfig

+

MasterKeyFileConfig

(Appears on: -TiKVMasterKeyConfig) +TiKVMasterKeyConfig)

@@ -4105,10 +4105,10 @@ optional

-

MasterKeyKMSConfig

+

MasterKeyKMSConfig

(Appears on: -TiKVMasterKeyConfig) +TiKVMasterKeyConfig)

@@ -4183,25 +4183,25 @@ optional

-

MemberPhase

+

MemberPhase

(Appears on: -PDStatus, -PumpStatus, -TiDBStatus, -TiKVStatus) +PDStatus, +PumpStatus, +TiDBStatus, +TiKVStatus)

MemberPhase is the current state of member

-

MemberType

+

MemberType

MemberType represents member type

-

MetricsStatus

+

MetricsStatus

(Appears on: -BasicAutoScalerStatus) +BasicAutoScalerStatus)

MetricsStatus describe the basic metrics status in the last auto-scaling reconciliation

@@ -4249,16 +4249,16 @@ string -

MonitorComponentAccessor

+

MonitorComponentAccessor

-

MonitorContainer

+

MonitorContainer

(Appears on: -GrafanaSpec, -InitializerSpec, -PrometheusSpec, -ReloaderSpec) +GrafanaSpec, +InitializerSpec, +PrometheusSpec, +ReloaderSpec)

MonitorContainer is the common attributes of the container of monitoring

@@ -4321,10 +4321,10 @@ Kubernetes core/v1.PullPolicy -

MydumperConfig

+

MydumperConfig

(Appears on: -BackupSpec) +BackupSpec)

MydumperConfig contains config for mydumper

@@ -4361,10 +4361,10 @@ string -

Networks

+

Networks

(Appears on: -User) +User)

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

@@ -4390,10 +4390,10 @@ string -

OpenTracing

+

OpenTracing

(Appears on: -TiDBConfig) +TiDBConfig)

OpenTracing is the opentracing section of the config.

@@ -4422,7 +4422,7 @@ bool sampler
- + OpenTracingSampler @@ -4435,7 +4435,7 @@ OpenTracingSampler reporter
- + OpenTracingReporter @@ -4457,10 +4457,10 @@ bool -

OpenTracingReporter

+

OpenTracingReporter

(Appears on: -OpenTracing) +OpenTracing)

OpenTracingReporter is the config for opentracing reporter. @@ -4520,10 +4520,10 @@ string -

OpenTracingSampler

+

OpenTracingSampler

(Appears on: -OpenTracing) +OpenTracing)

OpenTracingSampler is the config for opentracing sampler. @@ -4594,10 +4594,10 @@ time.Duration -

PDConfig

+

PDConfig

(Appears on: -PDSpec) +PDSpec)

PDConfig is the configuration of pd-server

@@ -4653,7 +4653,7 @@ Optional: Defaults to 3

log
- + PDLogConfig @@ -4703,7 +4703,7 @@ Optional: Defaults to 3s

metric
- + PDMetricConfig @@ -4716,7 +4716,7 @@ PDMetricConfig schedule
- + PDScheduleConfig @@ -4730,7 +4730,7 @@ PDScheduleConfig replication
- + PDReplicationConfig @@ -4744,7 +4744,7 @@ PDReplicationConfig namespace
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDNamespaceConfig @@ -4757,7 +4757,7 @@ map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDNamespac pd-server
- + PDServerConfig @@ -4863,7 +4863,7 @@ Optional: Defaults to true

security
- + PDSecurityConfig @@ -4876,7 +4876,7 @@ PDSecurityConfig label-property
- + PDLabelPropertyConfig @@ -4903,7 +4903,7 @@ Optional: Defaults to true

dashboard
- + DashboardConfig @@ -4914,10 +4914,10 @@ DashboardConfig -

PDFailureMember

+

PDFailureMember

(Appears on: -PDStatus) +PDStatus)

PDFailureMember is the pd failure member information

@@ -4984,17 +4984,17 @@ Kubernetes meta/v1.Time -

PDLabelPropertyConfig

+

PDLabelPropertyConfig

(Appears on: -PDConfig) +PDConfig)

-

PDLogConfig

+

PDLogConfig

(Appears on: -PDConfig) +PDConfig)

PDLogConfig serializes log related config in toml/json.

@@ -5048,7 +5048,7 @@ bool file
- + FileLogConfig @@ -5113,10 +5113,10 @@ message.

-

PDMember

+

PDMember

(Appears on: -PDStatus) +PDStatus)

PDMember is PD member

@@ -5186,10 +5186,10 @@ Kubernetes meta/v1.Time -

PDMetricConfig

+

PDMetricConfig

(Appears on: -PDConfig) +PDConfig)

@@ -5236,10 +5236,10 @@ string -

PDNamespaceConfig

+

PDNamespaceConfig

(Appears on: -PDConfig) +PDConfig)

PDNamespaceConfig is to overwrite the global setting for specific namespace

@@ -5326,10 +5326,10 @@ uint64 -

PDReplicationConfig

+

PDReplicationConfig

(Appears on: -PDConfig) +PDConfig)

PDReplicationConfig is the replication configuration.

@@ -5400,10 +5400,10 @@ bool -

PDScheduleConfig

+

PDScheduleConfig

(Appears on: -PDConfig) +PDConfig)

ScheduleConfig is the schedule configuration.

@@ -5749,7 +5749,7 @@ Immutable, change should be made through pd-ctl after cluster creation

schedulers-v2
- + PDSchedulerConfigs @@ -5801,7 +5801,7 @@ Imported from v3.1.0

-

PDSchedulerConfig

+

PDSchedulerConfig

PDSchedulerConfig is customized scheduler configuration

@@ -5851,17 +5851,17 @@ bool -

PDSchedulerConfigs

+

PDSchedulerConfigs

(Appears on: -PDScheduleConfig) +PDScheduleConfig)

-

PDSecurityConfig

+

PDSecurityConfig

(Appears on: -PDConfig) +PDConfig)

PDSecurityConfig is the configuration for supporting tls.

@@ -5924,10 +5924,10 @@ string -

PDServerConfig

+

PDServerConfig

(Appears on: -PDConfig) +PDConfig)

PDServerConfig is the configuration for pd server.

@@ -5968,10 +5968,10 @@ Imported from v3.1.0

-

PDSpec

+

PDSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

PDSpec contains details of PD members

@@ -5988,7 +5988,7 @@ Imported from v3.1.0

ComponentSpec
- + ComponentSpec @@ -6042,7 +6042,7 @@ Base image of the component, image tag is now allowed during validation

service
- + ServiceSpec @@ -6083,7 +6083,7 @@ Defaults to Kubernetes default storage class.

config
- + PDConfig @@ -6095,10 +6095,10 @@ PDConfig -

PDStatus

+

PDStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

PDStatus is PD status

@@ -6125,7 +6125,7 @@ bool phase
- + MemberPhase @@ -6149,7 +6149,7 @@ Kubernetes apps/v1.StatefulSetStatus members
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMember @@ -6161,7 +6161,7 @@ map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMember leader
- + PDMember @@ -6173,7 +6173,7 @@ PDMember failureMembers
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDFailureMember @@ -6185,7 +6185,7 @@ map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDFailureM unjoinedMembers
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.UnjoinedMember @@ -6205,7 +6205,7 @@ string -

PDStoreLabel

+

PDStoreLabel

PDStoreLabel is the config item of LabelPropertyConfig.

@@ -6241,13 +6241,13 @@ string -

PDStoreLabels

+

PDStoreLabels

-

Performance

+

Performance

(Appears on: -TiDBConfig) +TiDBConfig)

Performance is the performance section of the config.

@@ -6429,10 +6429,10 @@ uint64 -

PessimisticTxn

+

PessimisticTxn

(Appears on: -TiDBConfig) +TiDBConfig)

PessimisticTxn is the config for pessimistic transaction.

@@ -6473,7 +6473,7 @@ Optional: Defaults to 256

-

PlanCache

+

PlanCache

PlanCache is the PlanCache section of the config.

@@ -6520,10 +6520,10 @@ uint -

Plugin

+

Plugin

(Appears on: -TiDBConfig) +TiDBConfig)

Plugin is the config for plugin

@@ -6560,10 +6560,10 @@ string -

PreparedPlanCache

+

PreparedPlanCache

(Appears on: -TiDBConfig) +TiDBConfig)

PreparedPlanCache is the PreparedPlanCache section of the config.

@@ -6614,7 +6614,7 @@ float64 -

Profile

+

Profile

Profile is the configuration profiles.

@@ -6672,10 +6672,10 @@ string -

PrometheusSpec

+

PrometheusSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

PrometheusSpec is the desired state of prometheus

@@ -6692,7 +6692,7 @@ string MonitorContainer
- + MonitorContainer @@ -6717,7 +6717,7 @@ string service
- + ServiceSpec @@ -6740,7 +6740,7 @@ int ingress
- + IngressSpec @@ -6751,10 +6751,10 @@ IngressSpec -

ProxyProtocol

+

ProxyProtocol

(Appears on: -TiDBConfig) +TiDBConfig)

ProxyProtocol is the PROXY protocol section of the config.

@@ -6795,10 +6795,10 @@ uint -

PumpSpec

+

PumpSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

PumpSpec contains details of Pump members

@@ -6815,7 +6815,7 @@ uint ComponentSpec
- + ComponentSpec @@ -6907,10 +6907,10 @@ bool -

PumpStatus

+

PumpStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

PumpStatus is Pump status

@@ -6927,7 +6927,7 @@ bool phase
- + MemberPhase @@ -6949,7 +6949,7 @@ Kubernetes apps/v1.StatefulSetStatus -

Quota

+

Quota

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

@@ -6965,7 +6965,7 @@ Kubernetes apps/v1.StatefulSetStatus interval
- + Interval @@ -6976,10 +6976,10 @@ Interval -

ReloaderSpec

+

ReloaderSpec

(Appears on: -TidbMonitorSpec) +TidbMonitorSpec)

ReloaderSpec is the desired state of reloader

@@ -6996,7 +6996,7 @@ Interval MonitorContainer
- + MonitorContainer @@ -7011,7 +7011,7 @@ MonitorContainer service
- + ServiceSpec @@ -7021,10 +7021,10 @@ ServiceSpec -

RestoreCondition

+

RestoreCondition

(Appears on: -RestoreStatus) +RestoreStatus)

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

@@ -7041,7 +7041,7 @@ ServiceSpec type
- + RestoreConditionType @@ -7095,18 +7095,18 @@ string -

RestoreConditionType

+

RestoreConditionType

(Appears on: -RestoreCondition) +RestoreCondition)

RestoreConditionType represents a valid condition of a Restore.

-

RestoreSpec

+

RestoreSpec

(Appears on: -Restore) +Restore)

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

@@ -7123,7 +7123,7 @@ string to
- + TiDBAccessConfig @@ -7136,7 +7136,7 @@ TiDBAccessConfig backupType
- + BackupType @@ -7162,7 +7162,7 @@ When a GC happens, the current time minus this value is the safe point.

StorageProvider
- + StorageProvider @@ -7202,7 +7202,7 @@ string br
- + BRConfig @@ -7263,10 +7263,10 @@ string -

RestoreStatus

+

RestoreStatus

(Appears on: -Restore) +Restore)

RestoreStatus represents the current status of a tidb cluster restore.

@@ -7309,7 +7309,7 @@ Kubernetes meta/v1.Time conditions
- + []RestoreCondition @@ -7319,10 +7319,10 @@ Kubernetes meta/v1.Time -

S3StorageProvider

+

S3StorageProvider

(Appears on: -StorageProvider) +StorageProvider)

S3StorageProvider represents a S3 compliant storage for storing backups.

@@ -7339,7 +7339,7 @@ Kubernetes meta/v1.Time provider
- + S3StorageProviderType @@ -7450,18 +7450,18 @@ string -

S3StorageProviderType

+

S3StorageProviderType

(Appears on: -S3StorageProvider) +S3StorageProvider)

S3StorageProviderType represents the specific storage provider that implements the S3 interface

-

SecretRef

+

SecretRef

(Appears on: -ExternalEndpoint) +ExternalEndpoint)

SecretRef indicates to secret ref

@@ -7496,10 +7496,10 @@ string -

Security

+

Security

(Appears on: -TiDBConfig) +TiDBConfig)

Security is the security section of the config.

@@ -7603,10 +7603,10 @@ string -

Service

+

Service

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

Deprecated @@ -7642,14 +7642,14 @@ string -

ServiceSpec

+

ServiceSpec

(Appears on: -GrafanaSpec, -PDSpec, -PrometheusSpec, -ReloaderSpec, -TiDBServiceSpec) +GrafanaSpec, +PDSpec, +PrometheusSpec, +ReloaderSpec, +TiDBServiceSpec)

@@ -7725,10 +7725,10 @@ string -

Status

+

Status

(Appears on: -TiDBConfig) +TiDBConfig)

Status is the status section of the config.

@@ -7790,10 +7790,10 @@ bool -

StmtSummary

+

StmtSummary

(Appears on: -TiDBConfig) +TiDBConfig)

StmtSummary is the config for statement summary.

@@ -7882,10 +7882,10 @@ int -

StorageClaim

+

StorageClaim

(Appears on: -TiFlashSpec) +TiFlashSpec)

StorageClaim contains details of TiFlash storages

@@ -7928,11 +7928,11 @@ More info: StorageProvider +

StorageProvider

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

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

@@ -7949,7 +7949,7 @@ More info: + S3StorageProvider
@@ -7961,7 +7961,7 @@ S3StorageProvider gcs
- + GcsStorageProvider @@ -7971,10 +7971,10 @@ GcsStorageProvider -

TLSCluster

+

TLSCluster

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TLSCluster can enable TLS connection between TiDB server components @@ -8017,11 +8017,11 @@ Same for other components.

-

TiDBAccessConfig

+

TiDBAccessConfig

(Appears on: -BackupSpec, -RestoreSpec) +BackupSpec, +RestoreSpec)

TiDBAccessConfig defines the configuration for access tidb cluster

@@ -8082,7 +8082,7 @@ string tlsClient
- + TiDBTLSClient @@ -8095,10 +8095,10 @@ Optional: Defaults to nil

-

TiDBConfig

+

TiDBConfig

(Appears on: -TiDBSpec) +TiDBSpec)

TiDBConfig is the configuration of tidb-server @@ -8256,7 +8256,7 @@ bool txn-local-latches
- + TxnLocalLatches @@ -8280,7 +8280,7 @@ int log
- + Log @@ -8293,7 +8293,7 @@ Log security
- + Security @@ -8306,7 +8306,7 @@ Security status
- + Status @@ -8319,7 +8319,7 @@ Status performance
- + Performance @@ -8332,7 +8332,7 @@ Performance prepared-plan-cache
- + PreparedPlanCache @@ -8345,7 +8345,7 @@ PreparedPlanCache opentracing
- + OpenTracing @@ -8358,7 +8358,7 @@ OpenTracing proxy-protocol
- + ProxyProtocol @@ -8371,7 +8371,7 @@ ProxyProtocol tikv-client
- + TiKVClient @@ -8384,7 +8384,7 @@ TiKVClient binlog
- + Binlog @@ -8408,7 +8408,7 @@ bool plugin
- + Plugin @@ -8421,7 +8421,7 @@ Plugin pessimistic-txn
- + PessimisticTxn @@ -8482,7 +8482,7 @@ uint64 stmt-summary
- + StmtSummary @@ -8518,7 +8518,7 @@ bool isolation-read
- + IsolationRead @@ -8556,7 +8556,7 @@ bool experimental
- + Experimental @@ -8605,10 +8605,10 @@ optional

-

TiDBFailureMember

+

TiDBFailureMember

(Appears on: -TiDBStatus) +TiDBStatus)

TiDBFailureMember is the tidb failure member information

@@ -8645,10 +8645,10 @@ Kubernetes meta/v1.Time -

TiDBMember

+

TiDBMember

(Appears on: -TiDBStatus) +TiDBStatus)

TiDBMember is TiDB member

@@ -8707,10 +8707,10 @@ string -

TiDBServiceSpec

+

TiDBServiceSpec

(Appears on: -TiDBSpec) +TiDBSpec)

@@ -8726,7 +8726,7 @@ string ServiceSpec
- + ServiceSpec @@ -8764,10 +8764,10 @@ Optional: Defaults to true

-

TiDBSlowLogTailerSpec

+

TiDBSlowLogTailerSpec

(Appears on: -TiDBSpec) +TiDBSpec)

TiDBSlowLogTailerSpec represents an optional log tailer sidecar with TiDB

@@ -8823,10 +8823,10 @@ Deprecated, use TidbCluster.HelperImagePullPolicy instead

-

TiDBSpec

+

TiDBSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TiDBSpec contains details of TiDB members

@@ -8843,7 +8843,7 @@ Deprecated, use TidbCluster.HelperImagePullPolicy instead

ComponentSpec
- + ComponentSpec @@ -8897,7 +8897,7 @@ Base image of the component, image tag is now allowed during validation

service
- + TiDBServiceSpec @@ -8951,7 +8951,7 @@ Optional: Defaults to true

tlsClient
- + TiDBTLSClient @@ -8966,7 +8966,7 @@ Optional: Defaults to nil

slowLogTailer
- + TiDBSlowLogTailerSpec @@ -8992,7 +8992,7 @@ TiDBSlowLogTailerSpec config
- + TiDBConfig @@ -9004,10 +9004,10 @@ TiDBConfig -

TiDBStatus

+

TiDBStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

TiDBStatus is TiDB status

@@ -9024,7 +9024,7 @@ TiDBConfig phase
- + MemberPhase @@ -9048,7 +9048,7 @@ Kubernetes apps/v1.StatefulSetStatus members
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBMember @@ -9060,7 +9060,7 @@ 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 @@ -9090,11 +9090,11 @@ string -

TiDBTLSClient

+

TiDBTLSClient

(Appears on: -TiDBAccessConfig, -TiDBSpec) +TiDBAccessConfig, +TiDBSpec)

TiDBTLSClient can enable TLS connection between TiDB server and MySQL client

@@ -9149,10 +9149,10 @@ this field only work in backup/restore process

-

TiFlashConfig

+

TiFlashConfig

(Appears on: -TiFlashSpec) +TiFlashSpec)

TiFlashConfig is the configuration of TiFlash.

@@ -9169,7 +9169,7 @@ this field only work in backup/restore process

config
- + CommonConfig @@ -9181,10 +9181,10 @@ CommonConfig -

TiFlashSpec

+

TiFlashSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TiFlashSpec contains details of TiFlash members

@@ -9201,7 +9201,7 @@ CommonConfig ComponentSpec
- + ComponentSpec @@ -9292,7 +9292,7 @@ Optional: Defaults to 3

storageClaims
- + []StorageClaim @@ -9306,7 +9306,7 @@ TiFlash supports multiple disks.

config
- + TiFlashConfig @@ -9320,7 +9320,7 @@ TiFlashConfig logTailer
- + LogTailerSpec @@ -9332,10 +9332,10 @@ LogTailerSpec -

TiKVBlockCacheConfig

+

TiKVBlockCacheConfig

(Appears on: -TiKVStorageConfig) +TiKVStorageConfig)

TiKVBlockCacheConfig is the config of a block cache

@@ -9417,11 +9417,11 @@ string -

TiKVCfConfig

+

TiKVCfConfig

(Appears on: -TiKVDbConfig, -TiKVRaftDBConfig) +TiKVDbConfig, +TiKVRaftDBConfig)

TiKVCfConfig is the config of a cf

@@ -9801,7 +9801,7 @@ bool titan
- + TiKVTitanCfConfig @@ -9812,10 +9812,10 @@ TiKVTitanCfConfig -

TiKVClient

+

TiKVClient

(Appears on: -TiDBConfig) +TiDBConfig)

TiKVClient is the config for tikv client.

@@ -9980,7 +9980,7 @@ Optional: Defaults to 0

copr-cache
- + CoprocessorCache @@ -9991,10 +9991,10 @@ CoprocessorCache -

TiKVConfig

+

TiKVConfig

(Appears on: -TiKVSpec) +TiKVSpec)

TiKVConfig is the configuration of TiKV.

@@ -10101,7 +10101,7 @@ bool server
- + TiKVServerConfig @@ -10114,7 +10114,7 @@ TiKVServerConfig storage
- + TiKVStorageConfig @@ -10127,7 +10127,7 @@ TiKVStorageConfig raftstore
- + TiKVRaftstoreConfig @@ -10140,7 +10140,7 @@ TiKVRaftstoreConfig rocksdb
- + TiKVDbConfig @@ -10153,7 +10153,7 @@ TiKVDbConfig coprocessor
- + TiKVCoprocessorConfig @@ -10166,7 +10166,7 @@ TiKVCoprocessorConfig readpool
- + TiKVReadPoolConfig @@ -10179,7 +10179,7 @@ TiKVReadPoolConfig raftdb
- + TiKVRaftDBConfig @@ -10192,7 +10192,7 @@ TiKVRaftDBConfig import
- + TiKVImportConfig @@ -10205,7 +10205,7 @@ TiKVImportConfig gc
- + TiKVGCConfig @@ -10218,7 +10218,7 @@ TiKVGCConfig pd
- + TiKVPDConfig @@ -10231,7 +10231,7 @@ TiKVPDConfig security
- + TiKVSecurityConfig @@ -10244,7 +10244,7 @@ TiKVSecurityConfig encryption
- + TiKVEncryptionConfig @@ -10257,7 +10257,7 @@ TiKVEncryptionConfig pessimistic-txn
- + TiKVPessimisticTxn @@ -10268,10 +10268,10 @@ TiKVPessimisticTxn -

TiKVCoprocessorConfig

+

TiKVCoprocessorConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVCoprocessorConfig is the configuration of TiKV Coprocessor component.

@@ -10374,10 +10374,10 @@ optional

-

TiKVCoprocessorReadPoolConfig

+

TiKVCoprocessorReadPoolConfig

(Appears on: -TiKVReadPoolConfig) +TiKVReadPoolConfig)

@@ -10475,10 +10475,10 @@ string -

TiKVDbConfig

+

TiKVDbConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVDbConfig is the rocksdb config.

@@ -10769,7 +10769,7 @@ bool defaultcf
- + TiKVCfConfig @@ -10782,7 +10782,7 @@ TiKVCfConfig writecf
- + TiKVCfConfig @@ -10795,7 +10795,7 @@ TiKVCfConfig lockcf
- + TiKVCfConfig @@ -10808,7 +10808,7 @@ TiKVCfConfig raftcf
- + TiKVCfConfig @@ -10821,7 +10821,7 @@ TiKVCfConfig titan
- + TiKVTitanDBConfig @@ -10832,10 +10832,10 @@ TiKVTitanDBConfig -

TiKVEncryptionConfig

+

TiKVEncryptionConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -10878,7 +10878,7 @@ optional

master-key
- + TiKVMasterKeyConfig @@ -10891,7 +10891,7 @@ TiKVMasterKeyConfig previous-master-key
- + TiKVMasterKeyConfig @@ -10903,10 +10903,10 @@ It used in master key rotation, the data key should decryption by previous maste -

TiKVFailureStore

+

TiKVFailureStore

(Appears on: -TiKVStatus) +TiKVStatus)

TiKVFailureStore is the tikv failure store information

@@ -10953,10 +10953,10 @@ Kubernetes meta/v1.Time -

TiKVGCConfig

+

TiKVGCConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -10993,10 +10993,10 @@ string -

TiKVImportConfig

+

TiKVImportConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11109,10 +11109,10 @@ string -

TiKVMasterKeyConfig

+

TiKVMasterKeyConfig

(Appears on: -TiKVEncryptionConfig) +TiKVEncryptionConfig)

@@ -11141,7 +11141,7 @@ optional

MasterKeyFileConfig
- + MasterKeyFileConfig @@ -11158,7 +11158,7 @@ If the type set to file, this config should be filled

MasterKeyKMSConfig
- + MasterKeyKMSConfig @@ -11173,10 +11173,10 @@ If the type set to kms, this config should be filled

-

TiKVPDConfig

+

TiKVPDConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11246,10 +11246,10 @@ Optional: Defaults to 10

-

TiKVPessimisticTxn

+

TiKVPessimisticTxn

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11307,10 +11307,10 @@ bool -

TiKVRaftDBConfig

+

TiKVRaftDBConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -11579,7 +11579,7 @@ string defaultcf
- + TiKVCfConfig @@ -11590,10 +11590,10 @@ TiKVCfConfig -

TiKVRaftstoreConfig

+

TiKVRaftstoreConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVRaftstoreConfig is the configuration of TiKV raftstore component.

@@ -12179,10 +12179,10 @@ bool -

TiKVReadPoolConfig

+

TiKVReadPoolConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -12198,7 +12198,7 @@ bool unified
- + TiKVUnifiedReadPoolConfig @@ -12211,7 +12211,7 @@ TiKVUnifiedReadPoolConfig coprocessor
- + TiKVCoprocessorReadPoolConfig @@ -12224,7 +12224,7 @@ TiKVCoprocessorReadPoolConfig storage
- + TiKVStorageReadPoolConfig @@ -12235,10 +12235,10 @@ TiKVStorageReadPoolConfig -

TiKVSecurityConfig

+

TiKVSecurityConfig

(Appears on: -TiKVConfig) +TiKVConfig)

@@ -12319,10 +12319,10 @@ string -

TiKVServerConfig

+

TiKVServerConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVServerConfig is the configuration of TiKV server.

@@ -12637,10 +12637,10 @@ string -

TiKVSpec

+

TiKVSpec

(Appears on: -TidbClusterSpec) +TidbClusterSpec)

TiKVSpec contains details of TiKV members

@@ -12657,7 +12657,7 @@ string ComponentSpec
- + ComponentSpec @@ -12762,7 +12762,7 @@ Defaults to Kubernetes default storage class.

config
- + TiKVConfig @@ -12774,10 +12774,10 @@ TiKVConfig -

TiKVStatus

+

TiKVStatus

(Appears on: -TidbClusterStatus) +TidbClusterStatus)

TiKVStatus is TiKV status

@@ -12804,7 +12804,7 @@ bool phase
- + MemberPhase @@ -12828,7 +12828,7 @@ Kubernetes apps/v1.StatefulSetStatus stores
- + map[string]github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStore @@ -12840,7 +12840,7 @@ 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 @@ -12852,7 +12852,7 @@ 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 @@ -12872,10 +12872,10 @@ string -

TiKVStorageConfig

+

TiKVStorageConfig

(Appears on: -TiKVConfig) +TiKVConfig)

TiKVStorageConfig is the config of storage

@@ -12950,7 +12950,7 @@ string block-cache
- + TiKVBlockCacheConfig @@ -12961,10 +12961,10 @@ TiKVBlockCacheConfig -

TiKVStorageReadPoolConfig

+

TiKVStorageReadPoolConfig

(Appears on: -TiKVReadPoolConfig) +TiKVReadPoolConfig)

@@ -13062,10 +13062,10 @@ string -

TiKVStore

+

TiKVStore

(Appears on: -TiKVStatus) +TiKVStatus)

TiKVStores is either Up/Down/Offline/Tombstone

@@ -13156,10 +13156,10 @@ Kubernetes meta/v1.Time -

TiKVTitanCfConfig

+

TiKVTitanCfConfig

(Appears on: -TiKVCfConfig) +TiKVCfConfig)

TiKVTitanCfConfig is the titian config.

@@ -13273,10 +13273,10 @@ string -

TiKVTitanDBConfig

+

TiKVTitanDBConfig

(Appears on: -TiKVDbConfig) +TiKVDbConfig)

TiKVTitanDBConfig is the config a titian db.

@@ -13347,10 +13347,10 @@ string -

TiKVUnifiedReadPoolConfig

+

TiKVUnifiedReadPoolConfig

(Appears on: -TiKVReadPoolConfig) +TiKVReadPoolConfig)

@@ -13408,10 +13408,10 @@ int32 -

TidbAutoScalerSpec

+

TidbAutoScalerSpec

(Appears on: -TidbClusterAutoScalerSpec) +TidbClusterAutoScalerSpec)

TidbAutoScalerSpec describes the spec for tidb auto-scaling

@@ -13428,7 +13428,7 @@ int32 BasicAutoScalerSpec
- + BasicAutoScalerSpec @@ -13441,10 +13441,10 @@ BasicAutoScalerSpec -

TidbAutoScalerStatus

+

TidbAutoScalerStatus

(Appears on: -TidbClusterAutoSclaerStatus) +TidbClusterAutoSclaerStatus)

TidbAutoScalerStatus describe the auto-scaling status of tidb

@@ -13461,7 +13461,7 @@ BasicAutoScalerSpec BasicAutoScalerStatus
- + BasicAutoScalerStatus @@ -13474,10 +13474,10 @@ BasicAutoScalerStatus -

TidbClusterAutoScalerSpec

+

TidbClusterAutoScalerSpec

(Appears on: -TidbClusterAutoScaler) +TidbClusterAutoScaler)

TidbAutoScalerSpec describes the state of the TidbClusterAutoScaler

@@ -13494,7 +13494,7 @@ BasicAutoScalerStatus cluster
- + TidbClusterRef @@ -13520,7 +13520,7 @@ MetricsUrl represents the url to fetch the metrics info

monitor
- + TidbMonitorRef @@ -13535,7 +13535,7 @@ Operator will use MetricsUrl

tikv
- + TikvAutoScalerSpec @@ -13549,7 +13549,7 @@ TikvAutoScalerSpec tidb
- + TidbAutoScalerSpec @@ -13561,10 +13561,10 @@ TidbAutoScalerSpec -

TidbClusterAutoSclaerStatus

+

TidbClusterAutoSclaerStatus

(Appears on: -TidbClusterAutoScaler) +TidbClusterAutoScaler)

TidbClusterAutoSclaerStatus describe the whole status

@@ -13581,7 +13581,7 @@ TidbAutoScalerSpec tikv
- + TikvAutoScalerStatus @@ -13595,7 +13595,7 @@ TikvAutoScalerStatus tidb
- + TidbAutoScalerStatus @@ -13607,12 +13607,12 @@ TidbAutoScalerStatus -

TidbClusterRef

+

TidbClusterRef

(Appears on: -TidbClusterAutoScalerSpec, -TidbInitializerSpec, -TidbMonitorSpec) +TidbClusterAutoScalerSpec, +TidbInitializerSpec, +TidbMonitorSpec)

TidbClusterRef reference to a TidbCluster

@@ -13651,10 +13651,10 @@ string -

TidbClusterSpec

+

TidbClusterSpec

(Appears on: -TidbCluster) +TidbCluster)

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

@@ -13671,7 +13671,7 @@ string pd
- + PDSpec @@ -13684,7 +13684,7 @@ PDSpec tidb
- + TiDBSpec @@ -13697,7 +13697,7 @@ TiDBSpec tikv
- + TiKVSpec @@ -13710,7 +13710,7 @@ TiKVSpec tiflash
- + TiFlashSpec @@ -13724,7 +13724,7 @@ TiFlashSpec pump
- + PumpSpec @@ -13738,7 +13738,7 @@ PumpSpec helper
- + HelperSpec @@ -13815,7 +13815,7 @@ Kubernetes core/v1.PullPolicy configUpdateStrategy
- + ConfigUpdateStrategy @@ -13845,7 +13845,7 @@ Optional: Defaults to false

tlsCluster
- + TLSCluster @@ -13951,7 +13951,7 @@ Optional: Defaults to UTC

services
- + []Service @@ -13963,10 +13963,10 @@ Deprecated

-

TidbClusterStatus

+

TidbClusterStatus

(Appears on: -TidbCluster) +TidbCluster)

TidbClusterStatus represents the current status of a tidb cluster.

@@ -13993,7 +13993,7 @@ string pd
- + PDStatus @@ -14005,7 +14005,7 @@ PDStatus tikv
- + TiKVStatus @@ -14017,7 +14017,7 @@ TiKVStatus tidb
- + TiDBStatus @@ -14029,7 +14029,7 @@ TiDBStatus Pump
- + PumpStatus @@ -14041,7 +14041,7 @@ PumpStatus tiflash
- + TiFlashStatus @@ -14051,10 +14051,10 @@ TiFlashStatus -

TidbInitializerSpec

+

TidbInitializerSpec

(Appears on: -TidbInitializer) +TidbInitializer)

TidbInitializer spec encode the desired state of tidb initializer Job

@@ -14081,7 +14081,7 @@ string cluster
- + TidbClusterRef @@ -14176,10 +14176,10 @@ string -

TidbInitializerStatus

+

TidbInitializerStatus

(Appears on: -TidbInitializer) +TidbInitializer)

@@ -14210,7 +14210,7 @@ Kubernetes batch/v1.JobStatus phase
- + InitializePhase @@ -14221,10 +14221,10 @@ InitializePhase -

TidbMonitorRef

+

TidbMonitorRef

(Appears on: -TidbClusterAutoScalerSpec) +TidbClusterAutoScalerSpec)

TidbMonitorRef reference to a TidbMonitor

@@ -14263,10 +14263,10 @@ string -

TidbMonitorSpec

+

TidbMonitorSpec

(Appears on: -TidbMonitor) +TidbMonitor)

TidbMonitor spec encode the desired state of tidb monitoring component

@@ -14283,7 +14283,7 @@ string clusters
- + []TidbClusterRef @@ -14295,7 +14295,7 @@ string prometheus
- + PrometheusSpec @@ -14307,7 +14307,7 @@ PrometheusSpec grafana
- + GrafanaSpec @@ -14320,7 +14320,7 @@ GrafanaSpec reloader
- + ReloaderSpec @@ -14332,7 +14332,7 @@ ReloaderSpec initializer
- + InitializerSpec @@ -14448,18 +14448,18 @@ Ref: https://prometh -

TidbMonitorStatus

+

TidbMonitorStatus

(Appears on: -TidbMonitor) +TidbMonitor)

TODO: sync status

-

TikvAutoScalerSpec

+

TikvAutoScalerSpec

(Appears on: -TidbClusterAutoScalerSpec) +TidbClusterAutoScalerSpec)

TikvAutoScalerSpec describes the spec for tikv auto-scaling

@@ -14476,7 +14476,7 @@ Ref: https://prometh BasicAutoScalerSpec
-
+ BasicAutoScalerSpec @@ -14489,10 +14489,10 @@ BasicAutoScalerSpec -

TikvAutoScalerStatus

+

TikvAutoScalerStatus

(Appears on: -TidbClusterAutoSclaerStatus) +TidbClusterAutoSclaerStatus)

TikvAutoScalerStatus describe the auto-scaling status of tikv

@@ -14509,7 +14509,7 @@ BasicAutoScalerSpec BasicAutoScalerStatus
- + BasicAutoScalerStatus @@ -14522,10 +14522,10 @@ BasicAutoScalerStatus -

TxnLocalLatches

+

TxnLocalLatches

(Appears on: -TiDBConfig) +TiDBConfig)

TxnLocalLatches is the TxnLocalLatches section of the config.

@@ -14562,10 +14562,10 @@ uint -

UnjoinedMember

+

UnjoinedMember

(Appears on: -PDStatus) +PDStatus)

UnjoinedMember is the pd unjoin cluster member information

@@ -14612,7 +14612,7 @@ Kubernetes meta/v1.Time -

User

+

User

User is the configuration of users.

@@ -14661,7 +14661,7 @@ string networks
- + Networks From 20f93e47f421bb4d57b45c702c729f8ca03a82a5 Mon Sep 17 00:00:00 2001 From: onlymellb Date: Sat, 9 May 2020 13:57:23 +0800 Subject: [PATCH 05/10] Update pkg/apis/pingcap/v1alpha1/types.go Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com> --- pkg/apis/pingcap/v1alpha1/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/pingcap/v1alpha1/types.go b/pkg/apis/pingcap/v1alpha1/types.go index efde5c636e5..f3b9a873d36 100644 --- a/pkg/apis/pingcap/v1alpha1/types.go +++ b/pkg/apis/pingcap/v1alpha1/types.go @@ -946,7 +946,7 @@ type MydumperConfig struct { // Options means options for backup data to remote storage with mydumper. Options []string `json:"options,omitempty"` // TableRegex means Regular expression for 'db.table' matching - TableRegex *string `json:"option,omitempty"` + TableRegex *string `json:"tableRegex,omitempty"` } // +k8s:openapi-gen=true From 6f67e0255a87e6e936de54cce9c17a637578d436 Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 14:34:08 +0800 Subject: [PATCH 06/10] update api docs --- docs/api-references/docs.md | 2 +- pkg/apis/pingcap/v1alpha1/openapi_generated.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index ea03766e639..19c5e05251d 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -4350,7 +4350,7 @@ Kubernetes core/v1.PullPolicy -option
+tableRegex
string diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index ff82be52da8..41f128adf36 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -1909,7 +1909,7 @@ func schema_pkg_apis_pingcap_v1alpha1_MydumperConfig(ref common.ReferenceCallbac }, }, }, - "option": { + "tableRegex": { SchemaProps: spec.SchemaProps{ Description: "TableRegex means Regular expression for 'db.table' matching", Type: []string{"string"}, From 1b95ce752d600a6ae8159edf6719a61e2899286e Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 17:12:29 +0800 Subject: [PATCH 07/10] update crd yaml --- manifests/crd.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 31b5a98c6f2..ab9bdac73d3 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -4537,12 +4537,12 @@ spec: type: object mydumper: properties: - option: - type: string options: items: type: string type: array + tableRegex: + type: string type: object s3: properties: @@ -5398,12 +5398,12 @@ spec: type: object mydumper: properties: - option: - type: string options: items: type: string type: array + tableRegex: + type: string type: object s3: properties: From bf6a5f189d94da0e92eb32a20adc354d6e9fef7c Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 19:55:14 +0800 Subject: [PATCH 08/10] address comments --- cmd/backup-manager/app/constants/constants.go | 3 ++ cmd/backup-manager/app/util/util.go | 38 +++++++++++-------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/cmd/backup-manager/app/constants/constants.go b/cmd/backup-manager/app/constants/constants.go index c4711811385..9da0d54d1bb 100644 --- a/cmd/backup-manager/app/constants/constants.go +++ b/cmd/backup-manager/app/constants/constants.go @@ -62,4 +62,7 @@ const ( // ServiceAccountCAPath is where is CABundle of serviceaccount locates ServiceAccountCAPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + + // DefaultTableRegex is the default regular expression for 'db.table' matching + DefaultTableRegex = "^(?!(mysql|test|INFORMATION_SCHEMA|PERFORMANCE_SCHEMA|METRICS_SCHEMA|INSPECTION_SCHEMA))" ) diff --git a/cmd/backup-manager/app/util/util.go b/cmd/backup-manager/app/util/util.go index 309acb03160..54fb71a47ae 100644 --- a/cmd/backup-manager/app/util/util.go +++ b/cmd/backup-manager/app/util/util.go @@ -20,12 +20,12 @@ import ( "strings" "github.com/Masterminds/semver" + "github.com/pingcap/tidb-operator/cmd/backup-manager/app/constants" + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "github.com/pingcap/tidb-operator/pkg/backup/util" "github.com/spf13/pflag" "k8s.io/klog" cmdutil "k8s.io/kubectl/pkg/cmd/util" - - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" - "github.com/pingcap/tidb-operator/pkg/backup/util" ) var ( @@ -36,6 +36,19 @@ var ( } // DefaultVersion is the default tikv and br version DefaultVersion = "4.0" + defaultOptions = []string{ + "--long-query-guard=3600", + "--tidb-force-priority=LOW_PRIORITY", + "--verbose=3", + "--compress-protocol", + "--threads=16", + "--rows=10000", + "--skip-tz-utc", + } + defaultTableRegexOptions = []string{ + "--regex", + constants.DefaultTableRegex, + } ) func validCmdFlagFunc(flag *pflag.Flag) { @@ -138,30 +151,23 @@ func ConstructBRGlobalOptionsForBackup(backup *v1alpha1.Backup) ([]string, strin // ConstructMydumperOptionsForBackup constructs mydumper options for backup func ConstructMydumperOptionsForBackup(backup *v1alpha1.Backup) []string { var args []string - defaultOptions := []string{ - "--long-query-guard=3600", - "--tidb-force-priority=LOW_PRIORITY", - "--verbose=3", - "--compress-protocol", - "--threads=16", - "--rows=10000", - "--skip-tz-utc", - } - defaultTableRegexOptions := []string{ - "--regex", - "^(?!(mysql|test|INFORMATION_SCHEMA|PERFORMANCE_SCHEMA|METRICS_SCHEMA|INSPECTION_SCHEMA))", - } config := backup.Spec.Mydumper if config == nil { args = append(args, defaultOptions...) args = append(args, defaultTableRegexOptions...) return args } + if len(config.Options) != 0 { args = append(args, config.Options...) + } else { + args = append(args, defaultOptions...) } + if config.TableRegex != nil { args = append(args, "--regex", *config.TableRegex) + } else { + args = append(args, defaultTableRegexOptions...) } return args } From e383d594b2925b496df480552095c3cfc3a7ed74 Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 19:55:44 +0800 Subject: [PATCH 09/10] add unit tests --- cmd/backup-manager/app/util/util_test.go | 137 +++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 cmd/backup-manager/app/util/util_test.go diff --git a/cmd/backup-manager/app/util/util_test.go b/cmd/backup-manager/app/util/util_test.go new file mode 100644 index 00000000000..afb9944924d --- /dev/null +++ b/cmd/backup-manager/app/util/util_test.go @@ -0,0 +1,137 @@ +// Copyright 2020 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package util + +import ( + "testing" + + . "github.com/onsi/gomega" + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1" + "github.com/pingcap/tidb-operator/pkg/backup/constants" + corev1 "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/utils/pointer" +) + +func TestConstructMydumperOptionsForBackup(t *testing.T) { + g := NewGomegaWithT(t) + + type testcase struct { + name string + hasRegex bool + hasOptions bool + expectFn func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) + } + + tests := []*testcase{ + { + name: "mydumper config is empty", + hasOptions: false, + hasRegex: false, + expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { + g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) + }, + }, + { + name: "customize mydumper options but not set table regex", + hasOptions: true, + hasRegex: false, + expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { + g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) + }, + }, + { + name: "customize mydumper table regex but not customize options", + hasOptions: false, + hasRegex: true, + expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { + g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) + }, + }, + { + name: "customize mydumper table regex and customize options", + hasOptions: true, + hasRegex: true, + expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { + g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + backup := newBackup() + + customRegex := "^mysql" + customOptions := []string{"--long-query-guard=3000"} + + var expectArgs []string + + if tt.hasOptions { + backup.Spec.Mydumper = &v1alpha1.MydumperConfig{Options: customOptions} + expectArgs = append(expectArgs, customOptions...) + } else { + expectArgs = append(expectArgs, defaultOptions...) + } + + if tt.hasRegex { + if backup.Spec.Mydumper == nil { + backup.Spec.Mydumper = &v1alpha1.MydumperConfig{TableRegex: &customRegex} + } else { + backup.Spec.Mydumper.TableRegex = &customRegex + } + expectArgs = append(expectArgs, "--regex", customRegex) + } else { + expectArgs = append(expectArgs, defaultTableRegexOptions...) + } + + generateArgs := ConstructMydumperOptionsForBackup(backup) + tt.expectFn(g, backup, generateArgs, expectArgs) + }) + } +} + +func newBackup() *v1alpha1.Backup { + return &v1alpha1.Backup{ + TypeMeta: metav1.TypeMeta{ + Kind: "Backup", + APIVersion: "pingcap.com/v1alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-backup", + Namespace: corev1.NamespaceDefault, + UID: types.UID("test-bk"), + }, + Spec: v1alpha1.BackupSpec{ + From: v1alpha1.TiDBAccessConfig{ + Host: "10.1.1.2", + Port: constants.DefaultTidbPort, + User: constants.DefaultTidbUser, + SecretName: "demo1-tidb-secret", + }, + StorageProvider: v1alpha1.StorageProvider{ + S3: &v1alpha1.S3StorageProvider{ + Provider: v1alpha1.S3StorageProviderTypeCeph, + Endpoint: "http://10.0.0.1", + Bucket: "test1-demo1", + SecretName: "demo", + }, + }, + StorageClassName: pointer.StringPtr("local-storage"), + StorageSize: "1Gi", + }, + } +} From 5d269e1508bfc4ec3bd77350769ff3d799f6d41b Mon Sep 17 00:00:00 2001 From: luolibin Date: Sat, 9 May 2020 20:00:34 +0800 Subject: [PATCH 10/10] simplify UT code --- cmd/backup-manager/app/util/util_test.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cmd/backup-manager/app/util/util_test.go b/cmd/backup-manager/app/util/util_test.go index afb9944924d..f90e92226db 100644 --- a/cmd/backup-manager/app/util/util_test.go +++ b/cmd/backup-manager/app/util/util_test.go @@ -33,7 +33,6 @@ func TestConstructMydumperOptionsForBackup(t *testing.T) { name string hasRegex bool hasOptions bool - expectFn func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) } tests := []*testcase{ @@ -41,33 +40,21 @@ func TestConstructMydumperOptionsForBackup(t *testing.T) { name: "mydumper config is empty", hasOptions: false, hasRegex: false, - expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { - g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) - }, }, { name: "customize mydumper options but not set table regex", hasOptions: true, hasRegex: false, - expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { - g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) - }, }, { name: "customize mydumper table regex but not customize options", hasOptions: false, hasRegex: true, - expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { - g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) - }, }, { name: "customize mydumper table regex and customize options", hasOptions: true, hasRegex: true, - expectFn: func(g *GomegaWithT, backup *v1alpha1.Backup, generateArgs []string, expectArgs []string) { - g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) - }, }, } @@ -99,7 +86,7 @@ func TestConstructMydumperOptionsForBackup(t *testing.T) { } generateArgs := ConstructMydumperOptionsForBackup(backup) - tt.expectFn(g, backup, generateArgs, expectArgs) + g.Expect(apiequality.Semantic.DeepEqual(generateArgs, expectArgs)).To(Equal(true)) }) } }