From db9e0b832d5c96a5d5757e969f97ba44f6cc24dc Mon Sep 17 00:00:00 2001 From: Aylei Date: Fri, 27 Dec 2019 14:11:09 +0800 Subject: [PATCH] Add default behavior in config field description (#1411) --- manifests/crd.yaml | 586 +++++---- .../pingcap/v1alpha1/openapi_generated.go | 1060 +++++++++-------- pkg/apis/pingcap/v1alpha1/pd_config.go | 85 +- pkg/apis/pingcap/v1alpha1/tidb_config.go | 174 +-- pkg/apis/pingcap/v1alpha1/tidb_config_test.go | 9 +- pkg/apis/pingcap/v1alpha1/tikv_config.go | 130 +- .../pingcap/v1alpha1/zz_generated.deepcopy.go | 435 +++++-- pkg/manager/member/tidb_member_manager.go | 13 +- .../member/tidb_member_manager_test.go | 5 +- tests/pkg/fixture/fixture.go | 7 +- 10 files changed, 1552 insertions(+), 952 deletions(-) diff --git a/manifests/crd.yaml b/manifests/crd.yaml index dcd050cab9..90aad5afae 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -697,10 +697,6 @@ spec: config: description: PDConfig is the configuration of pd-server properties: - advertise-client-urls: - type: string - advertise-peer-urls: - type: string auto-compaction-mode: description: AutoCompactionMode is either 'periodic' or 'revision'. The default value is 'periodic'. @@ -714,40 +710,31 @@ spec: Before etcd v3.3.x, the type of retention is int. We add 'v2' suffix to make it backward compatible. type: string - client-urls: - type: string cluster-version: type: string - data-dir: - type: string election-interval: description: ElectionInterval is the interval for etcd Raft election. type: string enable-grpc-gateway: + description: 'Optional: Defaults to true' type: boolean enable-prevote: - description: Prevote is true to enable Raft Pre-Vote. If enabled, + description: 'Prevote is true to enable Raft Pre-Vote. If enabled, Raft runs an additional election phase to check whether it would get enough votes to win an election, thus minimizing - disruptions. + disruptions. Optional: Defaults to true' type: boolean force-new-cluster: type: boolean - initial-cluster: - type: string - initial-cluster-state: - type: string - join: - description: Join to an existing pd cluster, a string of endpoints. - type: string label-property: type: object lease: - description: LeaderLease time, if leader doesn't update its + description: 'LeaderLease time, if leader doesn''t update its TTL in etcd after lease time, etcd will expire the leader key and other servers can campaign the leader again. Etcd - only supports seconds TTL, so here is second too. + only supports seconds TTL, so here is second too. Optional: + Defaults to 3' format: int64 type: integer log: @@ -802,7 +789,7 @@ spec: description: Log format. one of json, text, or console. type: string level: - description: Log level. + description: 'Log level. Optional: Defaults to info' type: string type: object log-file: @@ -819,13 +806,11 @@ spec: job: type: string type: object - name: - type: string namespace: type: object namespace-classifier: - description: NamespaceClassifier is for classifying stores/regions - into different namespaces. + description: 'NamespaceClassifier is for classifying stores/regions + into different namespaces. Optional: Defaults to true' type: string pd-server: description: PDServerConfig is the configuration for pd server. @@ -835,8 +820,6 @@ spec: storage. type: string type: object - peer-urls: - type: string quota-backend-bytes: description: QuotaBackendBytes Raise alarms when backend size exceeds the given quota. 0 means use the default quota. the @@ -850,18 +833,21 @@ spec: store. The placement priorities is implied by the order of label keys. For example, ["zone", "rack"] means that we should place replicas to different zones first, then - to different racks if we don't have enough zones. + to different racks if we don't have enough zones. Immutable, + change should be made through pd-ctl after cluster creation items: type: string type: array max-replicas: - description: MaxReplicas is the number of replicas for each - region. + description: 'MaxReplicas is the number of replicas for + each region. Immutable, change should be made through + pd-ctl after cluster creation Optional: Defaults to 3' format: int64 type: integer strictly-match-label: description: StrictlyMatchLabel strictly checks if the label - of TiKV is matched with LocaltionLabels. + of TiKV is matched with LocaltionLabels. Immutable, change + should be made through pd-ctl after cluster creation type: string type: object schedule: @@ -870,56 +856,70 @@ spec: disable-location-replacement: description: DisableLocationReplacement is the option to prevent replica checker from moving replica to a better - location. + location. Immutable, change should be made through pd-ctl + after cluster creation type: string disable-make-up-replica: description: DisableMakeUpReplica is the option to prevent replica checker from making up replicas when replica count - is less than expected. + is less than expected. Immutable, change should be made + through pd-ctl after cluster creation type: string disable-namespace-relocation: description: DisableNamespaceRelocation is the option to prevent namespace checker from moving replica to the target - namespace. + namespace. Immutable, change should be made through pd-ctl + after cluster creation type: string disable-raft-learner: description: DisableLearner is the option to disable using - AddLearnerNode instead of AddNode + AddLearnerNode instead of AddNode Immutable, change should + be made through pd-ctl after cluster creation type: string disable-remove-down-replica: description: DisableRemoveDownReplica is the option to prevent - replica checker from removing down replicas. + replica checker from removing down replicas. Immutable, + change should be made through pd-ctl after cluster creation type: string disable-remove-extra-replica: description: DisableRemoveExtraReplica is the option to prevent replica checker from removing extra replicas. + Immutable, change should be made through pd-ctl after + cluster creation type: string disable-replace-offline-replica: description: DisableReplaceOfflineReplica is the option to prevent replica checker from repalcing offline replicas. + Immutable, change should be made through pd-ctl after + cluster creation type: string high-space-ratio: description: HighSpaceRatio is the highest usage ratio of store which regraded as high space. High space means there is a lot of spare capacity, and store region score varies - directly with used size. + directly with used size. Immutable, change should be made + through pd-ctl after cluster creation format: double type: number hot-region-cache-hits-threshold: description: HotRegionCacheHitThreshold is the cache hits threshold of the hot region. If the number of times a region hits the hot cache is greater than this threshold, - it is considered a hot region. + it is considered a hot region. Immutable, change should + be made through pd-ctl after cluster creation format: int64 type: integer hot-region-schedule-limit: - description: HotRegionScheduleLimit is the max coexist hot - region schedules. + description: 'HotRegionScheduleLimit is the max coexist + hot region schedules. Immutable, change should be made + through pd-ctl after cluster creation Optional: Defaults + to 4' format: int64 type: integer leader-schedule-limit: - description: LeaderScheduleLimit is the max coexist leader - schedules. + description: 'LeaderScheduleLimit is the max coexist leader + schedules. Immutable, change should be made through pd-ctl + after cluster creation Optional: Defaults to 4' format: int64 type: integer low-space-ratio: @@ -930,75 +930,99 @@ spec: ^ ^ ^ ^ 0 HighSpaceRatio * capacity LowSpaceRatio * capacity capacity - LowSpaceRatio is the lowest usage ratio of store which regraded as low space. When in low space, store region score increases to very large and varies inversely with available size. + LowSpaceRatio is the lowest usage ratio of store which regraded as low space. When in low space, store region score increases to very large and varies inversely with available size. Immutable, change should be made through pd-ctl after cluster creation format: double type: number max-merge-region-keys: + description: 'Immutable, change should be made through pd-ctl + after cluster creation Optional: Defaults to 200000' format: int64 type: integer max-merge-region-size: - description: If both the size of region is smaller than + description: 'If both the size of region is smaller than MaxMergeRegionSize and the number of rows in region is smaller than MaxMergeRegionKeys, it will try to merge - with adjacent regions. + with adjacent regions. Immutable, change should be made + through pd-ctl after cluster creation Optional: Defaults + to 20' format: int64 type: integer max-pending-peer-count: + description: 'Immutable, change should be made through pd-ctl + after cluster creation Optional: Defaults to 16' format: int64 type: integer max-snapshot-count: - description: If the snapshot count of one store is greater + description: 'If the snapshot count of one store is greater than this value, it will never be used as a source or - target store. + target store. Immutable, change should be made through + pd-ctl after cluster creation Optional: Defaults to 3' format: int64 type: integer max-store-down-time: - description: MaxStoreDownTime is the max duration after - which a store will be considered to be down if it hasn't - reported heartbeats. + description: 'MaxStoreDownTime is the max duration after + which a store will be considered to be down if it hasn''t + reported heartbeats. Immutable, change should be made + through pd-ctl after cluster creation Optional: Defaults + to 30m' type: string merge-schedule-limit: - description: MergeScheduleLimit is the max coexist merge - schedules. + description: 'MergeScheduleLimit is the max coexist merge + schedules. Immutable, change should be made through pd-ctl + after cluster creation Optional: Defaults to 8' format: int64 type: integer patrol-region-interval: description: PatrolRegionInterval is the interval for scanning - region during patrol. + region during patrol. Immutable, change should be made + through pd-ctl after cluster creation type: string region-schedule-limit: - description: RegionScheduleLimit is the max coexist region - schedules. + description: 'RegionScheduleLimit is the max coexist region + schedules. Immutable, change should be made through pd-ctl + after cluster creation Optional: Defaults to 2048' format: int64 type: integer replica-schedule-limit: - description: ReplicaScheduleLimit is the max coexist replica - schedules. + description: 'ReplicaScheduleLimit is the max coexist replica + schedules. Immutable, change should be made through pd-ctl + after cluster creation Optional: Defaults to 64' format: int64 type: integer schedulers-v2: description: Schedulers support for loding customized schedulers + Immutable, change should be made through pd-ctl after + cluster creation items: description: PDSchedulerConfig is customized scheduler configuration properties: args: + description: Immutable, change should be made through + pd-ctl after cluster creation items: type: string type: array disable: + description: Immutable, change should be made through + pd-ctl after cluster creation type: boolean type: + description: Immutable, change should be made through + pd-ctl after cluster creation type: string type: object type: array split-merge-interval: - description: SplitMergeInterval is the minimum interval - time to permit merge after split. + description: 'SplitMergeInterval is the minimum interval + time to permit merge after split. Immutable, change should + be made through pd-ctl after cluster creation Optional: + Defaults to 1h' type: string tolerant-size-ratio: description: TolerantSizeRatio is the ratio of buffer size - for balance scheduler. + for balance scheduler. Immutable, change should be made + through pd-ctl after cluster creation format: double type: number type: object @@ -1024,7 +1048,8 @@ spec: description: TickInterval is the interval for etcd Raft tick. type: string tso-save-interval: - description: TsoSaveInterval is the interval to save timestamp. + description: 'TsoSaveInterval is the interval to save timestamp. + Optional: Defaults to 3s' type: string type: object configUpdateStrategy: @@ -1113,9 +1138,8 @@ spec: config: description: TiDBConfig is the configuration of tidb-server properties: - advertise-address: - type: string alter-primary-key: + description: 'Optional: Defaults to false' type: boolean binlog: description: Binlog is the config for binlog. @@ -1124,32 +1148,34 @@ spec: description: Use socket file to write binlog, for compatible with kafka version tidb-binlog. type: string - enable: - type: boolean ignore-error: description: If IgnoreError is true, when writing binlog meets error, TiDB would ignore the error. type: boolean strategy: - description: The strategy for sending binlog to pump, value - can be "range,omitempty" or "hash,omitempty" now. + description: 'The strategy for sending binlog to pump, value + can be "range,omitempty" or "hash,omitempty" now. Optional: + Defaults to range' type: string write-timeout: + description: 'Optional: Defaults to 15s' type: string type: object check-mb4-value-in-utf8: + description: 'Optional: Defaults to true' type: boolean compatible-kill-query: type: boolean cors: type: string enable-batch-dml: + description: 'Optional: Defaults to false' type: boolean enable-streaming: + description: 'Optional: Defaults to false' type: boolean - host: - type: string lease: + description: 'Optional: Defaults to 45s' type: string log: description: Log is the log section of config. @@ -1158,6 +1184,7 @@ spec: description: Disable automatic timestamps in output. type: boolean expensive-threshold: + description: 'Optional: Defaults to 10000' format: int32 type: integer file: @@ -1183,20 +1210,22 @@ spec: type: integer type: object format: - description: Log format. one of json, text, or console. + description: 'Log format. one of json, text, or console. + Optional: Defaults to text' type: string level: - description: Log level. + description: 'Log level. Optional: Defaults to info' type: string query-log-max-len: + description: 'Optional: Defaults to 2048' format: int64 type: integer record-plan-in-slow-log: + description: 'Optional: Defaults to 1' format: int64 type: integer - slow-query-file: - type: string slow-threshold: + description: 'Optional: Defaults to 300' format: int64 type: integer type: object @@ -1204,14 +1233,17 @@ spec: format: int32 type: integer mem-quota-query: + description: 'Optional: Defaults to 34359738368' format: int64 type: integer oom-action: + description: 'Optional: Defaults to log' type: string opentracing: description: OpenTracing is the opentracing section of the config. properties: enable: + description: 'Optional: Defaults to false' type: boolean reporter: description: OpenTracingReporter is the config for opentracing @@ -1249,45 +1281,56 @@ spec: type: string type: object type: object - path: - type: string performance: description: Performance is the performance section of the config. properties: bind-info-lease: + description: 'Optional: Defaults to 3s' type: string cross-join: + description: 'Optional: Defaults to true' type: boolean feedback-probability: + description: 'Optional: Defaults to 0.05' format: double type: number force-priority: + description: 'Optional: Defaults to NO_PRIORITY' type: string max-memory: + description: 'Optional: Defaults to 0' format: int64 type: integer max-procs: format: int32 type: integer pseudo-estimate-ratio: + description: 'Optional: Defaults to 0.8' format: double type: number query-feedback-limit: + description: 'Optional: Defaults to 1024' format: int32 type: integer run-auto-analyze: + description: 'Optional: Defaults to true' type: boolean stats-lease: + description: 'Optional: Defaults to 3s' type: string stmt-count-limit: + description: 'Optional: Defaults to 5000' format: int32 type: integer tcp-keep-alive: + description: 'Optional: Defaults to true' type: boolean txn-entry-count-limit: + description: 'Optional: Defaults to 300000' format: int64 type: integer txn-total-size-limit: + description: 'Optional: Defaults to 104857600' format: int64 type: integer type: object @@ -1295,12 +1338,13 @@ spec: description: PessimisticTxn is the config for pessimistic transaction. properties: enable: - description: Enable must be true for 'begin lock' or session - variable to start a pessimistic transaction. + description: 'Enable must be true for ''begin lock'' or + session variable to start a pessimistic transaction. Optional: + Defaults to true' type: boolean max-retry-count: - description: The max count of retry for a single statement - in a pessimistic transaction. + description: 'The max count of retry for a single statement + in a pessimistic transaction. Optional: Defaults to 256' format: int32 type: integer type: object @@ -1312,19 +1356,19 @@ spec: load: type: string type: object - port: - format: int32 - type: integer prepared-plan-cache: description: PreparedPlanCache is the PreparedPlanCache section of the config. properties: capacity: + description: 'Optional: Defaults to 100' format: int32 type: integer enabled: + description: 'Optional: Defaults to false' type: boolean memory-guard-ratio: + description: 'Optional: Defaults to 0.1' format: double type: number type: object @@ -1339,11 +1383,12 @@ spec: type: integer networks: description: PROXY protocol acceptable client networks. - Empty string means disable PROXY protocol, * means all + Empty *string means disable PROXY protocol, * means all networks. type: string type: object run-ddl: + description: 'Optional: Defaults to true' type: boolean security: description: Security is the security section of the config. @@ -1366,9 +1411,11 @@ spec: socket: type: string split-region-max-num: + description: 'Optional: Defaults to 1000' format: int64 type: integer split-table: + description: 'Optional: Defaults to true' type: boolean status: description: Status is the status section of the config. @@ -1376,99 +1423,104 @@ spec: metrics-addr: type: string metrics-interval: + description: 'Optional: Defaults to 15' format: int32 type: integer record-db-qps: + description: 'Optional: Defaults to false' type: boolean report-status: + description: 'Optional: Defaults to true' type: boolean - status-host: - type: string - status-port: - format: int32 - type: integer type: object stmt-summary: description: StmtSummary is the config for statement summary. properties: max-sql-length: - description: The maximum length of displayed normalized - SQL and sample SQL. + description: 'The maximum length of displayed normalized + SQL and sample SQL. Optional: Defaults to 4096' format: int32 type: integer max-stmt-count: - description: The maximum number of statements kept in memory. + description: 'The maximum number of statements kept in memory. + Optional: Defaults to 100' format: int32 type: integer type: object - store: - type: string tikv-client: description: TiKVClient is the config for tikv client. properties: batch-wait-size: - description: BatchWaitSize is the max wait size for batch. + description: 'BatchWaitSize is the max wait size for batch. + Optional: Defaults to 8' format: int32 type: integer commit-timeout: - description: CommitTimeout is the max time which command - 'commit' will wait. + description: 'CommitTimeout is the max time which command + ''commit'' will wait. Optional: Defaults to 41s' type: string grpc-connection-count: - description: GrpcConnectionCount is the max gRPC connections - that will be established with each tikv-server. + description: 'GrpcConnectionCount is the max gRPC connections + that will be established with each tikv-server. Optional: + Defaults to 16' format: int32 type: integer grpc-keepalive-time: - description: After a duration of this time in seconds if - the client doesn't see any activity it pings the server - to see if the transport is still alive. + description: 'After a duration of this time in seconds if + the client doesn''t see any activity it pings the server + to see if the transport is still alive. Optional: Defaults + to 10' format: int32 type: integer grpc-keepalive-timeout: - description: After having pinged for keepalive check, the + description: 'After having pinged for keepalive check, the client waits for a duration of Timeout in seconds and if no activity is seen even after that the connection - is closed. + is closed. Optional: Defaults to 3' format: int32 type: integer max-batch-size: - description: MaxBatchSize is the max batch size when calling - batch commands API. + description: 'MaxBatchSize is the max batch size when calling + batch commands API. Optional: Defaults to 128' format: int32 type: integer max-batch-wait-time: - description: MaxBatchWaitTime in nanosecond is the max wait - time for batch. + description: 'MaxBatchWaitTime in nanosecond is the max + wait time for batch. Optional: Defaults to 0' format: int64 type: integer max-txn-time-use: - description: MaxTxnTimeUse is the max time a Txn may use - (in seconds) from its startTS to commitTS. + description: 'MaxTxnTimeUse is the max time a Txn may use + (in seconds) from its startTS to commitTS. Optional: Defaults + to 590' format: int32 type: integer overload-threshold: - description: If TiKV load is greater than this, TiDB will - wait for a while to avoid little batch. + description: 'If TiKV load is greater than this, TiDB will + wait for a while to avoid little batch. Optional: Defaults + to 200' format: int32 type: integer region-cache-ttl: - description: If a Region has not been accessed for more + description: 'If a Region has not been accessed for more than the given duration (in seconds), it will be reloaded - from the PD. + from the PD. Optional: Defaults to 600' format: int32 type: integer store-limit: - description: If a store has been up to the limit, it will + description: 'If a store has been up to the limit, it will return error for successive request to prevent the store - occupying too much token in dispatching level. + occupying too much token in dispatching level. Optional: + Defaults to 0' format: int64 type: integer type: object token-limit: + description: 'Optional: Defaults to 1000' format: int32 type: integer treat-old-version-utf8-as-utf8mb4: + description: 'Optional: Defaults to true' type: boolean txn-local-latches: description: TxnLocalLatches is the TxnLocalLatches section @@ -1535,39 +1587,43 @@ spec: the `region_max_keys`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be `region_split_keys`. See also: region-split-keys - optional' + Optional: Defaults to 1440000 optional' format: int64 type: integer region-max-size: description: 'When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` - (or a little larger). See also: region-split-size optional' + (or a little larger). See also: region-split-size Optional: + Defaults to 144MB optional' type: string region-split-keys: description: 'When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be `region_split_keys`. See also: region-max-keys - optional' + Optional: Defaults to 960000 optional' format: int64 type: integer region-split-size: description: 'When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` - (or a little larger). See also: region-max-size optional' + (or a little larger). See also: region-max-size Optional: + Defaults to 96MB optional' type: string split-region-on-table: - description: When it is set to `true`, TiKV will try to + description: 'When it is set to `true`, TiKV will try to split a Region with table prefix if that Region crosses tables. It is recommended to turn off this option if there - will be a large number of tables created. optional + will be a large number of tables created. Optional: Defaults + to false optional' type: boolean type: object gc: properties: "\tbatch_keys": + description: 'Optional: Defaults to 512' format: int64 type: integer "\tmax_write_bytes_per_sec": @@ -1602,11 +1658,44 @@ spec: log-file: type: string log-level: + description: 'Optional: Defaults to info' type: string log-rotation-timespan: + description: 'Optional: Defaults to 24h' type: string panic-when-unexpected-key-or-data: type: boolean + pd: + properties: + endpoints: + description: |- + The PD endpoints for the client. + + Default is empty. + items: + type: string + type: array + retry_interval: + description: |- + The interval at which to retry a PD connection initialization. + + Default is 300ms. Optional: Defaults to 300ms + type: string + retry_log_every: + description: |- + If the client observes the same error message on retry, it can repeat the message only every `n` times. + + Default is 10. Set to 1 to disable this feature. Optional: Defaults to 10 + format: int64 + type: integer + retry_max_count: + description: |- + The maximum number of times to retry a PD connection initialization. + + Default is isize::MAX, represented by -1. Optional: Defaults to -1 + format: int64 + type: integer + type: object raftdb: properties: allow_concurrent_memtable_write: @@ -1620,17 +1709,6 @@ spec: defaultcf: description: TiKVCfConfig is the config of a cf properties: - Level0FileNumCompactionTrigger: - format: int64 - type: integer - Level0SlowdownWritesTrigger: - format: int64 - type: integer - Level0StopWritesTrigger: - format: int64 - type: integer - PinL0FilterAndIndexBlocks: - type: boolean block-based-bloom-filter: type: boolean block-cache-size: @@ -1664,6 +1742,15 @@ spec: type: boolean hard-pending-compaction-bytes-limit: type: string + level0-file-num-compaction-trigger: + format: int64 + type: integer + level0-slowdown-writes-trigger: + format: int64 + type: integer + level0-stop-writes-trigger: + format: int64 + type: integer max-bytes-for-level-base: type: string max-bytes-for-level-multiplier: @@ -1682,6 +1769,8 @@ spec: type: integer optimize-filters-for-hits: type: boolean + pin-l0-filter-and-index-blocks: + type: boolean prop-keys-index-distance: format: int64 type: integer @@ -1725,11 +1814,6 @@ spec: type: boolean write-buffer-size: type: string - required: - - PinL0FilterAndIndexBlocks - - Level0FileNumCompactionTrigger - - Level0SlowdownWritesTrigger - - Level0StopWritesTrigger type: object enable_pipelined_write: type: boolean @@ -1790,16 +1874,19 @@ spec: format: int64 type: integer apply-pool-size: + description: 'Optional: Defaults to 2' format: int64 type: integer clean-stale-peer-delay: - description: delay time before deleting a stale peer + description: 'delay time before deleting a stale peer Optional: + Defaults to 10m' type: string cleanup-import-sst-interval: + description: 'Optional: Defaults to 10m' type: string consistency-check-interval: - description: Interval (ms) to check region whether the data - is consistent. + description: 'Interval (ms) to check region whether the + data is consistent. Optional: Defaults to 0' type: string hibernate-regions: type: boolean @@ -1807,8 +1894,10 @@ spec: format: int64 type: integer lock-cf-compact-bytes-threshold: + description: 'Optional: Defaults to 256MB' type: string lock-cf-compact-interval: + description: 'Optional: Defaults to 10m' type: string max-leader-missing-duration: description: / If the leader of a peer is missing for longer @@ -1818,9 +1907,9 @@ spec: destroy itself. type: string max-peer-down-duration: - description: / When a peer is not active for max-peer-down-duration + description: '/ When a peer is not active for max-peer-down-duration / the peer is considered to be down and is reported to - PD. + PD. Optional: Defaults to 5m' type: string merge-check-tick-interval: description: / Interval to re-propose merge. @@ -1836,11 +1925,16 @@ spec: format: int64 type: integer pd-heartbeat-tick-interval: + description: 'Optional: Defaults to 60s' type: string pd-store-heartbeat-tick-interval: + description: 'Optional: Defaults to 10s' type: string peer-stale-state-check-interval: type: string + prevote: + description: 'Optional: Defaults to true' + type: boolean raft-base-tick-interval: description: raft-base-tick-interval is a base tick interval (ms). @@ -1853,27 +1947,30 @@ spec: leader will not keep entry cache for it. type: string raft-entry-max-size: - description: When the entry exceed the max size, reject - to propose it. + description: 'When the entry exceed the max size, reject + to propose it. Optional: Defaults to 8MB' type: string raft-heartbeat-ticks: format: int64 type: integer raft-log-gc-count-limit: - description: When entry count exceed this value, gc will - be forced trigger. + description: 'When entry count exceed this value, gc will + be forced trigger. Optional: Defaults to 72000' format: int64 type: integer raft-log-gc-size-limit: - description: When the approximate size of raft log entries - exceed this value gc will be forced trigger. + description: 'When the approximate size of raft log entries + exceed this value gc will be forced trigger. Optional: + Defaults to 72MB' type: string raft-log-gc-threshold: - description: A threshold to gc stale raft log, must >= 1. + description: 'A threshold to gc stale raft log, must >= + 1. Optional: Defaults to 50' format: int64 type: integer raft-log-gc-tick-interval: - description: Interval to gc unnecessary raft log (ms). + description: 'Interval to gc unnecessary raft log (ms). + Optional: Defaults to 10s' type: string raft-reject-transfer-leader-duration: description: When a peer is newly added, reject transferring @@ -1884,27 +1981,29 @@ spec: and applied entry. type: string region-compact-check-interval: - description: / Interval (ms) to check whether start compaction - for a region. + description: '/ Interval (ms) to check whether start compaction + for a region. Optional: Defaults to 5m' type: string region-compact-check-step: - description: / Number of regions for each time checking. + description: '/ Number of regions for each time checking. + Optional: Defaults to 100' format: int64 type: integer region-compact-min-tombstones: - description: / Minimum number of tombstones to trigger manual - compaction. + description: '/ Minimum number of tombstones to trigger + manual compaction. Optional: Defaults to 10000' format: int64 type: integer region-compact-tombstones-percent: - description: / Minimum percentage of tombstones to trigger - manual compaction. / Should between 1 and 100. + description: '/ Minimum percentage of tombstones to trigger + manual compaction. / Should between 1 and 100. Optional: + Defaults to 30' format: int64 type: integer region-split-check-diff: - description: / When size change of region exceed the diff + description: '/ When size change of region exceed the diff since last check, it / will be checked again whether it - should be split. + should be split. Optional: Defaults to 6MB' type: string report-region-flow-interval: type: string @@ -1918,18 +2017,19 @@ spec: snap-mgr-gc-tick-interval: type: string split-region-check-tick-interval: - description: Interval (ms) to check region whether need - to be split or not. + description: 'Interval (ms) to check region whether need + to be split or not. Optional: Defaults to 10s' type: string store-max-batch-size: format: int64 type: integer store-pool-size: + description: 'Optional: Defaults to 2' format: int64 type: integer sync-log: - description: true for high reliability, prevent data loss - when power failure. + description: 'true for high reliability, prevent data loss + when power failure. Optional: Defaults to true' type: boolean use-delete-range: type: boolean @@ -1939,47 +2039,61 @@ spec: coprocessor: properties: high_concurrency: + description: 'Optional: Defaults to 8' format: int64 type: integer low_concurrency: + description: 'Optional: Defaults to 8' format: int64 type: integer max_tasks_per_worker_high: + description: 'Optional: Defaults to 2000' format: int64 type: integer max_tasks_per_worker_low: + description: 'Optional: Defaults to 2000' format: int64 type: integer max_tasks_per_worker_normal: + description: 'Optional: Defaults to 2000' format: int64 type: integer normal_concurrency: + description: 'Optional: Defaults to 8' format: int64 type: integer stack_size: + description: 'Optional: Defaults to 10MB' type: string type: object storage: properties: high_concurrency: + description: 'Optional: Defaults to 4' format: int64 type: integer low_concurrency: + description: 'Optional: Defaults to 4' format: int64 type: integer max_tasks_per_worker_high: + description: 'Optional: Defaults to 2000' format: int64 type: integer max_tasks_per_worker_low: + description: 'Optional: Defaults to 2000' format: int64 type: integer max_tasks_per_worker_normal: + description: 'Optional: Defaults to 2000' format: int64 type: integer normal_concurrency: + description: 'Optional: Defaults to 4' format: int64 type: integer stack_size: + description: 'Optional: Defaults to 10MB' type: string type: object type: object @@ -1991,23 +2105,14 @@ spec: bytes-per-sync: type: string compaction-readahead-size: + description: 'Optional: Defaults to 0' type: string create-if-missing: + description: 'Optional: Defaults to true' type: boolean defaultcf: description: TiKVCfConfig is the config of a cf properties: - Level0FileNumCompactionTrigger: - format: int64 - type: integer - Level0SlowdownWritesTrigger: - format: int64 - type: integer - Level0StopWritesTrigger: - format: int64 - type: integer - PinL0FilterAndIndexBlocks: - type: boolean block-based-bloom-filter: type: boolean block-cache-size: @@ -2041,6 +2146,15 @@ spec: type: boolean hard-pending-compaction-bytes-limit: type: string + level0-file-num-compaction-trigger: + format: int64 + type: integer + level0-slowdown-writes-trigger: + format: int64 + type: integer + level0-stop-writes-trigger: + format: int64 + type: integer max-bytes-for-level-base: type: string max-bytes-for-level-multiplier: @@ -2059,6 +2173,8 @@ spec: type: integer optimize-filters-for-hits: type: boolean + pin-l0-filter-and-index-blocks: + type: boolean prop-keys-index-distance: format: int64 type: integer @@ -2102,15 +2218,11 @@ spec: type: boolean write-buffer-size: type: string - required: - - PinL0FilterAndIndexBlocks - - Level0FileNumCompactionTrigger - - Level0SlowdownWritesTrigger - - Level0StopWritesTrigger type: object enable-pipelined-write: type: boolean enable-statistics: + description: 'Optional: Defaults to true' type: boolean info-log-dir: type: string @@ -2124,17 +2236,6 @@ spec: lockcf: description: TiKVCfConfig is the config of a cf properties: - Level0FileNumCompactionTrigger: - format: int64 - type: integer - Level0SlowdownWritesTrigger: - format: int64 - type: integer - Level0StopWritesTrigger: - format: int64 - type: integer - PinL0FilterAndIndexBlocks: - type: boolean block-based-bloom-filter: type: boolean block-cache-size: @@ -2168,6 +2269,15 @@ spec: type: boolean hard-pending-compaction-bytes-limit: type: string + level0-file-num-compaction-trigger: + format: int64 + type: integer + level0-slowdown-writes-trigger: + format: int64 + type: integer + level0-stop-writes-trigger: + format: int64 + type: integer max-bytes-for-level-base: type: string max-bytes-for-level-multiplier: @@ -2186,6 +2296,8 @@ spec: type: integer optimize-filters-for-hits: type: boolean + pin-l0-filter-and-index-blocks: + type: boolean prop-keys-index-distance: format: int64 type: integer @@ -2229,39 +2341,28 @@ spec: type: boolean write-buffer-size: type: string - required: - - PinL0FilterAndIndexBlocks - - Level0FileNumCompactionTrigger - - Level0SlowdownWritesTrigger - - Level0StopWritesTrigger type: object max-background-jobs: + description: 'Optional: Defaults to 8' format: int64 type: integer max-manifest-file-size: + description: 'Optional: Defaults to 128MB' type: string max-open-files: + description: 'Optional: Defaults to 40960' format: int64 type: integer max-sub-compactions: + description: 'Optional: Defaults to 3' format: int64 type: integer max-total-wal-size: + description: 'Optional: Defaults to 4GB' type: string raftcf: description: TiKVCfConfig is the config of a cf properties: - Level0FileNumCompactionTrigger: - format: int64 - type: integer - Level0SlowdownWritesTrigger: - format: int64 - type: integer - Level0StopWritesTrigger: - format: int64 - type: integer - PinL0FilterAndIndexBlocks: - type: boolean block-based-bloom-filter: type: boolean block-cache-size: @@ -2295,6 +2396,15 @@ spec: type: boolean hard-pending-compaction-bytes-limit: type: string + level0-file-num-compaction-trigger: + format: int64 + type: integer + level0-slowdown-writes-trigger: + format: int64 + type: integer + level0-stop-writes-trigger: + format: int64 + type: integer max-bytes-for-level-base: type: string max-bytes-for-level-multiplier: @@ -2313,6 +2423,8 @@ spec: type: integer optimize-filters-for-hits: type: boolean + pin-l0-filter-and-index-blocks: + type: boolean prop-keys-index-distance: format: int64 type: integer @@ -2356,11 +2468,6 @@ spec: type: boolean write-buffer-size: type: string - required: - - PinL0FilterAndIndexBlocks - - Level0FileNumCompactionTrigger - - Level0SlowdownWritesTrigger - - Level0StopWritesTrigger type: object rate-bytes-per-sec: type: string @@ -2368,6 +2475,7 @@ spec: format: int64 type: integer stats-dump-period: + description: 'Optional: Defaults to 10m' type: string titan: description: TiKVTitanDBConfig is the config a titian db. @@ -2390,9 +2498,8 @@ spec: type: boolean wal-bytes-per-sync: type: string - wal-dir: - type: string wal-recovery-mode: + description: 'Optional: Defaults to 2' format: int64 type: integer wal-size-limit: @@ -2405,17 +2512,6 @@ spec: writecf: description: TiKVCfConfig is the config of a cf properties: - Level0FileNumCompactionTrigger: - format: int64 - type: integer - Level0SlowdownWritesTrigger: - format: int64 - type: integer - Level0StopWritesTrigger: - format: int64 - type: integer - PinL0FilterAndIndexBlocks: - type: boolean block-based-bloom-filter: type: boolean block-cache-size: @@ -2449,6 +2545,15 @@ spec: type: boolean hard-pending-compaction-bytes-limit: type: string + level0-file-num-compaction-trigger: + format: int64 + type: integer + level0-slowdown-writes-trigger: + format: int64 + type: integer + level0-stop-writes-trigger: + format: int64 + type: integer max-bytes-for-level-base: type: string max-bytes-for-level-multiplier: @@ -2467,6 +2572,8 @@ spec: type: integer optimize-filters-for-hits: type: boolean + pin-l0-filter-and-index-blocks: + type: boolean prop-keys-index-distance: format: int64 type: integer @@ -2510,11 +2617,6 @@ spec: type: boolean write-buffer-size: type: string - required: - - PinL0FilterAndIndexBlocks - - Level0FileNumCompactionTrigger - - Level0SlowdownWritesTrigger - - Level0StopWritesTrigger type: object type: object security: @@ -2533,14 +2635,12 @@ spec: server: description: TiKVServerConfig is the configuration of TiKV server. properties: - addr: - type: string - advertise-addr: - type: string concurrent-recv-snap-limit: + description: 'Optional: Defaults to 32' format: int32 type: integer concurrent-send-snap-limit: + description: 'Optional: Defaults to 32' format: int32 type: integer end-point-batch-row-limit: @@ -2550,6 +2650,7 @@ spec: format: int32 type: integer end-point-recursion-limit: + description: 'Optional: Defaults to 1000' format: int32 type: integer end-point-request-max-handle-duration: @@ -2561,39 +2662,50 @@ spec: format: int32 type: integer grpc-compression-type: + description: 'Optional: Defaults to none' type: string grpc-concurrency: + description: 'Optional: Defaults to 4' format: int32 type: integer grpc-concurrent-stream: + description: 'Optional: Defaults to 1024' format: int32 type: integer grpc-keepalive-time: + description: 'Optional: Defaults to 10s' type: string grpc-keepalive-timeout: + description: 'Optional: Defaults to 3s' type: string grpc-raft-conn-num: + description: 'Optional: Defaults to 10' format: int32 type: integer grpc-stream-initial-window-size: + description: 'Optional: Defaults to 2MB' + type: string + grpc_memory_pool_quota: + description: 'Optional: Defaults to 32G' type: string heavy-load-threshold: format: int32 type: integer heavy-load-wait-duration: + description: 'Optional: Defaults to 60s' type: string labels: type: object snap-max-total-size: type: string snap-max-write-bytes-per-sec: + description: 'Optional: Defaults to 100MB' type: string stats-concurrency: format: int32 type: integer - status-addr: - type: string status-thread-pool-size: + description: 'Optional: Defaults to 1' type: string type: object storage: @@ -2614,24 +2726,26 @@ spec: format: int64 type: integer shared: + description: 'Optional: Defaults to true' type: boolean strict-capacity-limit: type: boolean type: object - data-dir: - type: string max-key-size: format: int64 type: integer scheduler-concurrency: + description: 'Optional: Defaults to 2048000' format: int64 type: integer scheduler-notify-capacity: format: int64 type: integer scheduler-pending-write-threshold: + description: 'Optional: Defaults to 100MB' type: string scheduler-worker-pool-size: + description: 'Optional: Defaults to 4' format: int64 type: integer type: object diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 9415fd1a8d..b3a09eb08c 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -27,87 +27,88 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Backup": schema_pkg_apis_pingcap_v1alpha1_Backup(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupList": schema_pkg_apis_pingcap_v1alpha1_BackupList(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupSchedule": schema_pkg_apis_pingcap_v1alpha1_BackupSchedule(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupScheduleList": schema_pkg_apis_pingcap_v1alpha1_BackupScheduleList(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupScheduleSpec": schema_pkg_apis_pingcap_v1alpha1_BackupScheduleSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupSpec": schema_pkg_apis_pingcap_v1alpha1_BackupSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Binlog": schema_pkg_apis_pingcap_v1alpha1_Binlog(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ComponentSpec": schema_pkg_apis_pingcap_v1alpha1_ComponentSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.FileLogConfig": schema_pkg_apis_pingcap_v1alpha1_FileLogConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GcsStorageProvider": schema_pkg_apis_pingcap_v1alpha1_GcsStorageProvider(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.HelperSpec": schema_pkg_apis_pingcap_v1alpha1_HelperSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Log": schema_pkg_apis_pingcap_v1alpha1_Log(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.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), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDConfig": schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDLogConfig": schema_pkg_apis_pingcap_v1alpha1_PDLogConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMetricConfig": schema_pkg_apis_pingcap_v1alpha1_PDMetricConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDNamespaceConfig": schema_pkg_apis_pingcap_v1alpha1_PDNamespaceConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDReplicationConfig": schema_pkg_apis_pingcap_v1alpha1_PDReplicationConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDScheduleConfig": schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSchedulerConfig": schema_pkg_apis_pingcap_v1alpha1_PDSchedulerConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSecurityConfig": schema_pkg_apis_pingcap_v1alpha1_PDSecurityConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDServerConfig": schema_pkg_apis_pingcap_v1alpha1_PDServerConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSpec": schema_pkg_apis_pingcap_v1alpha1_PDSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDStoreLabel": schema_pkg_apis_pingcap_v1alpha1_PDStoreLabel(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Performance": schema_pkg_apis_pingcap_v1alpha1_Performance(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PessimisticTxn": schema_pkg_apis_pingcap_v1alpha1_PessimisticTxn(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PlanCache": schema_pkg_apis_pingcap_v1alpha1_PlanCache(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Plugin": schema_pkg_apis_pingcap_v1alpha1_Plugin(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PreparedPlanCache": schema_pkg_apis_pingcap_v1alpha1_PreparedPlanCache(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyProtocol": schema_pkg_apis_pingcap_v1alpha1_ProxyProtocol(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PumpSpec": schema_pkg_apis_pingcap_v1alpha1_PumpSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Restore": schema_pkg_apis_pingcap_v1alpha1_Restore(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.RestoreList": schema_pkg_apis_pingcap_v1alpha1_RestoreList(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.RestoreSpec": schema_pkg_apis_pingcap_v1alpha1_RestoreSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.S3StorageProvider": schema_pkg_apis_pingcap_v1alpha1_S3StorageProvider(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Security": schema_pkg_apis_pingcap_v1alpha1_Security(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Service": schema_pkg_apis_pingcap_v1alpha1_Service(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ServiceSpec": schema_pkg_apis_pingcap_v1alpha1_ServiceSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Status": schema_pkg_apis_pingcap_v1alpha1_Status(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StmtSummary": schema_pkg_apis_pingcap_v1alpha1_StmtSummary(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageProvider": schema_pkg_apis_pingcap_v1alpha1_StorageProvider(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBAccessConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBSlowLogTailerSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVBlockCacheConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVBlockCacheConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCfConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVCfConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVClient": schema_pkg_apis_pingcap_v1alpha1_TiKVClient(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVComponentReadPoolConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVComponentReadPoolConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCoprocessorConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVCoprocessorConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVDbConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVDbConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVGCConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVGCConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVImportConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVImportConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVPDConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVPDConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVRaftDBConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftstoreConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVReadPoolConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVReadPoolConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSecurityConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVSecurityConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVServerConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVServerConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSpec": schema_pkg_apis_pingcap_v1alpha1_TiKVSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStorageConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVStorageConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVTitanCfConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVTitanCfConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVTitanDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVTitanDBConfig(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbCluster": schema_pkg_apis_pingcap_v1alpha1_TidbCluster(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterList": schema_pkg_apis_pingcap_v1alpha1_TidbClusterList(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef": schema_pkg_apis_pingcap_v1alpha1_TidbClusterRef(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterSpec": schema_pkg_apis_pingcap_v1alpha1_TidbClusterSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializer": schema_pkg_apis_pingcap_v1alpha1_TidbInitializer(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerList": schema_pkg_apis_pingcap_v1alpha1_TidbInitializerList(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerSpec": schema_pkg_apis_pingcap_v1alpha1_TidbInitializerSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerStatus": schema_pkg_apis_pingcap_v1alpha1_TidbInitializerStatus(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitor": schema_pkg_apis_pingcap_v1alpha1_TidbMonitor(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorList": schema_pkg_apis_pingcap_v1alpha1_TidbMonitorList(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorSpec": schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref), - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TxnLocalLatches": schema_pkg_apis_pingcap_v1alpha1_TxnLocalLatches(ref), - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Backup": schema_pkg_apis_pingcap_v1alpha1_Backup(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupList": schema_pkg_apis_pingcap_v1alpha1_BackupList(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupSchedule": schema_pkg_apis_pingcap_v1alpha1_BackupSchedule(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupScheduleList": schema_pkg_apis_pingcap_v1alpha1_BackupScheduleList(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupScheduleSpec": schema_pkg_apis_pingcap_v1alpha1_BackupScheduleSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.BackupSpec": schema_pkg_apis_pingcap_v1alpha1_BackupSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Binlog": schema_pkg_apis_pingcap_v1alpha1_Binlog(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ComponentSpec": schema_pkg_apis_pingcap_v1alpha1_ComponentSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.FileLogConfig": schema_pkg_apis_pingcap_v1alpha1_FileLogConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.GcsStorageProvider": schema_pkg_apis_pingcap_v1alpha1_GcsStorageProvider(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.HelperSpec": schema_pkg_apis_pingcap_v1alpha1_HelperSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Log": schema_pkg_apis_pingcap_v1alpha1_Log(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.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), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDConfig": schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDLogConfig": schema_pkg_apis_pingcap_v1alpha1_PDLogConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDMetricConfig": schema_pkg_apis_pingcap_v1alpha1_PDMetricConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDNamespaceConfig": schema_pkg_apis_pingcap_v1alpha1_PDNamespaceConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDReplicationConfig": schema_pkg_apis_pingcap_v1alpha1_PDReplicationConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDScheduleConfig": schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSchedulerConfig": schema_pkg_apis_pingcap_v1alpha1_PDSchedulerConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSecurityConfig": schema_pkg_apis_pingcap_v1alpha1_PDSecurityConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDServerConfig": schema_pkg_apis_pingcap_v1alpha1_PDServerConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDSpec": schema_pkg_apis_pingcap_v1alpha1_PDSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDStoreLabel": schema_pkg_apis_pingcap_v1alpha1_PDStoreLabel(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Performance": schema_pkg_apis_pingcap_v1alpha1_Performance(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PessimisticTxn": schema_pkg_apis_pingcap_v1alpha1_PessimisticTxn(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PlanCache": schema_pkg_apis_pingcap_v1alpha1_PlanCache(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Plugin": schema_pkg_apis_pingcap_v1alpha1_Plugin(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PreparedPlanCache": schema_pkg_apis_pingcap_v1alpha1_PreparedPlanCache(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ProxyProtocol": schema_pkg_apis_pingcap_v1alpha1_ProxyProtocol(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PumpSpec": schema_pkg_apis_pingcap_v1alpha1_PumpSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Restore": schema_pkg_apis_pingcap_v1alpha1_Restore(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.RestoreList": schema_pkg_apis_pingcap_v1alpha1_RestoreList(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.RestoreSpec": schema_pkg_apis_pingcap_v1alpha1_RestoreSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.S3StorageProvider": schema_pkg_apis_pingcap_v1alpha1_S3StorageProvider(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Security": schema_pkg_apis_pingcap_v1alpha1_Security(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Service": schema_pkg_apis_pingcap_v1alpha1_Service(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.ServiceSpec": schema_pkg_apis_pingcap_v1alpha1_ServiceSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.Status": schema_pkg_apis_pingcap_v1alpha1_Status(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StmtSummary": schema_pkg_apis_pingcap_v1alpha1_StmtSummary(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageProvider": schema_pkg_apis_pingcap_v1alpha1_StorageProvider(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBAccessConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBAccessConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBServiceSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBServiceSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSlowLogTailerSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBSlowLogTailerSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiDBSpec": schema_pkg_apis_pingcap_v1alpha1_TiDBSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVBlockCacheConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVBlockCacheConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCfConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVCfConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVClient": schema_pkg_apis_pingcap_v1alpha1_TiKVClient(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCoprocessorConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVCoprocessorConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCoprocessorReadPoolConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVCoprocessorReadPoolConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVDbConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVDbConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVGCConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVGCConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVImportConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVImportConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVPDConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVPDConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVRaftDBConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftstoreConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVReadPoolConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVReadPoolConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSecurityConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVSecurityConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVServerConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVServerConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSpec": schema_pkg_apis_pingcap_v1alpha1_TiKVSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStorageConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVStorageConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStorageReadPoolConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVStorageReadPoolConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVTitanCfConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVTitanCfConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVTitanDBConfig": schema_pkg_apis_pingcap_v1alpha1_TiKVTitanDBConfig(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbCluster": schema_pkg_apis_pingcap_v1alpha1_TidbCluster(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterList": schema_pkg_apis_pingcap_v1alpha1_TidbClusterList(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterRef": schema_pkg_apis_pingcap_v1alpha1_TidbClusterRef(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbClusterSpec": schema_pkg_apis_pingcap_v1alpha1_TidbClusterSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializer": schema_pkg_apis_pingcap_v1alpha1_TidbInitializer(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerList": schema_pkg_apis_pingcap_v1alpha1_TidbInitializerList(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerSpec": schema_pkg_apis_pingcap_v1alpha1_TidbInitializerSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbInitializerStatus": schema_pkg_apis_pingcap_v1alpha1_TidbInitializerStatus(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitor": schema_pkg_apis_pingcap_v1alpha1_TidbMonitor(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorList": schema_pkg_apis_pingcap_v1alpha1_TidbMonitorList(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TidbMonitorSpec": schema_pkg_apis_pingcap_v1alpha1_TidbMonitorSpec(ref), + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TxnLocalLatches": schema_pkg_apis_pingcap_v1alpha1_TxnLocalLatches(ref), + "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), @@ -643,16 +644,11 @@ func schema_pkg_apis_pingcap_v1alpha1_Binlog(ref common.ReferenceCallback) commo Description: "Binlog is the config for binlog.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "enable": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, "write-timeout": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 15s", + Type: []string{"string"}, + Format: "", }, }, "ignore-error": { @@ -671,7 +667,7 @@ func schema_pkg_apis_pingcap_v1alpha1_Binlog(ref common.ReferenceCallback) commo }, "strategy": { SchemaProps: spec.SchemaProps{ - Description: "The strategy for sending binlog to pump, value can be \"range,omitempty\" or \"hash,omitempty\" now.", + Description: "The strategy for sending binlog to pump, value can be \"range,omitempty\" or \"hash,omitempty\" now. Optional: Defaults to range", Type: []string{"string"}, Format: "", }, @@ -954,14 +950,14 @@ func schema_pkg_apis_pingcap_v1alpha1_Log(ref common.ReferenceCallback) common.O Properties: map[string]spec.Schema{ "level": { SchemaProps: spec.SchemaProps{ - Description: "Log level.", + Description: "Log level. Optional: Defaults to info", Type: []string{"string"}, Format: "", }, }, "format": { SchemaProps: spec.SchemaProps{ - Description: "Log format. one of json, text, or console.", + Description: "Log format. one of json, text, or console. Optional: Defaults to text", Type: []string{"string"}, Format: "", }, @@ -979,34 +975,32 @@ func schema_pkg_apis_pingcap_v1alpha1_Log(ref common.ReferenceCallback) common.O Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.FileLogConfig"), }, }, - "slow-query-file": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "slow-threshold": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 300", + Type: []string{"integer"}, + Format: "int64", }, }, "expensive-threshold": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 10000", + Type: []string{"integer"}, + Format: "int32", }, }, "query-log-max-len": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 2048", + Type: []string{"integer"}, + Format: "int64", }, }, "record-plan-in-slow-log": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 1", + Type: []string{"integer"}, + Format: "int64", }, }, }, @@ -1087,8 +1081,9 @@ func schema_pkg_apis_pingcap_v1alpha1_OpenTracing(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "enable": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to false", + Type: []string{"boolean"}, + Format: "", }, }, "sampler": { @@ -1202,42 +1197,6 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com Description: "PDConfig is the configuration of pd-server", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "client-urls": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "peer-urls": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "advertise-client-urls": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "advertise-peer-urls": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "data-dir": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "force-new-cluster": { SchemaProps: spec.SchemaProps{ Type: []string{"boolean"}, @@ -1246,32 +1205,14 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com }, "enable-grpc-gateway": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "initial-cluster": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "initial-cluster-state": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "join": { - SchemaProps: spec.SchemaProps{ - Description: "Join to an existing pd cluster, a string of endpoints.", - Type: []string{"string"}, + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, Format: "", }, }, "lease": { SchemaProps: spec.SchemaProps{ - Description: "LeaderLease time, if leader doesn't update its TTL in etcd after lease time, etcd will expire the leader key and other servers can campaign the leader again. Etcd only supports seconds TTL, so here is second too.", + Description: "LeaderLease time, if leader doesn't update its TTL in etcd after lease time, etcd will expire the leader key and other servers can campaign the leader again. Etcd only supports seconds TTL, so here is second too. Optional: Defaults to 3", Type: []string{"integer"}, Format: "int64", }, @@ -1297,7 +1238,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com }, "tso-save-interval": { SchemaProps: spec.SchemaProps{ - Description: "TsoSaveInterval is the interval to save timestamp.", + Description: "TsoSaveInterval is the interval to save timestamp. Optional: Defaults to 3s", Type: []string{"string"}, Format: "", }, @@ -1309,12 +1250,14 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com }, "schedule": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDScheduleConfig"), + Description: "Immutable, change should be made through pd-ctl after cluster creation", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDScheduleConfig"), }, }, "replication": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDReplicationConfig"), + Description: "Immutable, change should be made through pd-ctl after cluster creation", + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.PDReplicationConfig"), }, }, "namespace": { @@ -1378,7 +1321,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com }, "enable-prevote": { SchemaProps: spec.SchemaProps{ - Description: "Prevote is true to enable Raft Pre-Vote. If enabled, Raft runs an additional election phase to check whether it would get enough votes to win an election, thus minimizing disruptions.", + Description: "Prevote is true to enable Raft Pre-Vote. If enabled, Raft runs an additional election phase to check whether it would get enough votes to win an election, thus minimizing disruptions. Optional: Defaults to true", Type: []string{"boolean"}, Format: "", }, @@ -1410,7 +1353,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com }, "namespace-classifier": { SchemaProps: spec.SchemaProps{ - Description: "NamespaceClassifier is for classifying stores/regions into different namespaces.", + Description: "NamespaceClassifier is for classifying stores/regions into different namespaces. Optional: Defaults to true", Type: []string{"string"}, Format: "", }, @@ -1432,7 +1375,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDLogConfig(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "level": { SchemaProps: spec.SchemaProps{ - Description: "Log level.", + Description: "Log level. Optional: Defaults to info", Type: []string{"string"}, Format: "", }, @@ -1587,14 +1530,14 @@ func schema_pkg_apis_pingcap_v1alpha1_PDReplicationConfig(ref common.ReferenceCa Properties: map[string]spec.Schema{ "max-replicas": { SchemaProps: spec.SchemaProps{ - Description: "MaxReplicas is the number of replicas for each region.", + Description: "MaxReplicas is the number of replicas for each region. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 3", Type: []string{"integer"}, Format: "int64", }, }, "location-labels": { SchemaProps: spec.SchemaProps{ - Description: "The label keys specified the location of a store. The placement priorities is implied by the order of label keys. For example, [\"zone\", \"rack\"] means that we should place replicas to different zones first, then to different racks if we don't have enough zones.", + Description: "The label keys specified the location of a store. The placement priorities is implied by the order of label keys. For example, [\"zone\", \"rack\"] means that we should place replicas to different zones first, then to different racks if we don't have enough zones. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -1608,7 +1551,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDReplicationConfig(ref common.ReferenceCa }, "strictly-match-label": { SchemaProps: spec.SchemaProps{ - Description: "StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels.", + Description: "StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, @@ -1628,166 +1571,168 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb Properties: map[string]spec.Schema{ "max-snapshot-count": { SchemaProps: spec.SchemaProps{ - Description: "If the snapshot count of one store is greater than this value, it will never be used as a source or target store.", + Description: "If the snapshot count of one store is greater than this value, it will never be used as a source or target store. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 3", Type: []string{"integer"}, Format: "int64", }, }, "max-pending-peer-count": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 16", + Type: []string{"integer"}, + Format: "int64", }, }, "max-merge-region-size": { SchemaProps: spec.SchemaProps{ - Description: "If both the size of region is smaller than MaxMergeRegionSize and the number of rows in region is smaller than MaxMergeRegionKeys, it will try to merge with adjacent regions.", + Description: "If both the size of region is smaller than MaxMergeRegionSize and the number of rows in region is smaller than MaxMergeRegionKeys, it will try to merge with adjacent regions. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 20", Type: []string{"integer"}, Format: "int64", }, }, "max-merge-region-keys": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 200000", + Type: []string{"integer"}, + Format: "int64", }, }, "split-merge-interval": { SchemaProps: spec.SchemaProps{ - Description: "SplitMergeInterval is the minimum interval time to permit merge after split.", + Description: "SplitMergeInterval is the minimum interval time to permit merge after split. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 1h", Type: []string{"string"}, Format: "", }, }, "patrol-region-interval": { SchemaProps: spec.SchemaProps{ - Description: "PatrolRegionInterval is the interval for scanning region during patrol.", + Description: "PatrolRegionInterval is the interval for scanning region during patrol. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "max-store-down-time": { SchemaProps: spec.SchemaProps{ - Description: "MaxStoreDownTime is the max duration after which a store will be considered to be down if it hasn't reported heartbeats.", + Description: "MaxStoreDownTime is the max duration after which a store will be considered to be down if it hasn't reported heartbeats. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 30m", Type: []string{"string"}, Format: "", }, }, "leader-schedule-limit": { SchemaProps: spec.SchemaProps{ - Description: "LeaderScheduleLimit is the max coexist leader schedules.", + Description: "LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 4", Type: []string{"integer"}, Format: "int64", }, }, "region-schedule-limit": { SchemaProps: spec.SchemaProps{ - Description: "RegionScheduleLimit is the max coexist region schedules.", + Description: "RegionScheduleLimit is the max coexist region schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 2048", Type: []string{"integer"}, Format: "int64", }, }, "replica-schedule-limit": { SchemaProps: spec.SchemaProps{ - Description: "ReplicaScheduleLimit is the max coexist replica schedules.", + Description: "ReplicaScheduleLimit is the max coexist replica schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 64", Type: []string{"integer"}, Format: "int64", }, }, "merge-schedule-limit": { SchemaProps: spec.SchemaProps{ - Description: "MergeScheduleLimit is the max coexist merge schedules.", + Description: "MergeScheduleLimit is the max coexist merge schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 8", Type: []string{"integer"}, Format: "int64", }, }, "hot-region-schedule-limit": { SchemaProps: spec.SchemaProps{ - Description: "HotRegionScheduleLimit is the max coexist hot region schedules.", + Description: "HotRegionScheduleLimit is the max coexist hot region schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 4", Type: []string{"integer"}, Format: "int64", }, }, "hot-region-cache-hits-threshold": { SchemaProps: spec.SchemaProps{ - Description: "HotRegionCacheHitThreshold is the cache hits threshold of the hot region. If the number of times a region hits the hot cache is greater than this threshold, it is considered a hot region.", + Description: "HotRegionCacheHitThreshold is the cache hits threshold of the hot region. If the number of times a region hits the hot cache is greater than this threshold, it is considered a hot region. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"integer"}, Format: "int64", }, }, "tolerant-size-ratio": { SchemaProps: spec.SchemaProps{ - Description: "TolerantSizeRatio is the ratio of buffer size for balance scheduler.", + Description: "TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"number"}, Format: "double", }, }, "low-space-ratio": { SchemaProps: spec.SchemaProps{ - Description: "\n high space stage transition stage low space stage\n |--------------------|-----------------------------|-------------------------|\n ^ ^ ^ ^\n 0 HighSpaceRatio * capacity LowSpaceRatio * capacity capacity\n\nLowSpaceRatio is the lowest usage ratio of store which regraded as low space. When in low space, store region score increases to very large and varies inversely with available size.", + Description: "\n high space stage transition stage low space stage\n |--------------------|-----------------------------|-------------------------|\n ^ ^ ^ ^\n 0 HighSpaceRatio * capacity LowSpaceRatio * capacity capacity\n\nLowSpaceRatio is the lowest usage ratio of store which regraded as low space. When in low space, store region score increases to very large and varies inversely with available size. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"number"}, Format: "double", }, }, "high-space-ratio": { SchemaProps: spec.SchemaProps{ - Description: "HighSpaceRatio is the highest usage ratio of store which regraded as high space. High space means there is a lot of spare capacity, and store region score varies directly with used size.", + Description: "HighSpaceRatio is the highest usage ratio of store which regraded as high space. High space means there is a lot of spare capacity, and store region score varies directly with used size. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"number"}, Format: "double", }, }, "disable-raft-learner": { SchemaProps: spec.SchemaProps{ - Description: "DisableLearner is the option to disable using AddLearnerNode instead of AddNode", + Description: "DisableLearner is the option to disable using AddLearnerNode instead of AddNode Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "disable-remove-down-replica": { SchemaProps: spec.SchemaProps{ - Description: "DisableRemoveDownReplica is the option to prevent replica checker from removing down replicas.", + Description: "DisableRemoveDownReplica is the option to prevent replica checker from removing down replicas. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "disable-replace-offline-replica": { SchemaProps: spec.SchemaProps{ - Description: "DisableReplaceOfflineReplica is the option to prevent replica checker from repalcing offline replicas.", + Description: "DisableReplaceOfflineReplica is the option to prevent replica checker from repalcing offline replicas. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "disable-make-up-replica": { SchemaProps: spec.SchemaProps{ - Description: "DisableMakeUpReplica is the option to prevent replica checker from making up replicas when replica count is less than expected.", + Description: "DisableMakeUpReplica is the option to prevent replica checker from making up replicas when replica count is less than expected. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "disable-remove-extra-replica": { SchemaProps: spec.SchemaProps{ - Description: "DisableRemoveExtraReplica is the option to prevent replica checker from removing extra replicas.", + Description: "DisableRemoveExtraReplica is the option to prevent replica checker from removing extra replicas. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "disable-location-replacement": { SchemaProps: spec.SchemaProps{ - Description: "DisableLocationReplacement is the option to prevent replica checker from moving replica to a better location.", + Description: "DisableLocationReplacement is the option to prevent replica checker from moving replica to a better location. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "disable-namespace-relocation": { SchemaProps: spec.SchemaProps{ - Description: "DisableNamespaceRelocation is the option to prevent namespace checker from moving replica to the target namespace.", + Description: "DisableNamespaceRelocation is the option to prevent namespace checker from moving replica to the target namespace. Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"string"}, Format: "", }, }, "schedulers-v2": { SchemaProps: spec.SchemaProps{ - Description: "Schedulers support for loding customized schedulers", + Description: "Schedulers support for loding customized schedulers Immutable, change should be made through pd-ctl after cluster creation", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -1815,13 +1760,15 @@ func schema_pkg_apis_pingcap_v1alpha1_PDSchedulerConfig(ref common.ReferenceCall Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Immutable, change should be made through pd-ctl after cluster creation", + Type: []string{"string"}, + Format: "", }, }, "args": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "Immutable, change should be made through pd-ctl after cluster creation", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -1834,8 +1781,9 @@ func schema_pkg_apis_pingcap_v1alpha1_PDSchedulerConfig(ref common.ReferenceCall }, "disable": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Immutable, change should be made through pd-ctl after cluster creation", + Type: []string{"boolean"}, + Format: "", }, }, }, @@ -2006,80 +1954,93 @@ func schema_pkg_apis_pingcap_v1alpha1_Performance(ref common.ReferenceCallback) }, "max-memory": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 0", + Type: []string{"integer"}, + Format: "int64", }, }, "tcp-keep-alive": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "cross-join": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "stats-lease": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 3s", + Type: []string{"string"}, + Format: "", }, }, "run-auto-analyze": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "stmt-count-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 5000", + Type: []string{"integer"}, + Format: "int32", }, }, "feedback-probability": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Description: "Optional: Defaults to 0.05", + Type: []string{"number"}, + Format: "double", }, }, "query-feedback-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 1024", + Type: []string{"integer"}, + Format: "int32", }, }, "pseudo-estimate-ratio": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Description: "Optional: Defaults to 0.8", + Type: []string{"number"}, + Format: "double", }, }, "force-priority": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to NO_PRIORITY", + Type: []string{"string"}, + Format: "", }, }, "bind-info-lease": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 3s", + Type: []string{"string"}, + Format: "", }, }, "txn-entry-count-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 300000", + Type: []string{"integer"}, + Format: "int64", }, }, "txn-total-size-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 104857600", + Type: []string{"integer"}, + Format: "int64", }, }, }, @@ -2097,14 +2058,14 @@ func schema_pkg_apis_pingcap_v1alpha1_PessimisticTxn(ref common.ReferenceCallbac Properties: map[string]spec.Schema{ "enable": { SchemaProps: spec.SchemaProps{ - Description: "Enable must be true for 'begin lock' or session variable to start a pessimistic transaction.", + Description: "Enable must be true for 'begin lock' or session variable to start a pessimistic transaction. Optional: Defaults to true", Type: []string{"boolean"}, Format: "", }, }, "max-retry-count": { SchemaProps: spec.SchemaProps{ - Description: "The max count of retry for a single statement in a pessimistic transaction.", + Description: "The max count of retry for a single statement in a pessimistic transaction. Optional: Defaults to 256", Type: []string{"integer"}, Format: "int32", }, @@ -2180,20 +2141,23 @@ func schema_pkg_apis_pingcap_v1alpha1_PreparedPlanCache(ref common.ReferenceCall Properties: map[string]spec.Schema{ "enabled": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to false", + Type: []string{"boolean"}, + Format: "", }, }, "capacity": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 100", + Type: []string{"integer"}, + Format: "int32", }, }, "memory-guard-ratio": { SchemaProps: spec.SchemaProps{ - Type: []string{"number"}, - Format: "double", + Description: "Optional: Defaults to 0.1", + Type: []string{"number"}, + Format: "double", }, }, }, @@ -2211,7 +2175,7 @@ func schema_pkg_apis_pingcap_v1alpha1_ProxyProtocol(ref common.ReferenceCallback Properties: map[string]spec.Schema{ "networks": { SchemaProps: spec.SchemaProps{ - Description: "PROXY protocol acceptable client networks. Empty string means disable PROXY protocol, * means all networks.", + Description: "PROXY protocol acceptable client networks. Empty *string means disable PROXY protocol, * means all networks.", Type: []string{"string"}, Format: "", }, @@ -2629,20 +2593,9 @@ func schema_pkg_apis_pingcap_v1alpha1_Status(ref common.ReferenceCallback) commo Properties: map[string]spec.Schema{ "report-status": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "status-host": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "status-port": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "metrics-addr": { @@ -2653,14 +2606,16 @@ func schema_pkg_apis_pingcap_v1alpha1_Status(ref common.ReferenceCallback) commo }, "metrics-interval": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 15", + Type: []string{"integer"}, + Format: "int32", }, }, "record-db-qps": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to false", + Type: []string{"boolean"}, + Format: "", }, }, }, @@ -2678,14 +2633,14 @@ func schema_pkg_apis_pingcap_v1alpha1_StmtSummary(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "max-stmt-count": { SchemaProps: spec.SchemaProps{ - Description: "The maximum number of statements kept in memory.", + Description: "The maximum number of statements kept in memory. Optional: Defaults to 100", Type: []string{"integer"}, Format: "int32", }, }, "max-sql-length": { SchemaProps: spec.SchemaProps{ - Description: "The maximum length of displayed normalized SQL and sample SQL.", + Description: "The maximum length of displayed normalized SQL and sample SQL. Optional: Defaults to 4096", Type: []string{"integer"}, Format: "int32", }, @@ -2770,42 +2725,12 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c Description: "TiDBConfig is the configuration of tidb-server", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "host": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "advertise-address": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, "cors": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "store": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "socket": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -2814,50 +2739,58 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c }, "lease": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 45s", + Type: []string{"string"}, + Format: "", }, }, "run-ddl": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "split-table": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "token-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 1000", + Type: []string{"integer"}, + Format: "int32", }, }, "oom-action": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to log", + Type: []string{"string"}, + Format: "", }, }, "mem-quota-query": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 34359738368", + Type: []string{"integer"}, + Format: "int64", }, }, "enable-streaming": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to false", + Type: []string{"boolean"}, + Format: "", }, }, "enable-batch-dml": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to false", + Type: []string{"boolean"}, + Format: "", }, }, "txn-local-latches": { @@ -2934,26 +2867,30 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c }, "check-mb4-value-in-utf8": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "alter-primary-key": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to false", + Type: []string{"boolean"}, + Format: "", }, }, "treat-old-version-utf8-as-utf8mb4": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "split-region-max-num": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 1000", + Type: []string{"integer"}, + Format: "int64", }, }, "stmt-summary": { @@ -3167,8 +3104,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVBlockCacheConfig(ref common.ReferenceC Properties: map[string]spec.Schema{ "shared": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "capacity": { @@ -3238,7 +3176,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVCfConfig(ref common.ReferenceCallback) Format: "", }, }, - "PinL0FilterAndIndexBlocks": { + "pin-l0-filter-and-index-blocks": { SchemaProps: spec.SchemaProps{ Type: []string{"boolean"}, Format: "", @@ -3323,19 +3261,19 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVCfConfig(ref common.ReferenceCallback) Format: "", }, }, - "Level0FileNumCompactionTrigger": { + "level0-file-num-compaction-trigger": { SchemaProps: spec.SchemaProps{ Type: []string{"integer"}, Format: "int64", }, }, - "Level0SlowdownWritesTrigger": { + "level0-slowdown-writes-trigger": { SchemaProps: spec.SchemaProps{ Type: []string{"integer"}, Format: "int64", }, }, - "Level0StopWritesTrigger": { + "level0-stop-writes-trigger": { SchemaProps: spec.SchemaProps{ Type: []string{"integer"}, Format: "int64", @@ -3425,7 +3363,6 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVCfConfig(ref common.ReferenceCallback) }, }, }, - Required: []string{"PinL0FilterAndIndexBlocks", "Level0FileNumCompactionTrigger", "Level0SlowdownWritesTrigger", "Level0StopWritesTrigger"}, }, }, Dependencies: []string{ @@ -3442,77 +3379,77 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVClient(ref common.ReferenceCallback) c Properties: map[string]spec.Schema{ "grpc-connection-count": { SchemaProps: spec.SchemaProps{ - Description: "GrpcConnectionCount is the max gRPC connections that will be established with each tikv-server.", + Description: "GrpcConnectionCount is the max gRPC connections that will be established with each tikv-server. Optional: Defaults to 16", Type: []string{"integer"}, Format: "int32", }, }, "grpc-keepalive-time": { SchemaProps: spec.SchemaProps{ - Description: "After a duration of this time in seconds if the client doesn't see any activity it pings the server to see if the transport is still alive.", + Description: "After a duration of this time in seconds if the client doesn't see any activity it pings the server to see if the transport is still alive. Optional: Defaults to 10", Type: []string{"integer"}, Format: "int32", }, }, "grpc-keepalive-timeout": { SchemaProps: spec.SchemaProps{ - Description: "After having pinged for keepalive check, the client waits for a duration of Timeout in seconds and if no activity is seen even after that the connection is closed.", + Description: "After having pinged for keepalive check, the client waits for a duration of Timeout in seconds and if no activity is seen even after that the connection is closed. Optional: Defaults to 3", Type: []string{"integer"}, Format: "int32", }, }, "commit-timeout": { SchemaProps: spec.SchemaProps{ - Description: "CommitTimeout is the max time which command 'commit' will wait.", + Description: "CommitTimeout is the max time which command 'commit' will wait. Optional: Defaults to 41s", Type: []string{"string"}, Format: "", }, }, "max-txn-time-use": { SchemaProps: spec.SchemaProps{ - Description: "MaxTxnTimeUse is the max time a Txn may use (in seconds) from its startTS to commitTS.", + Description: "MaxTxnTimeUse is the max time a Txn may use (in seconds) from its startTS to commitTS. Optional: Defaults to 590", Type: []string{"integer"}, Format: "int32", }, }, "max-batch-size": { SchemaProps: spec.SchemaProps{ - Description: "MaxBatchSize is the max batch size when calling batch commands API.", + Description: "MaxBatchSize is the max batch size when calling batch commands API. Optional: Defaults to 128", Type: []string{"integer"}, Format: "int32", }, }, "overload-threshold": { SchemaProps: spec.SchemaProps{ - Description: "If TiKV load is greater than this, TiDB will wait for a while to avoid little batch.", + Description: "If TiKV load is greater than this, TiDB will wait for a while to avoid little batch. Optional: Defaults to 200", Type: []string{"integer"}, Format: "int32", }, }, "max-batch-wait-time": { SchemaProps: spec.SchemaProps{ - Description: "MaxBatchWaitTime in nanosecond is the max wait time for batch.", + Description: "MaxBatchWaitTime in nanosecond is the max wait time for batch. Optional: Defaults to 0", Type: []string{"integer"}, Format: "int64", }, }, "batch-wait-size": { SchemaProps: spec.SchemaProps{ - Description: "BatchWaitSize is the max wait size for batch.", + Description: "BatchWaitSize is the max wait size for batch. Optional: Defaults to 8", Type: []string{"integer"}, Format: "int32", }, }, "region-cache-ttl": { SchemaProps: spec.SchemaProps{ - Description: "If a Region has not been accessed for more than the given duration (in seconds), it will be reloaded from the PD.", + Description: "If a Region has not been accessed for more than the given duration (in seconds), it will be reloaded from the PD. Optional: Defaults to 600", Type: []string{"integer"}, Format: "int32", }, }, "store-limit": { SchemaProps: spec.SchemaProps{ - Description: "If a store has been up to the limit, it will return error for successive request to prevent the store occupying too much token in dispatching level.", + Description: "If a store has been up to the limit, it will return error for successive request to prevent the store occupying too much token in dispatching level. Optional: Defaults to 0", Type: []string{"integer"}, Format: "int64", }, @@ -3523,60 +3460,6 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVClient(ref common.ReferenceCallback) c } } -func schema_pkg_apis_pingcap_v1alpha1_TiKVComponentReadPoolConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "high_concurrency": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "normal_concurrency": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "low_concurrency": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "max_tasks_per_worker_high": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "max_tasks_per_worker_normal": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "max_tasks_per_worker_low": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "stack_size": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - func schema_pkg_apis_pingcap_v1alpha1_TiKVConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -3586,8 +3469,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVConfig(ref common.ReferenceCallback) c Properties: map[string]spec.Schema{ "log-level": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to info", + Type: []string{"string"}, + Format: "", }, }, "log-file": { @@ -3598,8 +3482,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVConfig(ref common.ReferenceCallback) c }, "log-rotation-timespan": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 24h", + Type: []string{"string"}, + Format: "", }, }, "panic-when-unexpected-key-or-data": { @@ -3653,6 +3538,11 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVConfig(ref common.ReferenceCallback) c Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVGCConfig"), }, }, + "pd": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVPDConfig"), + }, + }, "security": { SchemaProps: spec.SchemaProps{ Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSecurityConfig"), @@ -3662,7 +3552,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVConfig(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCoprocessorConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVDbConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVGCConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVImportConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftDBConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftstoreConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVReadPoolConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSecurityConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVServerConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStorageConfig"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCoprocessorConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVDbConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVGCConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVImportConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVPDConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftDBConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVRaftstoreConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVReadPoolConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVSecurityConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVServerConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStorageConfig"}, } } @@ -3675,7 +3565,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVCoprocessorConfig(ref common.Reference Properties: map[string]spec.Schema{ "split-region-on-table": { SchemaProps: spec.SchemaProps{ - Description: "When it is set to `true`, TiKV will try to split a Region with table prefix if that Region crosses tables. It is recommended to turn off this option if there will be a large number of tables created. optional", + Description: "When it is set to `true`, TiKV will try to split a Region with table prefix if that Region crosses tables. It is recommended to turn off this option if there will be a large number of tables created. Optional: Defaults to false optional", Type: []string{"boolean"}, Format: "", }, @@ -3689,32 +3579,93 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVCoprocessorConfig(ref common.Reference }, "region-max-size": { SchemaProps: spec.SchemaProps{ - Description: "When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a little larger). See also: region-split-size optional", + Description: "When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a little larger). See also: region-split-size Optional: Defaults to 144MB optional", Type: []string{"string"}, Format: "", }, }, "region-split-size": { SchemaProps: spec.SchemaProps{ - Description: "When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a little larger). See also: region-max-size optional", + Description: "When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a little larger). See also: region-max-size Optional: Defaults to 96MB optional", Type: []string{"string"}, Format: "", }, }, "region-max-keys": { SchemaProps: spec.SchemaProps{ - Description: "When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be `region_split_keys`. See also: region-split-keys optional", + Description: "When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be `region_split_keys`. See also: region-split-keys Optional: Defaults to 1440000 optional", Type: []string{"integer"}, Format: "int64", }, }, "region-split-keys": { SchemaProps: spec.SchemaProps{ - Description: "When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be `region_split_keys`. See also: region-max-keys optional", + Description: "When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be `region_split_keys`. See also: region-max-keys Optional: Defaults to 960000 optional", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_pingcap_v1alpha1_TiKVCoprocessorReadPoolConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "high_concurrency": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 8", Type: []string{"integer"}, Format: "int64", }, }, + "normal_concurrency": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 8", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "low_concurrency": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 8", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max_tasks_per_worker_high": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 2000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max_tasks_per_worker_normal": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 2000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max_tasks_per_worker_low": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 2000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "stack_size": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 10MB", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -3730,14 +3681,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVDbConfig(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "wal-recovery-mode": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", - }, - }, - "wal-dir": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 2", + Type: []string{"integer"}, + Format: "int64", }, }, "wal-ttl-seconds": { @@ -3754,50 +3700,58 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVDbConfig(ref common.ReferenceCallback) }, "max-total-wal-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 4GB", + Type: []string{"string"}, + Format: "", }, }, "max-background-jobs": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 8", + Type: []string{"integer"}, + Format: "int64", }, }, "max-manifest-file-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 128MB", + Type: []string{"string"}, + Format: "", }, }, "create-if-missing": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "max-open-files": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 40960", + Type: []string{"integer"}, + Format: "int64", }, }, "enable-statistics": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Description: "Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", }, }, "stats-dump-period": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 10m", + Type: []string{"string"}, + Format: "", }, }, "compaction-readahead-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 0", + Type: []string{"string"}, + Format: "", }, }, "info-log-max-size": { @@ -3856,8 +3810,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVDbConfig(ref common.ReferenceCallback) }, "max-sub-compactions": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 3", + Type: []string{"integer"}, + Format: "int64", }, }, "writable-file-max-buffer-size": { @@ -3919,8 +3874,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVGCConfig(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ " batch_keys": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 512", + Type: []string{"integer"}, + Format: "int64", }, }, " max_write_bytes_per_sec": { @@ -4023,21 +3979,21 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVPDConfig(ref common.ReferenceCallback) }, "retry_interval": { SchemaProps: spec.SchemaProps{ - Description: "The interval at which to retry a PD connection initialization.\n\nDefault is 300ms.", + Description: "The interval at which to retry a PD connection initialization.\n\nDefault is 300ms. Optional: Defaults to 300ms", Type: []string{"string"}, Format: "", }, }, "retry_max_count": { SchemaProps: spec.SchemaProps{ - Description: "The maximum number of times to retry a PD connection initialization.\n\nDefault is isize::MAX, represented by -1.", + Description: "The maximum number of times to retry a PD connection initialization.\n\nDefault is isize::MAX, represented by -1. Optional: Defaults to -1", Type: []string{"integer"}, Format: "int64", }, }, "retry_log_every": { SchemaProps: spec.SchemaProps{ - Description: "If the client observes the same error message on retry, it can repeat the message only every `n` times.\n\nDefault is 10. Set to 1 to disable this feature.", + Description: "If the client observes the same error message on retry, it can repeat the message only every `n` times.\n\nDefault is 10. Set to 1 to disable this feature. Optional: Defaults to 10", Type: []string{"integer"}, Format: "int64", }, @@ -4214,7 +4170,14 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa Properties: map[string]spec.Schema{ "sync-log": { SchemaProps: spec.SchemaProps{ - Description: "true for high reliability, prevent data loss when power failure.", + Description: "true for high reliability, prevent data loss when power failure. Optional: Defaults to true", + Type: []string{"boolean"}, + Format: "", + }, + }, + "prevote": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to true", Type: []string{"boolean"}, Format: "", }, @@ -4240,35 +4203,35 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "raft-entry-max-size": { SchemaProps: spec.SchemaProps{ - Description: "When the entry exceed the max size, reject to propose it.", + Description: "When the entry exceed the max size, reject to propose it. Optional: Defaults to 8MB", Type: []string{"string"}, Format: "", }, }, "raft-log-gc-tick-interval": { SchemaProps: spec.SchemaProps{ - Description: "Interval to gc unnecessary raft log (ms).", + Description: "Interval to gc unnecessary raft log (ms). Optional: Defaults to 10s", Type: []string{"string"}, Format: "", }, }, "raft-log-gc-threshold": { SchemaProps: spec.SchemaProps{ - Description: "A threshold to gc stale raft log, must >= 1.", + Description: "A threshold to gc stale raft log, must >= 1. Optional: Defaults to 50", Type: []string{"integer"}, Format: "int64", }, }, "raft-log-gc-count-limit": { SchemaProps: spec.SchemaProps{ - Description: "When entry count exceed this value, gc will be forced trigger.", + Description: "When entry count exceed this value, gc will be forced trigger. Optional: Defaults to 72000", Type: []string{"integer"}, Format: "int64", }, }, "raft-log-gc-size-limit": { SchemaProps: spec.SchemaProps{ - Description: "When the approximate size of raft log entries exceed this value gc will be forced trigger.", + Description: "When the approximate size of raft log entries exceed this value gc will be forced trigger. Optional: Defaults to 72MB", Type: []string{"string"}, Format: "", }, @@ -4289,63 +4252,65 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "split-region-check-tick-interval": { SchemaProps: spec.SchemaProps{ - Description: "Interval (ms) to check region whether need to be split or not.", + Description: "Interval (ms) to check region whether need to be split or not. Optional: Defaults to 10s", Type: []string{"string"}, Format: "", }, }, "region-split-check-diff": { SchemaProps: spec.SchemaProps{ - Description: "/ When size change of region exceed the diff since last check, it / will be checked again whether it should be split.", + Description: "/ When size change of region exceed the diff since last check, it / will be checked again whether it should be split. Optional: Defaults to 6MB", Type: []string{"string"}, Format: "", }, }, "region-compact-check-interval": { SchemaProps: spec.SchemaProps{ - Description: "/ Interval (ms) to check whether start compaction for a region.", + Description: "/ Interval (ms) to check whether start compaction for a region. Optional: Defaults to 5m", Type: []string{"string"}, Format: "", }, }, "clean-stale-peer-delay": { SchemaProps: spec.SchemaProps{ - Description: "delay time before deleting a stale peer", + Description: "delay time before deleting a stale peer Optional: Defaults to 10m", Type: []string{"string"}, Format: "", }, }, "region-compact-check-step": { SchemaProps: spec.SchemaProps{ - Description: "/ Number of regions for each time checking.", + Description: "/ Number of regions for each time checking. Optional: Defaults to 100", Type: []string{"integer"}, Format: "int64", }, }, "region-compact-min-tombstones": { SchemaProps: spec.SchemaProps{ - Description: "/ Minimum number of tombstones to trigger manual compaction.", + Description: "/ Minimum number of tombstones to trigger manual compaction. Optional: Defaults to 10000", Type: []string{"integer"}, Format: "int64", }, }, "region-compact-tombstones-percent": { SchemaProps: spec.SchemaProps{ - Description: "/ Minimum percentage of tombstones to trigger manual compaction. / Should between 1 and 100.", + Description: "/ Minimum percentage of tombstones to trigger manual compaction. / Should between 1 and 100. Optional: Defaults to 30", Type: []string{"integer"}, Format: "int64", }, }, "pd-heartbeat-tick-interval": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 60s", + Type: []string{"string"}, + Format: "", }, }, "pd-store-heartbeat-tick-interval": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 10s", + Type: []string{"string"}, + Format: "", }, }, "snap-mgr-gc-tick-interval": { @@ -4362,14 +4327,16 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "lock-cf-compact-interval": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 10m", + Type: []string{"string"}, + Format: "", }, }, "lock-cf-compact-bytes-threshold": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 256MB", + Type: []string{"string"}, + Format: "", }, }, "notify-capacity": { @@ -4386,7 +4353,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "max-peer-down-duration": { SchemaProps: spec.SchemaProps{ - Description: "/ When a peer is not active for max-peer-down-duration / the peer is considered to be down and is reported to PD.", + Description: "/ When a peer is not active for max-peer-down-duration / the peer is considered to be down and is reported to PD. Optional: Defaults to 5m", Type: []string{"string"}, Format: "", }, @@ -4425,7 +4392,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "consistency-check-interval": { SchemaProps: spec.SchemaProps{ - Description: "Interval (ms) to check region whether the data is consistent.", + Description: "Interval (ms) to check region whether the data is consistent. Optional: Defaults to 0", Type: []string{"string"}, Format: "", }, @@ -4478,8 +4445,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "cleanup-import-sst-interval": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 10m", + Type: []string{"string"}, + Format: "", }, }, "apply-max-batch-size": { @@ -4490,8 +4458,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "apply-pool-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 2", + Type: []string{"integer"}, + Format: "int64", }, }, "store-max-batch-size": { @@ -4502,8 +4471,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVRaftstoreConfig(ref common.ReferenceCa }, "store-pool-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 2", + Type: []string{"integer"}, + Format: "int64", }, }, "hibernate-regions": { @@ -4526,19 +4496,19 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVReadPoolConfig(ref common.ReferenceCal Properties: map[string]spec.Schema{ "coprocessor": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVComponentReadPoolConfig"), + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCoprocessorReadPoolConfig"), }, }, "storage": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVComponentReadPoolConfig"), + Ref: ref("github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStorageReadPoolConfig"), }, }, }, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVComponentReadPoolConfig"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVCoprocessorReadPoolConfig", "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.TiKVStorageReadPoolConfig"}, } } @@ -4591,88 +4561,88 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVServerConfig(ref common.ReferenceCallb Description: "TiKVServerConfig is the configuration of TiKV server.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "addr": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "advertise-addr": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "status-addr": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "status-thread-pool-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 1", + Type: []string{"string"}, + Format: "", }, }, "grpc-compression-type": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to none", + Type: []string{"string"}, + Format: "", }, }, "grpc-concurrency": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 4", + Type: []string{"integer"}, + Format: "int32", }, }, "grpc-concurrent-stream": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 1024", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "grpc_memory_pool_quota": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 32G", + Type: []string{"string"}, + Format: "", }, }, "grpc-raft-conn-num": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 10", + Type: []string{"integer"}, + Format: "int32", }, }, "grpc-stream-initial-window-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 2MB", + Type: []string{"string"}, + Format: "", }, }, "grpc-keepalive-time": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 10s", + Type: []string{"string"}, + Format: "", }, }, "grpc-keepalive-timeout": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 3s", + Type: []string{"string"}, + Format: "", }, }, "concurrent-send-snap-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 32", + Type: []string{"integer"}, + Format: "int32", }, }, "concurrent-recv-snap-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 32", + Type: []string{"integer"}, + Format: "int32", }, }, "end-point-recursion-limit": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Optional: Defaults to 1000", + Type: []string{"integer"}, + Format: "int32", }, }, "end-point-stream-channel-size": { @@ -4707,8 +4677,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVServerConfig(ref common.ReferenceCallb }, "snap-max-write-bytes-per-sec": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 100MB", + Type: []string{"string"}, + Format: "", }, }, "snap-max-total-size": { @@ -4731,8 +4702,9 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVServerConfig(ref common.ReferenceCallb }, "heavy-load-wait-duration": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 60s", + Type: []string{"string"}, + Format: "", }, }, "labels": { @@ -4842,12 +4814,6 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVStorageConfig(ref common.ReferenceCall Description: "TiKVStorageConfig is the config of storage", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "data-dir": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, "max-key-size": { SchemaProps: spec.SchemaProps{ Type: []string{"integer"}, @@ -4862,20 +4828,23 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVStorageConfig(ref common.ReferenceCall }, "scheduler-concurrency": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 2048000", + Type: []string{"integer"}, + Format: "int64", }, }, "scheduler-worker-pool-size": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Optional: Defaults to 4", + Type: []string{"integer"}, + Format: "int64", }, }, "scheduler-pending-write-threshold": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Optional: Defaults to 100MB", + Type: []string{"string"}, + Format: "", }, }, "block-cache": { @@ -4891,6 +4860,67 @@ func schema_pkg_apis_pingcap_v1alpha1_TiKVStorageConfig(ref common.ReferenceCall } } +func schema_pkg_apis_pingcap_v1alpha1_TiKVStorageReadPoolConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "high_concurrency": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 4", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "normal_concurrency": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 4", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "low_concurrency": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 4", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max_tasks_per_worker_high": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 2000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max_tasks_per_worker_normal": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 2000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "max_tasks_per_worker_low": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 2000", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "stack_size": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 10MB", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_pkg_apis_pingcap_v1alpha1_TiKVTitanCfConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/pkg/apis/pingcap/v1alpha1/pd_config.go b/pkg/apis/pingcap/v1alpha1/pd_config.go index 8006218f9a..38e2299dba 100644 --- a/pkg/apis/pingcap/v1alpha1/pd_config.go +++ b/pkg/apis/pingcap/v1alpha1/pd_config.go @@ -33,42 +33,18 @@ import ( // PDConfig is the configuration of pd-server // +k8s:openapi-gen=true type PDConfig struct { - // +optional - Version *bool `json:"-"` - // +optional - ConfigCheck *bool `json:"-"` - // +optional - ClientUrls string `toml:"client-urls,omitempty" json:"client-urls,omitempty"` - // +optional - PeerUrls string `toml:"peer-urls,omitempty" json:"peer-urls,omitempty"` - // +optional - AdvertiseClientUrls string `toml:"advertise-client-urls,omitempty" json:"advertise-client-urls,omitempty"` - // +optional - AdvertisePeerUrls string `toml:"advertise-peer-urls,omitempty" json:"advertise-peer-urls,omitempty"` - - // +optional - Name string `toml:"name,omitempty" json:"name,omitempty"` - // +optional - DataDir string `toml:"data-dir,omitempty" json:"data-dir,omitempty"` // +optional ForceNewCluster *bool `json:"force-new-cluster,omitempty"` + // Optional: Defaults to true // +optional EnableGRPCGateway *bool `json:"enable-grpc-gateway,omitempty"` - // +optional - InitialCluster string `toml:"initial-cluster,omitempty" json:"initial-cluster,omitempty"` - // +optional - InitialClusterState string `toml:"initial-cluster-state,omitempty" json:"initial-cluster-state,omitempty"` - - // Join to an existing pd cluster, a string of endpoints. - // +optional - Join string `toml:"join,omitempty" json:"join,omitempty"` - // LeaderLease time, if leader doesn't update its TTL // in etcd after lease time, etcd will expire the leader key // and other servers can campaign the leader again. // Etcd only supports seconds TTL, so here is second too. + // Optional: Defaults to 3 // +optional LeaderLease *int64 `toml:"lease,omitempty" json:"lease,omitempty"` @@ -83,15 +59,18 @@ type PDConfig struct { LogLevelDeprecated string `toml:"log-level,omitempty" json:"log-level,omitempty"` // TsoSaveInterval is the interval to save timestamp. + // Optional: Defaults to 3s // +optional TsoSaveInterval string `toml:"tso-save-interval,omitempty" json:"tso-save-interval,omitempty"` // +optional Metric *PDMetricConfig `toml:"metric,omitempty" json:"metric,omitempty"` + // Immutable, change should be made through pd-ctl after cluster creation // +optional Schedule *PDScheduleConfig `toml:"schedule,omitempty" json:"schedule,omitempty"` + // Immutable, change should be made through pd-ctl after cluster creation // +optional Replication *PDReplicationConfig `toml:"replication,omitempty" json:"replication,omitempty"` @@ -130,6 +109,7 @@ type PDConfig struct { // If enabled, Raft runs an additional election phase // to check whether it would get enough votes to win // an election, thus minimizing disruptions. + // Optional: Defaults to true // +optional PreVote *bool `toml:"enable-prevote,omitempty" json:"enable-prevote,omitempty"` @@ -141,6 +121,7 @@ type PDConfig struct { // NamespaceClassifier is for classifying stores/regions into different // namespaces. + // Optional: Defaults to true // +optional NamespaceClassifier string `toml:"namespace-classifier,omitempty" json:"namespace-classifier,omitempty"` } @@ -149,6 +130,7 @@ type PDConfig struct { // +k8s:openapi-gen=true type PDLogConfig struct { // Log level. + // Optional: Defaults to info // +optional Level string `toml:"level,omitempty" json:"level,omitempty"` // Log format. one of json, text, or console. @@ -183,6 +165,8 @@ type PDLogConfig struct { // +k8s:openapi-gen=true type PDReplicationConfig struct { // MaxReplicas is the number of replicas for each region. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 3 // +optional MaxReplicas *uint64 `toml:"max-replicas,omitempty" json:"max-replicas,omitempty"` @@ -190,9 +174,11 @@ type PDReplicationConfig struct { // The placement priorities is implied by the order of label keys. // For example, ["zone", "rack"] means that we should place replicas to // different zones first, then to different racks if we don't have enough zones. + // Immutable, change should be made through pd-ctl after cluster creation // +optional LocationLabels StringSlice `toml:"location-labels,omitempty" json:"location-labels,omitempty"` // StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. + // Immutable, change should be made through pd-ctl after cluster creation // +optional StrictlyMatchLabel *bool `toml:"strictly-match-label,omitempty" json:"strictly-match-label,string,omitempty"` } @@ -225,48 +211,73 @@ type PDNamespaceConfig struct { type PDScheduleConfig struct { // If the snapshot count of one store is greater than this value, // it will never be used as a source or target store. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 3 // +optional MaxSnapshotCount *uint64 `toml:"max-snapshot-count,omitempty" json:"max-snapshot-count,omitempty"` + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 16 // +optional MaxPendingPeerCount *uint64 `toml:"max-pending-peer-count,omitempty" json:"max-pending-peer-count,omitempty"` // If both the size of region is smaller than MaxMergeRegionSize // and the number of rows in region is smaller than MaxMergeRegionKeys, // it will try to merge with adjacent regions. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 20 // +optional MaxMergeRegionSize *uint64 `toml:"max-merge-region-size,omitempty" json:"max-merge-region-size,omitempty"` + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 200000 // +optional MaxMergeRegionKeys *uint64 `toml:"max-merge-region-keys,omitempty" json:"max-merge-region-keys,omitempty"` // SplitMergeInterval is the minimum interval time to permit merge after split. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 1h // +optional SplitMergeInterval string `toml:"split-merge-interval,omitempty" json:"split-merge-interval,omitempty"` // PatrolRegionInterval is the interval for scanning region during patrol. + // Immutable, change should be made through pd-ctl after cluster creation // +optional PatrolRegionInterval string `toml:"patrol-region-interval,omitempty" json:"patrol-region-interval,omitempty"` // MaxStoreDownTime is the max duration after which // a store will be considered to be down if it hasn't reported heartbeats. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 30m // +optional MaxStoreDownTime string `toml:"max-store-down-time,omitempty" json:"max-store-down-time,omitempty"` // LeaderScheduleLimit is the max coexist leader schedules. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 4 // +optional LeaderScheduleLimit *uint64 `toml:"leader-schedule-limit,omitempty" json:"leader-schedule-limit,omitempty"` // RegionScheduleLimit is the max coexist region schedules. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 2048 // +optional RegionScheduleLimit *uint64 `toml:"region-schedule-limit,omitempty" json:"region-schedule-limit,omitempty"` // ReplicaScheduleLimit is the max coexist replica schedules. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 64 // +optional ReplicaScheduleLimit *uint64 `toml:"replica-schedule-limit,omitempty" json:"replica-schedule-limit,omitempty"` // MergeScheduleLimit is the max coexist merge schedules. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 8 // +optional MergeScheduleLimit *uint64 `toml:"merge-schedule-limit,omitempty" json:"merge-schedule-limit,omitempty"` // HotRegionScheduleLimit is the max coexist hot region schedules. + // Immutable, change should be made through pd-ctl after cluster creation + // Optional: Defaults to 4 // +optional HotRegionScheduleLimit *uint64 `toml:"hot-region-schedule-limit,omitempty" json:"hot-region-schedule-limit,omitempty"` // HotRegionCacheHitThreshold is the cache hits threshold of the hot region. // If the number of times a region hits the hot cache is greater than this // threshold, it is considered a hot region. + // Immutable, change should be made through pd-ctl after cluster creation // +optional HotRegionCacheHitsThreshold *uint64 `toml:"hot-region-cache-hits-threshold,omitempty" json:"hot-region-cache-hits-threshold,omitempty"` // TolerantSizeRatio is the ratio of buffer size for balance scheduler. + // Immutable, change should be made through pd-ctl after cluster creation // +optional TolerantSizeRatio *float64 `toml:"tolerant-size-ratio,omitempty" json:"tolerant-size-ratio,omitempty"` // @@ -277,42 +288,52 @@ type PDScheduleConfig struct { // // LowSpaceRatio is the lowest usage ratio of store which regraded as low space. // When in low space, store region score increases to very large and varies inversely with available size. + // Immutable, change should be made through pd-ctl after cluster creation // +optional LowSpaceRatio *float64 `toml:"low-space-ratio,omitempty" json:"low-space-ratio,omitempty"` // HighSpaceRatio is the highest usage ratio of store which regraded as high space. // High space means there is a lot of spare capacity, and store region score varies directly with used size. + // Immutable, change should be made through pd-ctl after cluster creation // +optional HighSpaceRatio *float64 `toml:"high-space-ratio,omitempty" json:"high-space-ratio,omitempty"` // DisableLearner is the option to disable using AddLearnerNode instead of AddNode + // Immutable, change should be made through pd-ctl after cluster creation // +optional DisableLearner *bool `toml:"disable-raft-learner,omitempty" json:"disable-raft-learner,string,omitempty"` // DisableRemoveDownReplica is the option to prevent replica checker from // removing down replicas. + // Immutable, change should be made through pd-ctl after cluster creation // +optional DisableRemoveDownReplica *bool `toml:"disable-remove-down-replica,omitempty" json:"disable-remove-down-replica,string,omitempty"` // DisableReplaceOfflineReplica is the option to prevent replica checker from // repalcing offline replicas. + // Immutable, change should be made through pd-ctl after cluster creation // +optional DisableReplaceOfflineReplica *bool `toml:"disable-replace-offline-replica,omitempty" json:"disable-replace-offline-replica,string,omitempty"` // DisableMakeUpReplica is the option to prevent replica checker from making up // replicas when replica count is less than expected. + // Immutable, change should be made through pd-ctl after cluster creation // +optional DisableMakeUpReplica *bool `toml:"disable-make-up-replica,omitempty" json:"disable-make-up-replica,string,omitempty"` // DisableRemoveExtraReplica is the option to prevent replica checker from // removing extra replicas. + // Immutable, change should be made through pd-ctl after cluster creation // +optional DisableRemoveExtraReplica *bool `toml:"disable-remove-extra-replica,omitempty" json:"disable-remove-extra-replica,string,omitempty"` // DisableLocationReplacement is the option to prevent replica checker from // moving replica to a better location. + // Immutable, change should be made through pd-ctl after cluster creation // +optional DisableLocationReplacement *bool `toml:"disable-location-replacement,omitempty" json:"disable-location-replacement,string,omitempty"` // DisableNamespaceRelocation is the option to prevent namespace checker // from moving replica to the target namespace. + // Immutable, change should be made through pd-ctl after cluster creation // +optional DisableNamespaceRelocation *bool `toml:"disable-namespace-relocation,omitempty" json:"disable-namespace-relocation,string,omitempty"` // Schedulers support for loding customized schedulers + // Immutable, change should be made through pd-ctl after cluster creation // +optional Schedulers *PDSchedulerConfigs `toml:"schedulers,omitempty" json:"schedulers-v2,omitempty"` // json v2 is for the sake of compatible upgrade } @@ -322,10 +343,13 @@ type PDSchedulerConfigs []PDSchedulerConfig // PDSchedulerConfig is customized scheduler configuration // +k8s:openapi-gen=true type PDSchedulerConfig struct { + // Immutable, change should be made through pd-ctl after cluster creation // +optional Type string `toml:"type,omitempty" json:"type,omitempty"` + // Immutable, change should be made through pd-ctl after cluster creation // +optional Args []string `toml:"args,omitempty" json:"args,omitempty"` + // Immutable, change should be made through pd-ctl after cluster creation // +optional Disable *bool `toml:"disable,omitempty" json:"disable,omitempty"` } @@ -367,9 +391,12 @@ type PDServerConfig struct { // +k8s:openapi-gen=true type PDMetricConfig struct { - PushJob string `toml:"job,omitempty" json:"job,omitempty"` - PushAddress string `toml:"address,omitempty" json:"address,omitempty"` - PushInterval string `toml:"interval,omitempty" json:"interval,omitempty"` + // +optional + PushJob *string `toml:"job,omitempty" json:"job,omitempty"` + // +optional + PushAddress *string `toml:"address,omitempty" json:"address,omitempty"` + // +optional + PushInterval *string `toml:"interval,omitempty" json:"interval,omitempty"` } // +k8s:openapi-gen=true diff --git a/pkg/apis/pingcap/v1alpha1/tidb_config.go b/pkg/apis/pingcap/v1alpha1/tidb_config.go index c6fcb6fd73..b10467f6ae 100644 --- a/pkg/apis/pingcap/v1alpha1/tidb_config.go +++ b/pkg/apis/pingcap/v1alpha1/tidb_config.go @@ -34,36 +34,33 @@ import ( // +k8s:openapi-gen=true type TiDBConfig struct { // +optional - // +kubebuilder:default="0.0.0.0" - Host string `toml:"host,omitempty" json:"host,omitempty"` + Cors *string `toml:"cors,omitempty" json:"cors,omitempty"` // +optional - AdvertiseAddress string `toml:"advertise-address,omitempty" json:"advertise-address,omitempty"` + Socket *string `toml:"socket,omitempty" json:"socket,omitempty"` + // Optional: Defaults to 45s // +optional - Port *uint `toml:"port,omitempty" json:"port,omitempty"` + Lease *string `toml:"lease,omitempty" json:"lease,omitempty"` + // Optional: Defaults to true // +optional - Cors string `toml:"cors,omitempty" json:"cors,omitempty"` + RunDDL *bool `toml:"run-ddl,omitempty" json:"run-ddl,omitempty"` + // Optional: Defaults to true // +optional - Store string `toml:"store,omitempty" json:"store,omitempty"` - // +optional - Path string `toml:"path,omitempty" json:"path,omitempty"` - // +optional - Socket string `toml:"socket,omitempty" json:"socket,omitempty"` - // +optional - Lease string `toml:"lease,omitempty" json:"lease,omitempty"` - // +optional - RunDDL bool `toml:"run-ddl,omitempty" json:"run-ddl,omitempty"` - // +optional - SplitTable bool `toml:"split-table,omitempty" json:"split-table,omitempty"` + SplitTable *bool `toml:"split-table,omitempty" json:"split-table,omitempty"` + // Optional: Defaults to 1000 // +optional TokenLimit *uint `toml:"token-limit,omitempty" json:"token-limit,omitempty"` + // Optional: Defaults to log // +optional - OOMAction string `toml:"oom-action,omitempty" json:"oom-action,omitempty"` + OOMAction *string `toml:"oom-action,omitempty" json:"oom-action,omitempty"` + // Optional: Defaults to 34359738368 // +optional MemQuotaQuery *int64 `toml:"mem-quota-query,omitempty" json:"mem-quota-query,omitempty"` + // Optional: Defaults to false // +optional - EnableStreaming bool `toml:"enable-streaming,omitempty" json:"enable-streaming,omitempty"` + EnableStreaming *bool `toml:"enable-streaming,omitempty" json:"enable-streaming,omitempty"` + // Optional: Defaults to false // +optional - EnableBatchDML bool `toml:"enable-batch-dml,omitempty" json:"enable-batch-dml,omitempty"` + EnableBatchDML *bool `toml:"enable-batch-dml,omitempty" json:"enable-batch-dml,omitempty"` // +optional TxnLocalLatches *TxnLocalLatches `toml:"txn-local-latches,omitempty" json:"txn-local-latches,omitempty"` // +optional @@ -87,17 +84,21 @@ type TiDBConfig struct { // +optional Binlog *Binlog `toml:"binlog,omitempty" json:"binlog,omitempty"` // +optional - CompatibleKillQuery bool `toml:"compatible-kill-query,omitempty" json:"compatible-kill-query,omitempty"` + CompatibleKillQuery *bool `toml:"compatible-kill-query,omitempty" json:"compatible-kill-query,omitempty"` // +optional Plugin *Plugin `toml:"plugin,omitempty" json:"plugin,omitempty"` // +optional PessimisticTxn *PessimisticTxn `toml:"pessimistic-txn,omitempty" json:"pessimistic-txn,omitempty"` + // Optional: Defaults to true // +optional - CheckMb4ValueInUTF8 bool `toml:"check-mb4-value-in-utf8,omitempty" json:"check-mb4-value-in-utf8,omitempty"` + CheckMb4ValueInUTF8 *bool `toml:"check-mb4-value-in-utf8,omitempty" json:"check-mb4-value-in-utf8,omitempty"` + // Optional: Defaults to false // +optional - AlterPrimaryKey bool `toml:"alter-primary-key,omitempty" json:"alter-primary-key,omitempty"` + AlterPrimaryKey *bool `toml:"alter-primary-key,omitempty" json:"alter-primary-key,omitempty"` + // Optional: Defaults to true // +optional - TreatOldVersionUTF8AsUTF8MB4 bool `toml:"treat-old-version-utf8-as-utf8mb4,omitempty" json:"treat-old-version-utf8-as-utf8mb4,omitempty"` + TreatOldVersionUTF8AsUTF8MB4 *bool `toml:"treat-old-version-utf8-as-utf8mb4,omitempty" json:"treat-old-version-utf8-as-utf8mb4,omitempty"` + // Optional: Defaults to 1000 // +optional SplitRegionMaxNum *uint64 `toml:"split-region-max-num,omitempty" json:"split-region-max-num,omitempty"` // +optional @@ -108,25 +109,29 @@ type TiDBConfig struct { // +k8s:openapi-gen=true type Log struct { // Log level. + // Optional: Defaults to info // +optional - Level string `toml:"level,omitempty" json:"level,omitempty"` + Level *string `toml:"level,omitempty" json:"level,omitempty"` // Log format. one of json, text, or console. + // Optional: Defaults to text // +optional - Format string `toml:"format,omitempty" json:"format,omitempty"` + Format *string `toml:"format,omitempty" json:"format,omitempty"` // Disable automatic timestamps in output. // +optional - DisableTimestamp bool `toml:"disable-timestamp,omitempty" json:"disable-timestamp,omitempty"` + DisableTimestamp *bool `toml:"disable-timestamp,omitempty" json:"disable-timestamp,omitempty"` // File log config. // +optional File *FileLogConfig `toml:"file,omitempty" json:"file,omitempty"` - // +optional - SlowQueryFile string `toml:"slow-query-file,omitempty" json:"slow-query-file,omitempty"` + // Optional: Defaults to 300 // +optional SlowThreshold *uint64 `toml:"slow-threshold,omitempty" json:"slow-threshold,omitempty"` + // Optional: Defaults to 10000 // +optional ExpensiveThreshold *uint `toml:"expensive-threshold,omitempty" json:"expensive-threshold,omitempty"` + // Optional: Defaults to 2048 // +optional QueryLogMaxLen *uint64 `toml:"query-log-max-len,omitempty" json:"query-log-max-len,omitempty"` + // Optional: Defaults to 1 // +optional RecordPlanInSlowLog uint32 `toml:"record-plan-in-slow-log,omitempty" json:"record-plan-in-slow-log,omitempty"` } @@ -135,36 +140,35 @@ type Log struct { // +k8s:openapi-gen=true type Security struct { // +optional - SkipGrantTable bool `toml:"skip-grant-table,omitempty" json:"skip-grant-table,omitempty"` + SkipGrantTable *bool `toml:"skip-grant-table,omitempty" json:"skip-grant-table,omitempty"` // +optional - SSLCA string `toml:"ssl-ca,omitempty" json:"ssl-ca,omitempty"` + SSLCA *string `toml:"ssl-ca,omitempty" json:"ssl-ca,omitempty"` // +optional - SSLCert string `toml:"ssl-cert,omitempty" json:"ssl-cert,omitempty"` + SSLCert *string `toml:"ssl-cert,omitempty" json:"ssl-cert,omitempty"` // +optional - SSLKey string `toml:"ssl-key,omitempty" json:"ssl-key,omitempty"` + SSLKey *string `toml:"ssl-key,omitempty" json:"ssl-key,omitempty"` // +optional - ClusterSSLCA string `toml:"cluster-ssl-ca,omitempty" json:"cluster-ssl-ca,omitempty"` + ClusterSSLCA *string `toml:"cluster-ssl-ca,omitempty" json:"cluster-ssl-ca,omitempty"` // +optional - ClusterSSLCert string `toml:"cluster-ssl-cert,omitempty" json:"cluster-ssl-cert,omitempty"` + ClusterSSLCert *string `toml:"cluster-ssl-cert,omitempty" json:"cluster-ssl-cert,omitempty"` // +optional - ClusterSSLKey string `toml:"cluster-ssl-key,omitempty" json:"cluster-ssl-key,omitempty"` + ClusterSSLKey *string `toml:"cluster-ssl-key,omitempty" json:"cluster-ssl-key,omitempty"` } // Status is the status section of the config. // +k8s:openapi-gen=true type Status struct { + // Optional: Defaults to true // +optional - ReportStatus bool `toml:"report-status,omitempty" json:"report-status,omitempty"` - // +optional - StatusHost string `toml:"status-host,omitempty" json:"status-host,omitempty"` + ReportStatus *bool `toml:"report-status,omitempty" json:"report-status,omitempty"` // +optional - StatusPort *uint `toml:"status-port,omitempty" json:"status-port,omitempty"` - // +optional - MetricsAddr string `toml:"metrics-addr,omitempty" json:"metrics-addr,omitempty"` + MetricsAddr *string `toml:"metrics-addr,omitempty" json:"metrics-addr,omitempty"` + // Optional: Defaults to 15 // +optional MetricsInterval *uint `toml:"metrics-interval,omitempty" json:"metrics-interval,omitempty"` + // Optional: Defaults to false // +optional - RecordQPSbyDB bool `toml:"record-db-qps,omitempty" json:"record-db-qps,omitempty"` + RecordQPSbyDB *bool `toml:"record-db-qps,omitempty" json:"record-db-qps,omitempty"` } // Performance is the performance section of the config. @@ -172,30 +176,43 @@ type Status struct { type Performance struct { // +optional MaxProcs *uint `toml:"max-procs,omitempty" json:"max-procs,omitempty"` + // Optional: Defaults to 0 // +optional MaxMemory *uint64 `toml:"max-memory,omitempty" json:"max-memory,omitempty"` + // Optional: Defaults to true // +optional - TCPKeepAlive bool `toml:"tcp-keep-alive,omitempty" json:"tcp-keep-alive,omitempty"` + TCPKeepAlive *bool `toml:"tcp-keep-alive,omitempty" json:"tcp-keep-alive,omitempty"` + // Optional: Defaults to true // +optional - CrossJoin bool `toml:"cross-join,omitempty" json:"cross-join,omitempty"` + CrossJoin *bool `toml:"cross-join,omitempty" json:"cross-join,omitempty"` + // Optional: Defaults to 3s // +optional - StatsLease string `toml:"stats-lease,omitempty" json:"stats-lease,omitempty"` + StatsLease *string `toml:"stats-lease,omitempty" json:"stats-lease,omitempty"` + // Optional: Defaults to true // +optional - RunAutoAnalyze bool `toml:"run-auto-analyze,omitempty" json:"run-auto-analyze,omitempty"` + RunAutoAnalyze *bool `toml:"run-auto-analyze,omitempty" json:"run-auto-analyze,omitempty"` + // Optional: Defaults to 5000 // +optional StmtCountLimit *uint `toml:"stmt-count-limit,omitempty" json:"stmt-count-limit,omitempty"` + // Optional: Defaults to 0.05 // +optional FeedbackProbability *float64 `toml:"feedback-probability,omitempty" json:"feedback-probability,omitempty"` + // Optional: Defaults to 1024 // +optional QueryFeedbackLimit *uint `toml:"query-feedback-limit,omitempty" json:"query-feedback-limit,omitempty"` + // Optional: Defaults to 0.8 // +optional PseudoEstimateRatio *float64 `toml:"pseudo-estimate-ratio,omitempty" json:"pseudo-estimate-ratio,omitempty"` + // Optional: Defaults to NO_PRIORITY // +optional - ForcePriority string `toml:"force-priority,omitempty" json:"force-priority,omitempty"` + ForcePriority *string `toml:"force-priority,omitempty" json:"force-priority,omitempty"` + // Optional: Defaults to 3s // +optional - BindInfoLease string `toml:"bind-info-lease,omitempty" json:"bind-info-lease,omitempty"` + BindInfoLease *string `toml:"bind-info-lease,omitempty" json:"bind-info-lease,omitempty"` + // Optional: Defaults to 300000 // +optional TxnEntryCountLimit *uint64 `toml:"txn-entry-count-limit,omitempty" json:"txn-entry-count-limit,omitempty"` + // Optional: Defaults to 104857600 // +optional TxnTotalSizeLimit *uint64 `toml:"txn-total-size-limit,omitempty" json:"txn-total-size-limit,omitempty"` } @@ -204,7 +221,7 @@ type Performance struct { // +k8s:openapi-gen=true type PlanCache struct { // +optional - Enabled bool `toml:"enabled,omitempty" json:"enabled,omitempty"` + Enabled *bool `toml:"enabled,omitempty" json:"enabled,omitempty"` // +optional Capacity *uint `toml:"capacity,omitempty" json:"capacity,omitempty"` // +optional @@ -215,7 +232,7 @@ type PlanCache struct { // +k8s:openapi-gen=true type TxnLocalLatches struct { // +optional - Enabled bool `toml:"enabled,omitempty" json:"enabled,omitempty"` + Enabled *bool `toml:"enabled,omitempty" json:"enabled,omitempty"` // +optional Capacity *uint `toml:"capacity,omitempty" json:"capacity,omitempty"` } @@ -223,10 +240,13 @@ type TxnLocalLatches struct { // PreparedPlanCache is the PreparedPlanCache section of the config. // +k8s:openapi-gen=true type PreparedPlanCache struct { + // Optional: Defaults to false // +optional - Enabled bool `toml:"enabled,omitempty" json:"enabled,omitempty"` + Enabled *bool `toml:"enabled,omitempty" json:"enabled,omitempty"` + // Optional: Defaults to 100 // +optional Capacity *uint `toml:"capacity,omitempty" json:"capacity,omitempty"` + // Optional: Defaults to 0.1 // +optional MemoryGuardRatio *float64 `toml:"memory-guard-ratio,omitempty" json:"memory-guard-ratio,omitempty"` } @@ -234,14 +254,15 @@ type PreparedPlanCache struct { // OpenTracing is the opentracing section of the config. // +k8s:openapi-gen=true type OpenTracing struct { + // Optional: Defaults to false // +optional - Enable bool `toml:"enable,omitempty" json:"enable,omitempty"` + Enable *bool `toml:"enable,omitempty" json:"enable,omitempty"` // +optional Sampler OpenTracingSampler `toml:"sampler,omitempty" json:"sampler,omitempty"` // +optional Reporter OpenTracingReporter `toml:"reporter,omitempty" json:"reporter,omitempty"` // +optional - RPCMetrics bool `toml:"rpc-metrics,omitempty" json:"rpc-metrics,omitempty"` + RPCMetrics *bool `toml:"rpc-metrics,omitempty" json:"rpc-metrics,omitempty"` } // OpenTracingSampler is the config for opentracing sampler. @@ -249,11 +270,11 @@ type OpenTracing struct { // +k8s:openapi-gen=true type OpenTracingSampler struct { // +optional - Type string `toml:"type,omitempty" json:"type,omitempty"` + Type *string `toml:"type,omitempty" json:"type,omitempty"` // +optional Param *float64 `toml:"param,omitempty" json:"param,omitempty"` // +optional - SamplingServerURL string `toml:"sampling-server-url,omitempty" json:"sampling-server-url,omitempty"` + SamplingServerURL *string `toml:"sampling-server-url,omitempty" json:"sampling-server-url,omitempty"` // +optional MaxOperations *int `toml:"max-operations,omitempty" json:"max-operations,omitempty"` // +optional @@ -269,19 +290,19 @@ type OpenTracingReporter struct { // +optional BufferFlushInterval time.Duration `toml:"buffer-flush-interval,omitempty" json:"buffer-flush-interval,omitempty"` // +optional - LogSpans bool `toml:"log-spans,omitempty" json:"log-spans,omitempty"` + LogSpans *bool `toml:"log-spans,omitempty" json:"log-spans,omitempty"` // +optional - LocalAgentHostPort string `toml:"local-agent-host-port,omitempty" json:"local-agent-host-port,omitempty"` + LocalAgentHostPort *string `toml:"local-agent-host-port,omitempty" json:"local-agent-host-port,omitempty"` } // ProxyProtocol is the PROXY protocol section of the config. // +k8s:openapi-gen=true type ProxyProtocol struct { // PROXY protocol acceptable client networks. - // Empty string means disable PROXY protocol, + // Empty *string means disable PROXY protocol, // * means all networks. // +optional - Networks string `toml:"networks,omitempty" json:"networks,omitempty"` + Networks *string `toml:"networks,omitempty" json:"networks,omitempty"` // PROXY protocol header read timeout, Unit is second. // +optional HeaderTimeout *uint `toml:"header-timeout,omitempty" json:"header-timeout,omitempty"` @@ -292,40 +313,51 @@ type ProxyProtocol struct { type TiKVClient struct { // GrpcConnectionCount is the max gRPC connections that will be established // with each tikv-server. + // Optional: Defaults to 16 // +optional GrpcConnectionCount *uint `toml:"grpc-connection-count,omitempty" json:"grpc-connection-count,omitempty"` // After a duration of this time in seconds if the client doesn't see any activity it pings // the server to see if the transport is still alive. + // Optional: Defaults to 10 // +optional GrpcKeepAliveTime *uint `toml:"grpc-keepalive-time,omitempty" json:"grpc-keepalive-time,omitempty"` // After having pinged for keepalive check, the client waits for a duration of Timeout in seconds // and if no activity is seen even after that the connection is closed. + // Optional: Defaults to 3 // +optional GrpcKeepAliveTimeout *uint `toml:"grpc-keepalive-timeout,omitempty" json:"grpc-keepalive-timeout,omitempty"` // CommitTimeout is the max time which command 'commit' will wait. + // Optional: Defaults to 41s // +optional - CommitTimeout string `toml:"commit-timeout,omitempty" json:"commit-timeout,omitempty"` + CommitTimeout *string `toml:"commit-timeout,omitempty" json:"commit-timeout,omitempty"` // MaxTxnTimeUse is the max time a Txn may use (in seconds) from its startTS to commitTS. + // Optional: Defaults to 590 // +optional MaxTxnTimeUse *uint `toml:"max-txn-time-use,omitempty" json:"max-txn-time-use,omitempty"` // MaxBatchSize is the max batch size when calling batch commands API. + // Optional: Defaults to 128 // +optional MaxBatchSize *uint `toml:"max-batch-size,omitempty" json:"max-batch-size,omitempty"` // If TiKV load is greater than this, TiDB will wait for a while to avoid little batch. + // Optional: Defaults to 200 // +optional OverloadThreshold *uint `toml:"overload-threshold,omitempty" json:"overload-threshold,omitempty"` // MaxBatchWaitTime in nanosecond is the max wait time for batch. + // Optional: Defaults to 0 // +optional MaxBatchWaitTime time.Duration `toml:"max-batch-wait-time,omitempty" json:"max-batch-wait-time,omitempty"` // BatchWaitSize is the max wait size for batch. + // Optional: Defaults to 8 // +optional BatchWaitSize *uint `toml:"batch-wait-size,omitempty" json:"batch-wait-size,omitempty"` // If a Region has not been accessed for more than the given duration (in seconds), it // will be reloaded from the PD. + // Optional: Defaults to 600 // +optional RegionCacheTTL *uint `toml:"region-cache-ttl,omitempty" json:"region-cache-ttl,omitempty"` // If a store has been up to the limit, it will return error for successive request to // prevent the store occupying too much token in dispatching level. + // Optional: Defaults to 0 // +optional StoreLimit int64 `toml:"store-limit,omitempty" json:"store-limit,omitempty"` } @@ -333,38 +365,40 @@ type TiKVClient struct { // Binlog is the config for binlog. // +k8s:openapi-gen=true type Binlog struct { + // Optional: Defaults to 15s // +optional - Enable bool `toml:"enable,omitempty" json:"enable,omitempty"` - // +optional - WriteTimeout string `toml:"write-timeout,omitempty" json:"write-timeout,omitempty"` + WriteTimeout *string `toml:"write-timeout,omitempty" json:"write-timeout,omitempty"` // If IgnoreError is true, when writing binlog meets error, TiDB would // ignore the error. // +optional - IgnoreError bool `toml:"ignore-error,omitempty" json:"ignore-error,omitempty"` + IgnoreError *bool `toml:"ignore-error,omitempty" json:"ignore-error,omitempty"` // Use socket file to write binlog, for compatible with kafka version tidb-binlog. // +optional - BinlogSocket string `toml:"binlog-socket,omitempty" json:"binlog-socket,omitempty"` + BinlogSocket *string `toml:"binlog-socket,omitempty" json:"binlog-socket,omitempty"` // The strategy for sending binlog to pump, value can be "range,omitempty" or "hash,omitempty" now. + // Optional: Defaults to range // +optional - Strategy string `toml:"strategy,omitempty" json:"strategy,omitempty"` + Strategy *string `toml:"strategy,omitempty" json:"strategy,omitempty"` } // Plugin is the config for plugin // +k8s:openapi-gen=true type Plugin struct { // +optional - Dir string `toml:"dir,omitempty" json:"dir,omitempty"` + Dir *string `toml:"dir,omitempty" json:"dir,omitempty"` // +optional - Load string `toml:"load,omitempty" json:"load,omitempty"` + Load *string `toml:"load,omitempty" json:"load,omitempty"` } // PessimisticTxn is the config for pessimistic transaction. // +k8s:openapi-gen=true type PessimisticTxn struct { // Enable must be true for 'begin lock' or session variable to start a pessimistic transaction. + // Optional: Defaults to true // +optional - Enable bool `toml:"enable,omitempty" json:"enable,omitempty"` + Enable *bool `toml:"enable,omitempty" json:"enable,omitempty"` // The max count of retry for a single statement in a pessimistic transaction. + // Optional: Defaults to 256 // +optional MaxRetryCount *uint `toml:"max-retry-count,omitempty" json:"max-retry-count,omitempty"` } @@ -373,9 +407,11 @@ type PessimisticTxn struct { // +k8s:openapi-gen=true type StmtSummary struct { // The maximum number of statements kept in memory. + // Optional: Defaults to 100 // +optional MaxStmtCount *uint `toml:"max-stmt-count,omitempty" json:"max-stmt-count,omitempty"` // The maximum length of displayed normalized SQL and sample SQL. + // Optional: Defaults to 4096 // +optional MaxSQLLength *uint `toml:"max-sql-length,omitempty" json:"max-sql-length,omitempty"` } diff --git a/pkg/apis/pingcap/v1alpha1/tidb_config_test.go b/pkg/apis/pingcap/v1alpha1/tidb_config_test.go index 913709ff1a..962bea5bf9 100644 --- a/pkg/apis/pingcap/v1alpha1/tidb_config_test.go +++ b/pkg/apis/pingcap/v1alpha1/tidb_config_test.go @@ -20,6 +20,7 @@ import ( "github.com/BurntSushi/toml" . "github.com/onsi/gomega" + "k8s.io/utils/pointer" ) func TestTiDBConfig(t *testing.T) { @@ -27,10 +28,9 @@ func TestTiDBConfig(t *testing.T) { procs := uint(8) probability := 0.8 c := &TiDBConfig{ - Host: "0.0.0.0", Performance: &Performance{ MaxProcs: &procs, - CrossJoin: true, + CrossJoin: pointer.BoolPtr(true), FeedbackProbability: &probability, }, } @@ -49,10 +49,7 @@ func TestTiDBConfig(t *testing.T) { err = encoder.Encode(c) g.Expect(err).To(Succeed()) tStr := buff.String() - g.Expect(tStr).To((Equal( - `host = "0.0.0.0" - -[performance] + g.Expect(tStr).To((Equal(`[performance] max-procs = 8 cross-join = true feedback-probability = 0.8 diff --git a/pkg/apis/pingcap/v1alpha1/tikv_config.go b/pkg/apis/pingcap/v1alpha1/tikv_config.go index 4144ba0706..bf06272236 100644 --- a/pkg/apis/pingcap/v1alpha1/tikv_config.go +++ b/pkg/apis/pingcap/v1alpha1/tikv_config.go @@ -18,10 +18,12 @@ package v1alpha1 // TiKVConfig is the configuration of TiKV. // +k8s:openapi-gen=true type TiKVConfig struct { + // Optional: Defaults to info // +optional LogLevel string `json:"log-level,omitempty" toml:"log-level,omitempty"` // +optional LogFile string `json:"log-file,omitempty" toml:"log-file,omitempty"` + // Optional: Defaults to 24h // +optional LogRotationTimespan string `json:"log-rotation-timespan,omitempty" toml:"log-rotation-timespan,omitempty"` // +optional @@ -46,31 +48,65 @@ type TiKVConfig struct { // +optional GC *TiKVGCConfig `json:"gc,omitempty" toml:"gc,omitempty"` // +optional + PD *TiKVPDConfig `json:"pd,omitempty" toml:"pd,omitempty"` + // +optional Security *TiKVSecurityConfig `json:"security,omitempty" toml:"security,omitempty"` } // +k8s:openapi-gen=true type TiKVReadPoolConfig struct { // +optional - Coprocessor *TiKVComponentReadPoolConfig `json:"coprocessor,omitempty" toml:"coprocessor,omitempty"` + Coprocessor *TiKVCoprocessorReadPoolConfig `json:"coprocessor,omitempty" toml:"coprocessor,omitempty"` // +optional - Storage *TiKVComponentReadPoolConfig `json:"storage,omitempty" toml:"storage,omitempty"` + Storage *TiKVStorageReadPoolConfig `json:"storage,omitempty" toml:"storage,omitempty"` } // +k8s:openapi-gen=true -type TiKVComponentReadPoolConfig struct { +type TiKVStorageReadPoolConfig struct { + // Optional: Defaults to 4 // +optional HighConcurrency *int64 `json:"high_concurrency,omitempty" toml:"high_concurrency,omitempty"` + // Optional: Defaults to 4 // +optional NormalConcurrency *int64 `json:"normal_concurrency,omitempty" toml:"normal_concurrency,omitempty"` + // Optional: Defaults to 4 // +optional LowConcurrency *int64 `json:"low_concurrency,omitempty" toml:"low_concurrency,omitempty"` + // Optional: Defaults to 2000 // +optional MaxTasksPerWorkerHigh *int64 `json:"max_tasks_per_worker_high,omitempty" toml:"max_tasks_per_worker_high,omitempty"` + // Optional: Defaults to 2000 // +optional MaxTasksPerWorkerNormal *int64 `json:"max_tasks_per_worker_normal,omitempty" toml:"max_tasks_per_worker_normal,omitempty"` + // Optional: Defaults to 2000 // +optional MaxTasksPerWorkerLow *int64 `json:"max_tasks_per_worker_low,omitempty" toml:"max_tasks_per_worker_low,omitempty"` + // Optional: Defaults to 10MB + // +optional + StackSize string `json:"stack_size,omitempty" toml:"stack_size,omitempty"` +} + +// +k8s:openapi-gen=true +type TiKVCoprocessorReadPoolConfig struct { + // Optional: Defaults to 8 + // +optional + HighConcurrency *int64 `json:"high_concurrency,omitempty" toml:"high_concurrency,omitempty"` + // Optional: Defaults to 8 + // +optional + NormalConcurrency *int64 `json:"normal_concurrency,omitempty" toml:"normal_concurrency,omitempty"` + // Optional: Defaults to 8 + // +optional + LowConcurrency *int64 `json:"low_concurrency,omitempty" toml:"low_concurrency,omitempty"` + // Optional: Defaults to 2000 + // +optional + MaxTasksPerWorkerHigh *int64 `json:"max_tasks_per_worker_high,omitempty" toml:"max_tasks_per_worker_high,omitempty"` + // Optional: Defaults to 2000 + // +optional + MaxTasksPerWorkerNormal *int64 `json:"max_tasks_per_worker_normal,omitempty" toml:"max_tasks_per_worker_normal,omitempty"` + // Optional: Defaults to 2000 + // +optional + MaxTasksPerWorkerLow *int64 `json:"max_tasks_per_worker_low,omitempty" toml:"max_tasks_per_worker_low,omitempty"` + // Optional: Defaults to 10MB // +optional StackSize string `json:"stack_size,omitempty" toml:"stack_size,omitempty"` } @@ -85,17 +121,20 @@ type TiKVPDConfig struct { // The interval at which to retry a PD connection initialization. // // Default is 300ms. + // Optional: Defaults to 300ms // +optional RetryInterval string `json:"retry_interval,omitempty" toml:"retry_interval,omitempty"` // The maximum number of times to retry a PD connection initialization. // // Default is isize::MAX, represented by -1. + // Optional: Defaults to -1 // +optional RetryMaxCount *int64 `json:"retry_max_count,omitempty" toml:"retry_max_count,omitempty"` // If the client observes the same error message on retry, it can repeat the message only // every `n` times. // // Default is 10. Set to 1 to disable this feature. + // Optional: Defaults to 10 // +optional RetryLogEvery *int64 `json:"retry_log_every,omitempty" toml:"retry_log_every,omitempty"` } @@ -191,6 +230,7 @@ type TiKVImportConfig struct { // +k8s:openapi-gen=true type TiKVGCConfig struct { // +optional + // Optional: Defaults to 512 BatchKeys *int64 `json:" batch_keys,omitempty" toml:" batch_keys,omitempty"` // +optional MaxWriteBytesPerSec string `json:" max_write_bytes_per_sec,omitempty" toml:" max_write_bytes_per_sec,omitempty"` @@ -200,27 +240,34 @@ type TiKVGCConfig struct { // +k8s:openapi-gen=true type TiKVDbConfig struct { // +optional + // Optional: Defaults to 2 WalRecoveryMode *int64 `json:"wal-recovery-mode,omitempty" toml:"wal-recovery-mode,omitempty"` // +optional - WalDir string `json:"wal-dir,omitempty" toml:"wal-dir,omitempty"` - // +optional WalTTLSeconds *int64 `json:"wal-ttl-seconds,omitempty" toml:"wal-ttl-seconds,omitempty"` // +optional WalSizeLimit string `json:"wal-size-limit,omitempty" toml:"wal-size-limit,omitempty"` // +optional + // Optional: Defaults to 4GB MaxTotalWalSize string `json:"max-total-wal-size,omitempty" toml:"max-total-wal-size,omitempty"` // +optional + // Optional: Defaults to 8 MaxBackgroundJobs *int64 `json:"max-background-jobs,omitempty" toml:"max-background-jobs,omitempty"` // +optional + // Optional: Defaults to 128MB MaxManifestFileSize string `json:"max-manifest-file-size,omitempty" toml:"max-manifest-file-size,omitempty"` // +optional + // Optional: Defaults to true CreateIfMissing *bool `json:"create-if-missing,omitempty" toml:"create-if-missing,omitempty"` // +optional + // Optional: Defaults to 40960 MaxOpenFiles *int64 `json:"max-open-files,omitempty" toml:"max-open-files,omitempty"` // +optional + // Optional: Defaults to true EnableStatistics *bool `json:"enable-statistics,omitempty" toml:"enable-statistics,omitempty"` // +optional + // Optional: Defaults to 10m StatsDumpPeriod string `json:"stats-dump-period,omitempty" toml:"stats-dump-period,omitempty"` + // Optional: Defaults to 0 // +optional CompactionReadaheadSize string `json:"compaction-readahead-size,omitempty" toml:"compaction-readahead-size,omitempty"` // +optional @@ -242,6 +289,7 @@ type TiKVDbConfig struct { // +optional WalBytesPerSync string `json:"wal-bytes-per-sync,omitempty" toml:"wal-bytes-per-sync,omitempty"` // +optional + // Optional: Defaults to 3 MaxSubCompactions *int64 `json:"max-sub-compactions,omitempty" toml:"max-sub-compactions,omitempty"` // +optional WritableFileMaxBufferSize string `json:"writable-file-max-buffer-size,omitempty" toml:"writable-file-max-buffer-size,omitempty"` @@ -272,7 +320,8 @@ type TiKVCfConfig struct { DisableBlockCache *bool `json:"disable-block-cache,omitempty" toml:"disable-block-cache,omitempty"` // +optional CacheIndexAndFilterBlocks *bool `json:"cache-index-and-filter-blocks,omitempty" toml:"cache-index-and-filter-blocks,omitempty"` - PinL0FilterAndIndexBlocks *bool `toml:"pin-l0-filter-and-index-blocks"` + // +optional + PinL0FilterAndIndexBlocks *bool `json:"pin-l0-filter-and-index-blocks,omitempty" toml:"pin-l0-filter-and-index-blocks,omitempty"` // +optional UseBloomFilter *bool `json:"use-bloom-filter,omitempty" toml:"use-bloom-filter,omitempty"` // +optional @@ -296,10 +345,13 @@ type TiKVCfConfig struct { // +optional MaxBytesForLevelBase string `json:"max-bytes-for-level-base,omitempty" toml:"max-bytes-for-level-base,omitempty"` // +optional - TargetFileSizeBase string `json:"target-file-size-base,omitempty" toml:"target-file-size-base,omitempty"` - Level0FileNumCompactionTrigger *int64 `toml:"level0-file-num-compaction-trigger"` - Level0SlowdownWritesTrigger *int64 `toml:"level0-slowdown-writes-trigger"` - Level0StopWritesTrigger *int64 `toml:"level0-stop-writes-trigger"` + TargetFileSizeBase string `json:"target-file-size-base,omitempty" toml:"target-file-size-base,omitempty"` + // +optional + Level0FileNumCompactionTrigger *int64 `json:"level0-file-num-compaction-trigger,omitempty" toml:"level0-file-num-compaction-trigger,omitempty"` + // +optional + Level0SlowdownWritesTrigger *int64 `json:"level0-slowdown-writes-trigger,omitempty" toml:"level0-slowdown-writes-trigger,omitempty"` + // +optional + Level0StopWritesTrigger *int64 `json:"level0-stop-writes-trigger,omitempty" toml:"level0-stop-writes-trigger,omitempty"` // +optional MaxCompactionBytes string `json:"max-compaction-bytes,omitempty" toml:"max-compaction-bytes,omitempty"` // +optional @@ -372,17 +424,18 @@ type TiKVTitanDBConfig struct { // TiKVStorageConfig is the config of storage // +k8s:openapi-gen=true type TiKVStorageConfig struct { - // +optional - DataDir string `json:"data-dir,omitempty" toml:"data-dir,omitempty"` // +optional MaxKeySize *int64 `json:"max-key-size,omitempty" toml:"max-key-size,omitempty"` // +optional SchedulerNotifyCapacity *int64 `json:"scheduler-notify-capacity,omitempty" toml:"scheduler-notify-capacity,omitempty"` // +optional + // Optional: Defaults to 2048000 SchedulerConcurrency *int64 `json:"scheduler-concurrency,omitempty" toml:"scheduler-concurrency,omitempty"` // +optional + // Optional: Defaults to 4 SchedulerWorkerPoolSize *int64 `json:"scheduler-worker-pool-size,omitempty" toml:"scheduler-worker-pool-size,omitempty"` // +optional + // Optional: Defaults to 100MB SchedulerPendingWriteThreshold string `json:"scheduler-pending-write-threshold,omitempty" toml:"scheduler-pending-write-threshold,omitempty"` // +optional BlockCache *TiKVBlockCacheConfig `json:"block-cache,omitempty" toml:"block-cache,omitempty"` @@ -391,6 +444,7 @@ type TiKVStorageConfig struct { // TiKVBlockCacheConfig is the config of a block cache // +k8s:openapi-gen=true type TiKVBlockCacheConfig struct { + // Optional: Defaults to true // +optional Shared *bool `json:"shared,omitempty" toml:"shared,omitempty"` // +optional @@ -408,32 +462,40 @@ type TiKVBlockCacheConfig struct { // TiKVServerConfig is the configuration of TiKV server. // +k8s:openapi-gen=true type TiKVServerConfig struct { - // +optional - Addr string `json:"addr,omitempty" toml:"addr,omitempty"` - // +optional - AdvertiseAddr string `json:"advertise-addr,omitempty" toml:"advertise-addr,omitempty"` - // +optional - StatusAddr string `json:"status-addr,omitempty" toml:"status-addr,omitempty"` + // Optional: Defaults to 1 // +optional StatusThreadPoolSize string `json:"status-thread-pool-size,omitempty" toml:"status-thread-pool-size,omitempty"` + // Optional: Defaults to none // +optional GrpcCompressionType string `json:"grpc-compression-type,omitempty" toml:"grpc-compression-type,omitempty"` + // Optional: Defaults to 4 // +optional GrpcConcurrency *uint `json:"grpc-concurrency,omitempty" toml:"grpc-concurrency,omitempty"` + // Optional: Defaults to 1024 // +optional GrpcConcurrentStream *uint `json:"grpc-concurrent-stream,omitempty" toml:"grpc-concurrent-stream,omitempty"` + // Optional: Defaults to 32G + // +optional + GrpcMemoryQuota *string `json:"grpc_memory_pool_quota,omitempty" toml:"grpc_memory_pool_quota,omitempty"` + // Optional: Defaults to 10 // +optional GrpcRaftConnNum *uint `json:"grpc-raft-conn-num,omitempty" toml:"grpc-raft-conn-num,omitempty"` + // Optional: Defaults to 2MB // +optional GrpcStreamInitialWindowSize string `json:"grpc-stream-initial-window-size,omitempty" toml:"grpc-stream-initial-window-size,omitempty"` + // Optional: Defaults to 10s // +optional GrpcKeepaliveTime string `json:"grpc-keepalive-time,omitempty" toml:"grpc-keepalive-time,omitempty"` + // Optional: Defaults to 3s // +optional GrpcKeepaliveTimeout string `json:"grpc-keepalive-timeout,omitempty" toml:"grpc-keepalive-timeout,omitempty"` + // Optional: Defaults to 32 // +optional ConcurrentSendSnapLimit *uint `json:"concurrent-send-snap-limit,omitempty" toml:"concurrent-send-snap-limit,omitempty"` + // Optional: Defaults to 32 // +optional ConcurrentRecvSnapLimit *uint `json:"concurrent-recv-snap-limit,omitempty" toml:"concurrent-recv-snap-limit,omitempty"` + // Optional: Defaults to 1000 // +optional EndPointRecursionLimit *uint `json:"end-point-recursion-limit,omitempty" toml:"end-point-recursion-limit,omitempty"` // +optional @@ -446,6 +508,7 @@ type TiKVServerConfig struct { EndPointEnableBatchIfPossible *uint `json:"end-point-enable-batch-if-possible,omitempty" toml:"end-point-enable-batch-if-possible,omitempty"` // +optional EndPointRequestMaxHandleDuration string `json:"end-point-request-max-handle-duration,omitempty" toml:"end-point-request-max-handle-duration,omitempty"` + // Optional: Defaults to 100MB // +optional SnapMaxWriteBytesPerSec string `json:"snap-max-write-bytes-per-sec,omitempty" toml:"snap-max-write-bytes-per-sec,omitempty"` // +optional @@ -454,6 +517,7 @@ type TiKVServerConfig struct { StatsConcurrency *uint `json:"stats-concurrency,omitempty" toml:"stats-concurrency,omitempty"` // +optional HeavyLoadThreshold *uint `json:"heavy-load-threshold,omitempty" toml:"heavy-load-threshold,omitempty"` + // Optional: Defaults to 60s // +optional HeavyLoadWaitDuration string `json:"heavy-load-wait-duration,omitempty" toml:"heavy-load-wait-duration,omitempty"` // +optional @@ -464,9 +528,13 @@ type TiKVServerConfig struct { // +k8s:openapi-gen=true type TiKVRaftstoreConfig struct { // true for high reliability, prevent data loss when power failure. + // Optional: Defaults to true // +optional SyncLog *bool `json:"sync-log,omitempty" toml:"sync-log,omitempty"` + // Optional: Defaults to true + // +optional + Prevote *bool `json:"prevote,omitempty" toml:"prevote,omitempty"` // raft-base-tick-interval is a base tick interval (ms). // +optional RaftBaseTickInterval string `json:"raft-base-tick-interval,omitempty" toml:"raft-base-tick-interval,omitempty"` @@ -475,20 +543,25 @@ type TiKVRaftstoreConfig struct { // +optional RaftElectionTimeoutTicks *int64 `json:"raft-election-timeout-ticks,omitempty" toml:"raft-election-timeout-ticks,omitempty"` // When the entry exceed the max size, reject to propose it. + // Optional: Defaults to 8MB // +optional RaftEntryMaxSize string `json:"raft-entry-max-size,omitempty" toml:"raft-entry-max-size,omitempty"` // Interval to gc unnecessary raft log (ms). + // Optional: Defaults to 10s // +optional RaftLogGCTickInterval string `json:"raft-log-gc-tick-interval,omitempty" toml:"raft-log-gc-tick-interval,omitempty"` // A threshold to gc stale raft log, must >= 1. + // Optional: Defaults to 50 // +optional RaftLogGCThreshold *int64 `json:"raft-log-gc-threshold,omitempty" toml:"raft-log-gc-threshold,omitempty"` // When entry count exceed this value, gc will be forced trigger. + // Optional: Defaults to 72000 // +optional RaftLogGCCountLimit *int64 `json:"raft-log-gc-count-limit,omitempty" toml:"raft-log-gc-count-limit,omitempty"` // When the approximate size of raft log entries exceed this value // gc will be forced trigger. + // Optional: Defaults to 72MB // +optional RaftLogGCSizeLimit string `json:"raft-log-gc-size-limit,omitempty" toml:"raft-log-gc-size-limit,omitempty"` // When a peer is not responding for this time, leader will not keep entry cache for it. @@ -499,30 +572,39 @@ type TiKVRaftstoreConfig struct { RaftRejectTransferLeaderDuration string `json:"raft-reject-transfer-leader-duration,omitempty" toml:"raft-reject-transfer-leader-duration,omitempty"` // Interval (ms) to check region whether need to be split or not. + // Optional: Defaults to 10s // +optional SplitRegionCheckTickInterval string `json:"split-region-check-tick-interval,omitempty" toml:"split-region-check-tick-interval,omitempty"` /// When size change of region exceed the diff since last check, it /// will be checked again whether it should be split. + // Optional: Defaults to 6MB // +optional RegionSplitCheckDiff string `json:"region-split-check-diff,omitempty" toml:"region-split-check-diff,omitempty"` /// Interval (ms) to check whether start compaction for a region. + // Optional: Defaults to 5m // +optional RegionCompactCheckInterval string `json:"region-compact-check-interval,omitempty" toml:"region-compact-check-interval,omitempty"` // delay time before deleting a stale peer + // Optional: Defaults to 10m // +optional CleanStalePeerDelay string `json:"clean-stale-peer-delay,omitempty" toml:"clean-stale-peer-delay,omitempty"` /// Number of regions for each time checking. + // Optional: Defaults to 100 // +optional RegionCompactCheckStep *int64 `json:"region-compact-check-step,omitempty" toml:"region-compact-check-step,omitempty"` /// Minimum number of tombstones to trigger manual compaction. + // Optional: Defaults to 10000 // +optional RegionCompactMinTombstones *int64 `json:"region-compact-min-tombstones,omitempty" toml:"region-compact-min-tombstones,omitempty"` /// Minimum percentage of tombstones to trigger manual compaction. /// Should between 1 and 100. + // Optional: Defaults to 30 // +optional RegionCompactTombstonesPercent *int64 `json:"region-compact-tombstones-percent,omitempty" toml:"region-compact-tombstones-percent,omitempty"` + // Optional: Defaults to 60s // +optional PdHeartbeatTickInterval string `json:"pd-heartbeat-tick-interval,omitempty" toml:"pd-heartbeat-tick-interval,omitempty"` + // Optional: Defaults to 10s // +optional PdStoreHeartbeatTickInterval string `json:"pd-store-heartbeat-tick-interval,omitempty" toml:"pd-store-heartbeat-tick-interval,omitempty"` // +optional @@ -530,8 +612,10 @@ type TiKVRaftstoreConfig struct { // +optional SnapGCTimeout string `json:"snap-gc-timeout,omitempty" toml:"snap-gc-timeout,omitempty"` // +optional + // Optional: Defaults to 10m LockCfCompactInterval string `json:"lock-cf-compact-interval,omitempty" toml:"lock-cf-compact-interval,omitempty"` // +optional + // Optional: Defaults to 256MB LockCfCompactBytesThreshold string `json:"lock-cf-compact-bytes-threshold,omitempty" toml:"lock-cf-compact-bytes-threshold,omitempty"` // +optional @@ -541,6 +625,7 @@ type TiKVRaftstoreConfig struct { /// When a peer is not active for max-peer-down-duration /// the peer is considered to be down and is reported to PD. + // Optional: Defaults to 5m // +optional MaxPeerDownDuration string `json:"max-peer-down-duration,omitempty" toml:"max-peer-down-duration,omitempty"` @@ -563,6 +648,7 @@ type TiKVRaftstoreConfig struct { SnapApplyBatchSize string `json:"snap-apply-batch-size,omitempty" toml:"snap-apply-batch-size,omitempty"` // Interval (ms) to check region whether the data is consistent. + // Optional: Defaults to 0 // +optional ConsistencyCheckInterval string `json:"consistency-check-interval,omitempty" toml:"consistency-check-interval,omitempty"` @@ -591,15 +677,18 @@ type TiKVRaftstoreConfig struct { UseDeleteRange *bool `json:"use-delete-range,omitempty" toml:"use-delete-range,omitempty"` // +optional + // Optional: Defaults to 10m CleanupImportSstInterval string `json:"cleanup-import-sst-interval,omitempty" toml:"cleanup-import-sst-interval,omitempty"` // +optional ApplyMaxBatchSize *int64 `json:"apply-max-batch-size,omitempty" toml:"apply-max-batch-size,omitempty"` + // Optional: Defaults to 2 // +optional ApplyPoolSize *int64 `json:"apply-pool-size,omitempty" toml:"apply-pool-size,omitempty"` // +optional StoreMaxBatchSize *int64 `json:"store-max-batch-size,omitempty" toml:"store-max-batch-size,omitempty"` + // Optional: Defaults to 2 // +optional StorePoolSize *int64 `json:"store-pool-size,omitempty" toml:"store-pool-size,omitempty"` // +optional @@ -612,6 +701,7 @@ type TiKVCoprocessorConfig struct { // When it is set to `true`, TiKV will try to split a Region with table prefix if that Region // crosses tables. // It is recommended to turn off this option if there will be a large number of tables created. + // Optional: Defaults to false // optional SplitRegionOnTable *bool `json:"split-region-on-table,omitempty" toml:"split-region-on-table,omitempty"` @@ -623,24 +713,28 @@ type TiKVCoprocessorConfig struct { // When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), // [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a // little larger). See also: region-split-size + // Optional: Defaults to 144MB // optional RegionMaxSize string `json:"region-max-size,omitempty" toml:"region-max-size,omitempty"` // When Region [a,e) size exceeds `region_max_size`, it will be split into several Regions [a,b), // [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `region_split_size` (or a // little larger). See also: region-max-size + // Optional: Defaults to 96MB // optional RegionSplitSize string `json:"region-split-size,omitempty" toml:"region-split-size,omitempty"` // When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into // several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be // `region_split_keys`. See also: region-split-keys + // Optional: Defaults to 1440000 // optional RegionMaxKeys *int64 `json:"region-max-keys,omitempty" toml:"region-max-keys,omitempty"` // When the number of keys in Region [a,e) exceeds the `region_max_keys`, it will be split into // several Regions [a,b), [b,c), [c,d), [d,e) and the number of keys in [a,b), [b,c), [c,d) will be // `region_split_keys`. See also: region-max-keys + // Optional: Defaults to 960000 // optional RegionSplitKeys *int64 `json:"region-split-keys,omitempty" toml:"region-split-keys,omitempty"` } diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index f4976e8a90..60ac7f98b8 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -260,6 +260,26 @@ func (in *BackupStatus) DeepCopy() *BackupStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Binlog) DeepCopyInto(out *Binlog) { *out = *in + if in.WriteTimeout != nil { + in, out := &in.WriteTimeout, &out.WriteTimeout + *out = new(string) + **out = **in + } + if in.IgnoreError != nil { + in, out := &in.IgnoreError, &out.IgnoreError + *out = new(bool) + **out = **in + } + if in.BinlogSocket != nil { + in, out := &in.BinlogSocket, &out.BinlogSocket + *out = new(string) + **out = **in + } + if in.Strategy != nil { + in, out := &in.Strategy, &out.Strategy + *out = new(string) + **out = **in + } return } @@ -547,6 +567,21 @@ func (in *InitializerSpec) DeepCopy() *InitializerSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Log) DeepCopyInto(out *Log) { *out = *in + if in.Level != nil { + in, out := &in.Level, &out.Level + *out = new(string) + **out = **in + } + if in.Format != nil { + in, out := &in.Format, &out.Format + *out = new(string) + **out = **in + } + if in.DisableTimestamp != nil { + in, out := &in.DisableTimestamp, &out.DisableTimestamp + *out = new(bool) + **out = **in + } if in.File != nil { in, out := &in.File, &out.File *out = new(FileLogConfig) @@ -605,8 +640,18 @@ func (in *MonitorContainer) DeepCopy() *MonitorContainer { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTracing) DeepCopyInto(out *OpenTracing) { *out = *in + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } in.Sampler.DeepCopyInto(&out.Sampler) in.Reporter.DeepCopyInto(&out.Reporter) + if in.RPCMetrics != nil { + in, out := &in.RPCMetrics, &out.RPCMetrics + *out = new(bool) + **out = **in + } return } @@ -628,6 +673,16 @@ func (in *OpenTracingReporter) DeepCopyInto(out *OpenTracingReporter) { *out = new(int) **out = **in } + if in.LogSpans != nil { + in, out := &in.LogSpans, &out.LogSpans + *out = new(bool) + **out = **in + } + if in.LocalAgentHostPort != nil { + in, out := &in.LocalAgentHostPort, &out.LocalAgentHostPort + *out = new(string) + **out = **in + } return } @@ -644,11 +699,21 @@ func (in *OpenTracingReporter) DeepCopy() *OpenTracingReporter { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTracingSampler) DeepCopyInto(out *OpenTracingSampler) { *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } if in.Param != nil { in, out := &in.Param, &out.Param *out = new(float64) **out = **in } + if in.SamplingServerURL != nil { + in, out := &in.SamplingServerURL, &out.SamplingServerURL + *out = new(string) + **out = **in + } if in.MaxOperations != nil { in, out := &in.MaxOperations, &out.MaxOperations *out = new(int) @@ -670,16 +735,6 @@ func (in *OpenTracingSampler) DeepCopy() *OpenTracingSampler { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PDConfig) DeepCopyInto(out *PDConfig) { *out = *in - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(bool) - **out = **in - } - if in.ConfigCheck != nil { - in, out := &in.ConfigCheck, &out.ConfigCheck - *out = new(bool) - **out = **in - } if in.ForceNewCluster != nil { in, out := &in.ForceNewCluster, &out.ForceNewCluster *out = new(bool) @@ -703,7 +758,7 @@ func (in *PDConfig) DeepCopyInto(out *PDConfig) { if in.Metric != nil { in, out := &in.Metric, &out.Metric *out = new(PDMetricConfig) - **out = **in + (*in).DeepCopyInto(*out) } if in.Schedule != nil { in, out := &in.Schedule, &out.Schedule @@ -882,6 +937,21 @@ func (in *PDMember) DeepCopy() *PDMember { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PDMetricConfig) DeepCopyInto(out *PDMetricConfig) { *out = *in + if in.PushJob != nil { + in, out := &in.PushJob, &out.PushJob + *out = new(string) + **out = **in + } + if in.PushAddress != nil { + in, out := &in.PushAddress, &out.PushAddress + *out = new(string) + **out = **in + } + if in.PushInterval != nil { + in, out := &in.PushInterval, &out.PushInterval + *out = new(string) + **out = **in + } return } @@ -1297,6 +1367,26 @@ func (in *Performance) DeepCopyInto(out *Performance) { *out = new(uint64) **out = **in } + if in.TCPKeepAlive != nil { + in, out := &in.TCPKeepAlive, &out.TCPKeepAlive + *out = new(bool) + **out = **in + } + if in.CrossJoin != nil { + in, out := &in.CrossJoin, &out.CrossJoin + *out = new(bool) + **out = **in + } + if in.StatsLease != nil { + in, out := &in.StatsLease, &out.StatsLease + *out = new(string) + **out = **in + } + if in.RunAutoAnalyze != nil { + in, out := &in.RunAutoAnalyze, &out.RunAutoAnalyze + *out = new(bool) + **out = **in + } if in.StmtCountLimit != nil { in, out := &in.StmtCountLimit, &out.StmtCountLimit *out = new(uint) @@ -1317,6 +1407,16 @@ func (in *Performance) DeepCopyInto(out *Performance) { *out = new(float64) **out = **in } + if in.ForcePriority != nil { + in, out := &in.ForcePriority, &out.ForcePriority + *out = new(string) + **out = **in + } + if in.BindInfoLease != nil { + in, out := &in.BindInfoLease, &out.BindInfoLease + *out = new(string) + **out = **in + } if in.TxnEntryCountLimit != nil { in, out := &in.TxnEntryCountLimit, &out.TxnEntryCountLimit *out = new(uint64) @@ -1343,6 +1443,11 @@ func (in *Performance) DeepCopy() *Performance { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PessimisticTxn) DeepCopyInto(out *PessimisticTxn) { *out = *in + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } if in.MaxRetryCount != nil { in, out := &in.MaxRetryCount, &out.MaxRetryCount *out = new(uint) @@ -1364,6 +1469,11 @@ func (in *PessimisticTxn) DeepCopy() *PessimisticTxn { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PlanCache) DeepCopyInto(out *PlanCache) { *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = new(uint) @@ -1390,6 +1500,16 @@ func (in *PlanCache) DeepCopy() *PlanCache { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Plugin) DeepCopyInto(out *Plugin) { *out = *in + if in.Dir != nil { + in, out := &in.Dir, &out.Dir + *out = new(string) + **out = **in + } + if in.Load != nil { + in, out := &in.Load, &out.Load + *out = new(string) + **out = **in + } return } @@ -1406,6 +1526,11 @@ func (in *Plugin) DeepCopy() *Plugin { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PreparedPlanCache) DeepCopyInto(out *PreparedPlanCache) { *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = new(uint) @@ -1450,6 +1575,11 @@ func (in *PrometheusSpec) DeepCopy() *PrometheusSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxyProtocol) DeepCopyInto(out *ProxyProtocol) { *out = *in + if in.Networks != nil { + in, out := &in.Networks, &out.Networks + *out = new(string) + **out = **in + } if in.HeaderTimeout != nil { in, out := &in.HeaderTimeout, &out.HeaderTimeout *out = new(uint) @@ -1671,6 +1801,41 @@ func (in *S3StorageProvider) DeepCopy() *S3StorageProvider { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Security) DeepCopyInto(out *Security) { *out = *in + if in.SkipGrantTable != nil { + in, out := &in.SkipGrantTable, &out.SkipGrantTable + *out = new(bool) + **out = **in + } + if in.SSLCA != nil { + in, out := &in.SSLCA, &out.SSLCA + *out = new(string) + **out = **in + } + if in.SSLCert != nil { + in, out := &in.SSLCert, &out.SSLCert + *out = new(string) + **out = **in + } + if in.SSLKey != nil { + in, out := &in.SSLKey, &out.SSLKey + *out = new(string) + **out = **in + } + if in.ClusterSSLCA != nil { + in, out := &in.ClusterSSLCA, &out.ClusterSSLCA + *out = new(string) + **out = **in + } + if in.ClusterSSLCert != nil { + in, out := &in.ClusterSSLCert, &out.ClusterSSLCert + *out = new(string) + **out = **in + } + if in.ClusterSSLKey != nil { + in, out := &in.ClusterSSLKey, &out.ClusterSSLKey + *out = new(string) + **out = **in + } return } @@ -1726,9 +1891,14 @@ func (in *ServiceSpec) DeepCopy() *ServiceSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Status) DeepCopyInto(out *Status) { *out = *in - if in.StatusPort != nil { - in, out := &in.StatusPort, &out.StatusPort - *out = new(uint) + if in.ReportStatus != nil { + in, out := &in.ReportStatus, &out.ReportStatus + *out = new(bool) + **out = **in + } + if in.MetricsAddr != nil { + in, out := &in.MetricsAddr, &out.MetricsAddr + *out = new(string) **out = **in } if in.MetricsInterval != nil { @@ -1736,6 +1906,11 @@ func (in *Status) DeepCopyInto(out *Status) { *out = new(uint) **out = **in } + if in.RecordQPSbyDB != nil { + in, out := &in.RecordQPSbyDB, &out.RecordQPSbyDB + *out = new(bool) + **out = **in + } return } @@ -1840,9 +2015,29 @@ func (in *TiDBAccessConfig) DeepCopy() *TiDBAccessConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TiDBConfig) DeepCopyInto(out *TiDBConfig) { *out = *in - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(uint) + if in.Cors != nil { + in, out := &in.Cors, &out.Cors + *out = new(string) + **out = **in + } + if in.Socket != nil { + in, out := &in.Socket, &out.Socket + *out = new(string) + **out = **in + } + if in.Lease != nil { + in, out := &in.Lease, &out.Lease + *out = new(string) + **out = **in + } + if in.RunDDL != nil { + in, out := &in.RunDDL, &out.RunDDL + *out = new(bool) + **out = **in + } + if in.SplitTable != nil { + in, out := &in.SplitTable, &out.SplitTable + *out = new(bool) **out = **in } if in.TokenLimit != nil { @@ -1850,11 +2045,26 @@ func (in *TiDBConfig) DeepCopyInto(out *TiDBConfig) { *out = new(uint) **out = **in } + if in.OOMAction != nil { + in, out := &in.OOMAction, &out.OOMAction + *out = new(string) + **out = **in + } if in.MemQuotaQuery != nil { in, out := &in.MemQuotaQuery, &out.MemQuotaQuery *out = new(int64) **out = **in } + if in.EnableStreaming != nil { + in, out := &in.EnableStreaming, &out.EnableStreaming + *out = new(bool) + **out = **in + } + if in.EnableBatchDML != nil { + in, out := &in.EnableBatchDML, &out.EnableBatchDML + *out = new(bool) + **out = **in + } if in.TxnLocalLatches != nil { in, out := &in.TxnLocalLatches, &out.TxnLocalLatches *out = new(TxnLocalLatches) @@ -1873,7 +2083,7 @@ func (in *TiDBConfig) DeepCopyInto(out *TiDBConfig) { if in.Security != nil { in, out := &in.Security, &out.Security *out = new(Security) - **out = **in + (*in).DeepCopyInto(*out) } if in.Status != nil { in, out := &in.Status, &out.Status @@ -1908,18 +2118,38 @@ func (in *TiDBConfig) DeepCopyInto(out *TiDBConfig) { if in.Binlog != nil { in, out := &in.Binlog, &out.Binlog *out = new(Binlog) + (*in).DeepCopyInto(*out) + } + if in.CompatibleKillQuery != nil { + in, out := &in.CompatibleKillQuery, &out.CompatibleKillQuery + *out = new(bool) **out = **in } if in.Plugin != nil { in, out := &in.Plugin, &out.Plugin *out = new(Plugin) - **out = **in + (*in).DeepCopyInto(*out) } if in.PessimisticTxn != nil { in, out := &in.PessimisticTxn, &out.PessimisticTxn *out = new(PessimisticTxn) (*in).DeepCopyInto(*out) } + if in.CheckMb4ValueInUTF8 != nil { + in, out := &in.CheckMb4ValueInUTF8, &out.CheckMb4ValueInUTF8 + *out = new(bool) + **out = **in + } + if in.AlterPrimaryKey != nil { + in, out := &in.AlterPrimaryKey, &out.AlterPrimaryKey + *out = new(bool) + **out = **in + } + if in.TreatOldVersionUTF8AsUTF8MB4 != nil { + in, out := &in.TreatOldVersionUTF8AsUTF8MB4, &out.TreatOldVersionUTF8AsUTF8MB4 + *out = new(bool) + **out = **in + } if in.SplitRegionMaxNum != nil { in, out := &in.SplitRegionMaxNum, &out.SplitRegionMaxNum *out = new(uint64) @@ -2285,6 +2515,11 @@ func (in *TiKVClient) DeepCopyInto(out *TiKVClient) { *out = new(uint) **out = **in } + if in.CommitTimeout != nil { + in, out := &in.CommitTimeout, &out.CommitTimeout + *out = new(string) + **out = **in + } if in.MaxTxnTimeUse != nil { in, out := &in.MaxTxnTimeUse, &out.MaxTxnTimeUse *out = new(uint) @@ -2323,52 +2558,6 @@ func (in *TiKVClient) DeepCopy() *TiKVClient { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TiKVComponentReadPoolConfig) DeepCopyInto(out *TiKVComponentReadPoolConfig) { - *out = *in - if in.HighConcurrency != nil { - in, out := &in.HighConcurrency, &out.HighConcurrency - *out = new(int64) - **out = **in - } - if in.NormalConcurrency != nil { - in, out := &in.NormalConcurrency, &out.NormalConcurrency - *out = new(int64) - **out = **in - } - if in.LowConcurrency != nil { - in, out := &in.LowConcurrency, &out.LowConcurrency - *out = new(int64) - **out = **in - } - if in.MaxTasksPerWorkerHigh != nil { - in, out := &in.MaxTasksPerWorkerHigh, &out.MaxTasksPerWorkerHigh - *out = new(int64) - **out = **in - } - if in.MaxTasksPerWorkerNormal != nil { - in, out := &in.MaxTasksPerWorkerNormal, &out.MaxTasksPerWorkerNormal - *out = new(int64) - **out = **in - } - if in.MaxTasksPerWorkerLow != nil { - in, out := &in.MaxTasksPerWorkerLow, &out.MaxTasksPerWorkerLow - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVComponentReadPoolConfig. -func (in *TiKVComponentReadPoolConfig) DeepCopy() *TiKVComponentReadPoolConfig { - if in == nil { - return nil - } - out := new(TiKVComponentReadPoolConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TiKVConfig) DeepCopyInto(out *TiKVConfig) { *out = *in @@ -2422,6 +2611,11 @@ func (in *TiKVConfig) DeepCopyInto(out *TiKVConfig) { *out = new(TiKVGCConfig) (*in).DeepCopyInto(*out) } + if in.PD != nil { + in, out := &in.PD, &out.PD + *out = new(TiKVPDConfig) + (*in).DeepCopyInto(*out) + } if in.Security != nil { in, out := &in.Security, &out.Security *out = new(TiKVSecurityConfig) @@ -2476,6 +2670,52 @@ func (in *TiKVCoprocessorConfig) DeepCopy() *TiKVCoprocessorConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TiKVCoprocessorReadPoolConfig) DeepCopyInto(out *TiKVCoprocessorReadPoolConfig) { + *out = *in + if in.HighConcurrency != nil { + in, out := &in.HighConcurrency, &out.HighConcurrency + *out = new(int64) + **out = **in + } + if in.NormalConcurrency != nil { + in, out := &in.NormalConcurrency, &out.NormalConcurrency + *out = new(int64) + **out = **in + } + if in.LowConcurrency != nil { + in, out := &in.LowConcurrency, &out.LowConcurrency + *out = new(int64) + **out = **in + } + if in.MaxTasksPerWorkerHigh != nil { + in, out := &in.MaxTasksPerWorkerHigh, &out.MaxTasksPerWorkerHigh + *out = new(int64) + **out = **in + } + if in.MaxTasksPerWorkerNormal != nil { + in, out := &in.MaxTasksPerWorkerNormal, &out.MaxTasksPerWorkerNormal + *out = new(int64) + **out = **in + } + if in.MaxTasksPerWorkerLow != nil { + in, out := &in.MaxTasksPerWorkerLow, &out.MaxTasksPerWorkerLow + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVCoprocessorReadPoolConfig. +func (in *TiKVCoprocessorReadPoolConfig) DeepCopy() *TiKVCoprocessorReadPoolConfig { + if in == nil { + return nil + } + out := new(TiKVCoprocessorReadPoolConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TiKVDbConfig) DeepCopyInto(out *TiKVDbConfig) { *out = *in @@ -2766,6 +3006,11 @@ func (in *TiKVRaftstoreConfig) DeepCopyInto(out *TiKVRaftstoreConfig) { *out = new(bool) **out = **in } + if in.Prevote != nil { + in, out := &in.Prevote, &out.Prevote + *out = new(bool) + **out = **in + } if in.RaftHeartbeatTicks != nil { in, out := &in.RaftHeartbeatTicks, &out.RaftHeartbeatTicks *out = new(int64) @@ -2879,12 +3124,12 @@ func (in *TiKVReadPoolConfig) DeepCopyInto(out *TiKVReadPoolConfig) { *out = *in if in.Coprocessor != nil { in, out := &in.Coprocessor, &out.Coprocessor - *out = new(TiKVComponentReadPoolConfig) + *out = new(TiKVCoprocessorReadPoolConfig) (*in).DeepCopyInto(*out) } if in.Storage != nil { in, out := &in.Storage, &out.Storage - *out = new(TiKVComponentReadPoolConfig) + *out = new(TiKVStorageReadPoolConfig) (*in).DeepCopyInto(*out) } return @@ -2929,6 +3174,11 @@ func (in *TiKVServerConfig) DeepCopyInto(out *TiKVServerConfig) { *out = new(uint) **out = **in } + if in.GrpcMemoryQuota != nil { + in, out := &in.GrpcMemoryQuota, &out.GrpcMemoryQuota + *out = new(string) + **out = **in + } if in.GrpcRaftConnNum != nil { in, out := &in.GrpcRaftConnNum, &out.GrpcRaftConnNum *out = new(uint) @@ -3110,6 +3360,52 @@ func (in *TiKVStorageConfig) DeepCopy() *TiKVStorageConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TiKVStorageReadPoolConfig) DeepCopyInto(out *TiKVStorageReadPoolConfig) { + *out = *in + if in.HighConcurrency != nil { + in, out := &in.HighConcurrency, &out.HighConcurrency + *out = new(int64) + **out = **in + } + if in.NormalConcurrency != nil { + in, out := &in.NormalConcurrency, &out.NormalConcurrency + *out = new(int64) + **out = **in + } + if in.LowConcurrency != nil { + in, out := &in.LowConcurrency, &out.LowConcurrency + *out = new(int64) + **out = **in + } + if in.MaxTasksPerWorkerHigh != nil { + in, out := &in.MaxTasksPerWorkerHigh, &out.MaxTasksPerWorkerHigh + *out = new(int64) + **out = **in + } + if in.MaxTasksPerWorkerNormal != nil { + in, out := &in.MaxTasksPerWorkerNormal, &out.MaxTasksPerWorkerNormal + *out = new(int64) + **out = **in + } + if in.MaxTasksPerWorkerLow != nil { + in, out := &in.MaxTasksPerWorkerLow, &out.MaxTasksPerWorkerLow + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiKVStorageReadPoolConfig. +func (in *TiKVStorageReadPoolConfig) DeepCopy() *TiKVStorageReadPoolConfig { + if in == nil { + return nil + } + out := new(TiKVStorageReadPoolConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TiKVStore) DeepCopyInto(out *TiKVStore) { *out = *in @@ -3608,6 +3904,11 @@ func (in *TidbMonitorStatus) DeepCopy() *TidbMonitorStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TxnLocalLatches) DeepCopyInto(out *TxnLocalLatches) { *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = new(bool) + **out = **in + } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity *out = new(uint) diff --git a/pkg/manager/member/tidb_member_manager.go b/pkg/manager/member/tidb_member_manager.go index 31ed4d4d81..d1f3053289 100644 --- a/pkg/manager/member/tidb_member_manager.go +++ b/pkg/manager/member/tidb_member_manager.go @@ -33,6 +33,7 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" v1 "k8s.io/client-go/listers/apps/v1" corelisters "k8s.io/client-go/listers/core/v1" + "k8s.io/utils/pointer" ) const ( @@ -414,17 +415,17 @@ func getTiDBConfigMap(tc *v1alpha1.TidbCluster) (*corev1.ConfigMap, error) { if config.Security == nil { config.Security = &v1alpha1.Security{} } - config.Security.ClusterSSLCA = serviceAccountCAPath - config.Security.ClusterSSLCert = path.Join(clusterCertPath, "cert") - config.Security.ClusterSSLKey = path.Join(clusterCertPath, "key") + config.Security.ClusterSSLCA = pointer.StringPtr(serviceAccountCAPath) + config.Security.ClusterSSLCert = pointer.StringPtr(path.Join(clusterCertPath, "cert")) + config.Security.ClusterSSLKey = pointer.StringPtr(path.Join(clusterCertPath, "key")) } if tc.Spec.TiDB.EnableTLSClient { if config.Security == nil { config.Security = &v1alpha1.Security{} } - config.Security.SSLCA = serviceAccountCAPath - config.Security.SSLCert = path.Join(serverCertPath, "cert") - config.Security.SSLKey = path.Join(serverCertPath, "key") + config.Security.SSLCA = pointer.StringPtr(serviceAccountCAPath) + config.Security.SSLCert = pointer.StringPtr(path.Join(serverCertPath, "cert")) + config.Security.SSLKey = pointer.StringPtr(path.Join(serverCertPath, "key")) } confText, err := MarshalTOML(config) if err != nil { diff --git a/pkg/manager/member/tidb_member_manager_test.go b/pkg/manager/member/tidb_member_manager_test.go index 5226960af3..9050da1a49 100644 --- a/pkg/manager/member/tidb_member_manager_test.go +++ b/pkg/manager/member/tidb_member_manager_test.go @@ -38,6 +38,7 @@ import ( kubefake "k8s.io/client-go/kubernetes/fake" corelisters "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" + "k8s.io/utils/pointer" ) func TestTiDBMemberManagerSyncCreate(t *testing.T) { @@ -1549,7 +1550,7 @@ func TestGetTiDBConfigMap(t *testing.T) { TiDB: v1alpha1.TiDBSpec{ ConfigUpdateStrategy: v1alpha1.ConfigUpdateStrategyInPlace, Config: &v1alpha1.TiDBConfig{ - Host: "0.0.0.0", + Lease: pointer.StringPtr("45s"), }, }, }, @@ -1581,7 +1582,7 @@ func TestGetTiDBConfigMap(t *testing.T) { }, Data: map[string]string{ "startup-script": "", - "config-file": `host = "0.0.0.0" + "config-file": `lease = "45s" `, }, }, diff --git a/tests/pkg/fixture/fixture.go b/tests/pkg/fixture/fixture.go index 6e30105058..c319c065e2 100644 --- a/tests/pkg/fixture/fixture.go +++ b/tests/pkg/fixture/fixture.go @@ -18,6 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/pointer" ) var ( @@ -93,9 +94,7 @@ func GetTidbCluster(ns, name, version string) *v1alpha1.TidbCluster { MaxFailoverCount: 3, Config: &v1alpha1.TiKVConfig{ LogLevel: "info", - Server: &v1alpha1.TiKVServerConfig{ - StatusAddr: "0.0.0.0:20180", - }, + Server: &v1alpha1.TiKVServerConfig{}, }, }, @@ -115,7 +114,7 @@ func GetTidbCluster(ns, name, version string) *v1alpha1.TidbCluster { MaxFailoverCount: 3, Config: &v1alpha1.TiDBConfig{ Log: &v1alpha1.Log{ - Level: "info", + Level: pointer.StringPtr("info"), }, }, },