From fc22e9df71a0ec6d71561348cd05998d85515852 Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Thu, 12 Mar 2020 17:33:18 +0800 Subject: [PATCH 1/8] update pd config --- go.mod | 1 + manifests/crd.yaml | 17 ++++++++++ .../pingcap/v1alpha1/openapi_generated.go | 34 ++++++++++++++++++- pkg/apis/pingcap/v1alpha1/pd_config.go | 29 +++++++++++++++- .../pingcap/v1alpha1/zz_generated.deepcopy.go | 21 ++++++++++++ 5 files changed, 100 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 8153d820a0..2189e575b1 100644 --- a/go.mod +++ b/go.mod @@ -70,6 +70,7 @@ require ( github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43 github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect + go.uber.org/zap v1.9.1 gocloud.dev v0.18.0 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e gomodules.xyz/jsonpatch/v2 v2.0.1 diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 5ad1b2b840..c7cc502fc3 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -1344,6 +1344,8 @@ spec: description: ElectionInterval is the interval for etcd Raft election. type: string + enable-dynamic-config: + type: boolean enable-grpc-gateway: description: 'Optional: Defaults to true' type: boolean @@ -1419,6 +1421,7 @@ spec: level: description: 'Log level. Optional: Defaults to info' type: string + sampling: {} type: object log-file: description: Backward compatibility. @@ -1456,6 +1459,10 @@ spec: replication: description: PDReplicationConfig is the replication configuration. properties: + enable-placement-rules: + description: When PlacementRules feature is enabled. MaxReplicas + and LocationLabels are not uesd any more. + type: string max-replicas: description: 'MaxReplicas is the number of replicas for each region. Immutable, change should be made through @@ -1640,6 +1647,14 @@ spec: be made through pd-ctl after cluster creation Optional: Defaults to 1h' type: string + store-limit-mode: + description: 'StoreLimitMode can be auto or manual, when + set to auto, PD tries to change the store limit values + according to the load state of the cluster dynamically. + User can overwrite the auto-tuned value by pd-ctl, when + the value is overwritten, the value is fixed until it + is deleted. Default: manual' + type: string tolerant-size-ratio: description: TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made @@ -1660,6 +1675,8 @@ spec: description: CertPath is the path of file that contains X509 certificate in PEM format. type: string + client-cert-auth: + type: boolean key-path: description: KeyPath is the path of file that contains X509 key in PEM format. diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index d47a960349..0051fd1a8b 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -1579,6 +1579,12 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com Format: "", }, }, + "enable-dynamic-config": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -1649,11 +1655,17 @@ func schema_pkg_apis_pingcap_v1alpha1_PDLogConfig(ref common.ReferenceCallback) Format: "", }, }, + "sampling": { + SchemaProps: spec.SchemaProps{ + Description: "SamplingConfig sets a sampling strategy for the logger. Sampling caps the global CPU and I/O load that logging puts on your process while attempting to preserve a representative subset of your logs.\n\nValues configured here are per-second. See zapcore.NewSampler for details.", + Ref: ref("go.uber.org/zap.SamplingConfig"), + }, + }, }, }, }, Dependencies: []string{ - "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.FileLogConfig"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.FileLogConfig", "go.uber.org/zap.SamplingConfig"}, } } @@ -1763,6 +1775,13 @@ func schema_pkg_apis_pingcap_v1alpha1_PDReplicationConfig(ref common.ReferenceCa Format: "", }, }, + "enable-placement-rules": { + SchemaProps: spec.SchemaProps{ + Description: "When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd any more.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -1965,6 +1984,13 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb }, }, }, + "store-limit-mode": { + SchemaProps: spec.SchemaProps{ + Description: "StoreLimitMode can be auto or manual, when set to auto, PD tries to change the store limit values according to the load state of the cluster dynamically. User can overwrite the auto-tuned value by pd-ctl, when the value is overwritten, the value is fixed until it is deleted. Default: manual", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -2042,6 +2068,12 @@ func schema_pkg_apis_pingcap_v1alpha1_PDSecurityConfig(ref common.ReferenceCallb Format: "", }, }, + "client-cert-auth": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, diff --git a/pkg/apis/pingcap/v1alpha1/pd_config.go b/pkg/apis/pingcap/v1alpha1/pd_config.go index bc75c1f659..3a0883e80c 100644 --- a/pkg/apis/pingcap/v1alpha1/pd_config.go +++ b/pkg/apis/pingcap/v1alpha1/pd_config.go @@ -16,6 +16,8 @@ package v1alpha1 import ( "strconv" "strings" + + "go.uber.org/zap" ) // Maintain a copy of PDConfig to make it more friendly with the kubernetes API: @@ -33,7 +35,6 @@ import ( // PDConfig is the configuration of pd-server // +k8s:openapi-gen=true type PDConfig struct { - // +optional ForceNewCluster *bool `json:"force-new-cluster,omitempty"` // Optional: Defaults to true @@ -124,6 +125,9 @@ type PDConfig struct { // Optional: Defaults to true // +optional NamespaceClassifier string `toml:"namespace-classifier,omitempty" json:"namespace-classifier,omitempty"` + + // +optional + EnableDynamicConfig *bool `toml:"enable-dynamic-config" json:"enable-dynamic-config,omitempty"` } // PDLogConfig serializes log related config in toml/json. @@ -159,6 +163,14 @@ type PDLogConfig struct { // message. // +optional DisableErrorVerbose *bool `toml:"disable-error-verbose,omitempty" json:"disable-error-verbose,omitempty"` + + // SamplingConfig sets a sampling strategy for the logger. Sampling caps the + // global CPU and I/O load that logging puts on your process while attempting + // to preserve a representative subset of your logs. + // + // Values configured here are per-second. See zapcore.NewSampler for details. + // +optional + Sampling *zap.SamplingConfig `toml:"sampling" json:"sampling,omitempty"` } // PDReplicationConfig is the replication configuration. @@ -182,6 +194,10 @@ type PDReplicationConfig struct { // 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"` + + // When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd any more. + // +optional + EnablePlacementRules *bool `toml:"enable-placement-rules" json:"enable-placement-rules,string,omitempty"` } // PDNamespaceConfig is to overwrite the global setting for specific namespace @@ -341,6 +357,15 @@ type PDScheduleConfig struct { // Only used to display // +optional SchedulersPayload map[string]string `toml:"schedulers-payload" json:"schedulers-payload,omitempty"` + + // StoreLimitMode can be auto or manual, when set to auto, + // PD tries to change the store limit values according to + // the load state of the cluster dynamically. User can + // overwrite the auto-tuned value by pd-ctl, when the value + // is overwritten, the value is fixed until it is deleted. + // Default: manual + // +optional + StoreLimitMode *string `toml:"store-limit-mode" json:"store-limit-mode,omitempty"` } type PDSchedulerConfigs []PDSchedulerConfig @@ -384,6 +409,8 @@ type PDSecurityConfig struct { // KeyPath is the path of file that contains X509 key in PEM format. // +optional KeyPath string `toml:"key-path,omitempty" json:"key-path,omitempty"` + // +optional + ClientCertAuth bool `toml:"client-cert-auth" json:"client-cert-auth,omitempty"` } // PDServerConfig is the configuration for pd server. diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index e8ed1ac39c..32244ae8c8 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -18,6 +18,7 @@ package v1alpha1 import ( + zap "go.uber.org/zap" appsv1 "k8s.io/api/apps/v1" v2beta2 "k8s.io/api/autoscaling/v2beta2" v1 "k8s.io/api/core/v1" @@ -964,6 +965,11 @@ func (in *PDConfig) DeepCopyInto(out *PDConfig) { } } } + if in.EnableDynamicConfig != nil { + in, out := &in.EnableDynamicConfig, &out.EnableDynamicConfig + *out = new(bool) + **out = **in + } return } @@ -1057,6 +1063,11 @@ func (in *PDLogConfig) DeepCopyInto(out *PDLogConfig) { *out = new(bool) **out = **in } + if in.Sampling != nil { + in, out := &in.Sampling, &out.Sampling + *out = new(zap.SamplingConfig) + **out = **in + } return } @@ -1182,6 +1193,11 @@ func (in *PDReplicationConfig) DeepCopyInto(out *PDReplicationConfig) { *out = new(bool) **out = **in } + if in.EnablePlacementRules != nil { + in, out := &in.EnablePlacementRules, &out.EnablePlacementRules + *out = new(bool) + **out = **in + } return } @@ -1316,6 +1332,11 @@ func (in *PDScheduleConfig) DeepCopyInto(out *PDScheduleConfig) { (*out)[key] = val } } + if in.StoreLimitMode != nil { + in, out := &in.StoreLimitMode, &out.StoreLimitMode + *out = new(string) + **out = **in + } return } From aa0832465d6feb48b908af15786495f9f5d57dc7 Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Mon, 23 Mar 2020 13:31:09 +0800 Subject: [PATCH 2/8] updated v3.1.0 configuration --- manifests/crd.yaml | 24 ++++++++++++++--- .../pingcap/v1alpha1/openapi_generated.go | 27 ++++++++++++++++--- pkg/apis/pingcap/v1alpha1/pd_config.go | 17 ++++++++++++ .../pingcap/v1alpha1/zz_generated.deepcopy.go | 15 +++++++++++ 4 files changed, 77 insertions(+), 6 deletions(-) diff --git a/manifests/crd.yaml b/manifests/crd.yaml index a36a3631e0..ccfcfd77e9 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -1446,6 +1446,11 @@ spec: pd-server: description: PDServerConfig is the configuration for pd server. properties: + metric-storage: + description: MetricStorage is the cluster metric storage. + Currently we use prometheus as metric storage, we may + use PD/TiKV as metric storage later. imported from v3.1.0 + type: string use-region-storage: description: UseRegionStorage enables the independent region storage. @@ -1472,7 +1477,8 @@ spec: strictly-match-label: description: StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. Immutable, change - should be made through pd-ctl after cluster creation + should be made through pd-ctl after cluster creation imported + from v3.1.0 type: string type: object schedule: @@ -1518,6 +1524,17 @@ spec: Immutable, change should be made through pd-ctl after cluster creation type: string + enable-cross-table-merge: + description: EnableCrossTableMerge is the option to enable + cross table merge. This means two Regions can be merged + with different table IDs. This option only works when + key type is "table". imported from v3.1.0 + type: string + enable-one-way-merge: + description: EnableOneWayMerge is the option to enable one + way merge. This means a Region can only be merged into + the next region of it. imported from v3.1.0 + type: string high-space-ratio: description: HighSpaceRatio is the highest usage ratio of store which regraded as high space. High space means there @@ -1544,7 +1561,8 @@ spec: leader-schedule-limit: description: 'LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl - after cluster creation Optional: Defaults to 4' + after cluster creation Optional: Defaults to 4 imported + from v3.1.0' format: int64 type: integer low-space-ratio: @@ -1658,7 +1676,7 @@ spec: tolerant-size-ratio: description: TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made - through pd-ctl after cluster creation + through pd-ctl after cluster creation imported from v3.1.0 format: double type: number type: object diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 75af860e52..e554dfe714 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -1777,7 +1777,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. Immutable, change should be made through pd-ctl after cluster creation", + Description: "StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. Immutable, change should be made through pd-ctl after cluster creation imported from v3.1.0", Type: []string{"string"}, Format: "", }, @@ -1853,7 +1853,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb }, "leader-schedule-limit": { SchemaProps: spec.SchemaProps{ - Description: "LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 4", + Description: "LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 4 imported from v3.1.0", Type: []string{"integer"}, Format: "int64", }, @@ -1895,7 +1895,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb }, "tolerant-size-ratio": { SchemaProps: spec.SchemaProps{ - Description: "TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made through pd-ctl after cluster creation", + Description: "TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made through pd-ctl after cluster creation imported from v3.1.0", Type: []string{"number"}, Format: "double", }, @@ -1998,6 +1998,20 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb Format: "", }, }, + "enable-one-way-merge": { + SchemaProps: spec.SchemaProps{ + Description: "EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. imported from v3.1.0", + Type: []string{"string"}, + Format: "", + }, + }, + "enable-cross-table-merge": { + SchemaProps: spec.SchemaProps{ + Description: "EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. This option only works when key type is \"table\". imported from v3.1.0", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -2101,6 +2115,13 @@ func schema_pkg_apis_pingcap_v1alpha1_PDServerConfig(ref common.ReferenceCallbac Format: "", }, }, + "metric-storage": { + SchemaProps: spec.SchemaProps{ + Description: "MetricStorage is the cluster metric storage. Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. imported from v3.1.0", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/pkg/apis/pingcap/v1alpha1/pd_config.go b/pkg/apis/pingcap/v1alpha1/pd_config.go index 3a0883e80c..aecbb072fb 100644 --- a/pkg/apis/pingcap/v1alpha1/pd_config.go +++ b/pkg/apis/pingcap/v1alpha1/pd_config.go @@ -192,6 +192,7 @@ type PDReplicationConfig struct { 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 + // imported from v3.1.0 // +optional StrictlyMatchLabel *bool `toml:"strictly-match-label,omitempty" json:"strictly-match-label,string,omitempty"` @@ -265,6 +266,7 @@ type PDScheduleConfig struct { // LeaderScheduleLimit is the max coexist leader schedules. // Immutable, change should be made through pd-ctl after cluster creation // Optional: Defaults to 4 + // imported from v3.1.0 // +optional LeaderScheduleLimit *uint64 `toml:"leader-schedule-limit,omitempty" json:"leader-schedule-limit,omitempty"` // RegionScheduleLimit is the max coexist region schedules. @@ -295,6 +297,7 @@ type PDScheduleConfig struct { HotRegionCacheHitsThreshold *uint64 `toml:"hot-region-cache-hits-threshold,omitempty" json:"hot-region-cache-hits-threshold,omitempty"` // TolerantSizeRatio is the ratio of buffer size for balance scheduler. // Immutable, change should be made through pd-ctl after cluster creation + // imported from v3.1.0 // +optional TolerantSizeRatio *float64 `toml:"tolerant-size-ratio,omitempty" json:"tolerant-size-ratio,omitempty"` // @@ -366,6 +369,15 @@ type PDScheduleConfig struct { // Default: manual // +optional StoreLimitMode *string `toml:"store-limit-mode" json:"store-limit-mode,omitempty"` + // EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. + // imported from v3.1.0 + // +optional + EnableOneWayMerge *bool `toml:"enable-one-way-merge" json:"enable-one-way-merge,string,omitempty"` + // EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. + // This option only works when key type is "table". + // imported from v3.1.0 + // +optional + EnableCrossTableMerge *bool `toml:"enable-cross-table-merge" json:"enable-cross-table-merge,string,omitempty"` } type PDSchedulerConfigs []PDSchedulerConfig @@ -419,6 +431,11 @@ type PDServerConfig struct { // UseRegionStorage enables the independent region storage. // +optional UseRegionStorage *bool `toml:"use-region-storage,omitempty" json:"use-region-storage,string,omitempty"` + // MetricStorage is the cluster metric storage. + // Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. + // imported from v3.1.0 + // +optional + MetricStorage *string `toml:"metric-storage" json:"metric-storage,omitempty"` } // +k8s:openapi-gen=true diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index 32244ae8c8..d3c83e400f 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -1337,6 +1337,16 @@ func (in *PDScheduleConfig) DeepCopyInto(out *PDScheduleConfig) { *out = new(string) **out = **in } + if in.EnableOneWayMerge != nil { + in, out := &in.EnableOneWayMerge, &out.EnableOneWayMerge + *out = new(bool) + **out = **in + } + if in.EnableCrossTableMerge != nil { + in, out := &in.EnableCrossTableMerge, &out.EnableCrossTableMerge + *out = new(bool) + **out = **in + } return } @@ -1422,6 +1432,11 @@ func (in *PDServerConfig) DeepCopyInto(out *PDServerConfig) { *out = new(bool) **out = **in } + if in.MetricStorage != nil { + in, out := &in.MetricStorage, &out.MetricStorage + *out = new(string) + **out = **in + } return } From bb76db04e05f121a56a2a59ca17a7b025f5cedcd Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Mon, 23 Mar 2020 13:52:33 +0800 Subject: [PATCH 3/8] update docs.html --- docs/api-references/docs.html | 116 +++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 3 deletions(-) diff --git a/docs/api-references/docs.html b/docs/api-references/docs.html index 286be033d2..60bcd88205 100644 --- a/docs/api-references/docs.html +++ b/docs/api-references/docs.html @@ -3876,6 +3876,17 @@
enable-dynamic-config
+
+bool
+
+sampling
+
+go.uber.org/zap.SamplingConfig
+
+SamplingConfig sets a sampling strategy for the logger. Sampling caps the +global CPU and I/O load that logging puts on your process while attempting +to preserve a representative subset of your logs.
+Values configured here are per-second. See zapcore.NewSampler for details.
+StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. -Immutable, change should be made through pd-ctl after cluster creation
+Immutable, change should be made through pd-ctl after cluster creation +imported from v3.1.0 +enable-placement-rules,string
+
+bool
+
+When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd any more.
LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl after cluster creation -Optional: Defaults to 4
+Optional: Defaults to 4 +imported from v3.1.0TolerantSizeRatio is the ratio of buffer size for balance scheduler. -Immutable, change should be made through pd-ctl after cluster creation
+Immutable, change should be made through pd-ctl after cluster creation +imported from v3.1.0Only used to display
store-limit-mode
+
+string
+
+StoreLimitMode can be auto or manual, when set to auto, +PD tries to change the store limit values according to +the load state of the cluster dynamically. User can +overwrite the auto-tuned value by pd-ctl, when the value +is overwritten, the value is fixed until it is deleted. +Default: manual
+enable-one-way-merge,string
+
+bool
+
+EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. +imported from v3.1.0
+enable-cross-table-merge,string
+
+bool
+
+EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. +This option only works when key type is “table”. +imported from v3.1.0
+KeyPath is the path of file that contains X509 key in PEM format.
+client-cert-auth
+
+bool
+
+UseRegionStorage enables the independent region storage.
+metric-storage
+
+string
+
+MetricStorage is the cluster metric storage. +Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. +imported from v3.1.0
+enable-dynamic-config
-
-bool
-
-sampling
-
-go.uber.org/zap.SamplingConfig
-
-SamplingConfig sets a sampling strategy for the logger. Sampling caps the -global CPU and I/O load that logging puts on your process while attempting -to preserve a representative subset of your logs.
-Values configured here are per-second. See zapcore.NewSampler for details.
-store-limit-mode
-
-string
-
-StoreLimitMode can be auto or manual, when set to auto, -PD tries to change the store limit values according to -the load state of the cluster dynamically. User can -overwrite the auto-tuned value by pd-ctl, when the value -is overwritten, the value is fixed until it is deleted. -Default: manual
-enable-one-way-merge,string
bool
@@ -4930,17 +4887,6 @@ KeyPath is the path of file that contains X509 key in PEM format.
client-cert-auth
-
-bool
-
-StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. -Immutable, change should be made through pd-ctl after cluster creation -imported from v3.1.0
+Immutable, change should be made through pd-ctl after cluster creation. +Imported from v3.1.0LeaderScheduleLimit is the max coexist leader schedules. -Immutable, change should be made through pd-ctl after cluster creation -Optional: Defaults to 4 -imported from v3.1.0
+Immutable, change should be made through pd-ctl after cluster creation. +Optional: Defaults to 4. +Imported from v3.1.0TolerantSizeRatio is the ratio of buffer size for balance scheduler. -Immutable, change should be made through pd-ctl after cluster creation -imported from v3.1.0
+Immutable, change should be made through pd-ctl after cluster creation. +Imported from v3.1.0EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. -imported from v3.1.0
+Imported from v3.1.0EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. This option only works when key type is “table”. -imported from v3.1.0
+Imported from v3.1.0MetricStorage is the cluster metric storage. Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. -imported from v3.1.0
+Imported from v3.1.0 diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 702784c663..82319d3035 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -1446,7 +1446,7 @@ spec: metric-storage: description: MetricStorage is the cluster metric storage. Currently we use prometheus as metric storage, we may - use PD/TiKV as metric storage later. imported from v3.1.0 + use PD/TiKV as metric storage later. Imported from v3.1.0 type: string use-region-storage: description: UseRegionStorage enables the independent region @@ -1474,8 +1474,8 @@ spec: strictly-match-label: description: StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. Immutable, change - should be made through pd-ctl after cluster creation imported - from v3.1.0 + should be made through pd-ctl after cluster creation. + Imported from v3.1.0 type: string type: object schedule: @@ -1525,12 +1525,12 @@ spec: description: EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. This option only works when - key type is "table". imported from v3.1.0 + key type is "table". Imported from v3.1.0 type: string enable-one-way-merge: description: EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into - the next region of it. imported from v3.1.0 + the next region of it. Imported from v3.1.0 type: string high-space-ratio: description: HighSpaceRatio is the highest usage ratio of @@ -1558,7 +1558,7 @@ spec: leader-schedule-limit: description: 'LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl - after cluster creation Optional: Defaults to 4 imported + after cluster creation. Optional: Defaults to 4. Imported from v3.1.0' format: int64 type: integer @@ -1665,7 +1665,7 @@ spec: tolerant-size-ratio: description: TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made - through pd-ctl after cluster creation imported from v3.1.0 + through pd-ctl after cluster creation. Imported from v3.1.0 format: double type: number type: object diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 944ed491bf..43ced8f3e3 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -1766,7 +1766,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. Immutable, change should be made through pd-ctl after cluster creation imported from v3.1.0", + Description: "StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. Immutable, change should be made through pd-ctl after cluster creation. Imported from v3.1.0", Type: []string{"string"}, Format: "", }, @@ -1842,7 +1842,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb }, "leader-schedule-limit": { SchemaProps: spec.SchemaProps{ - Description: "LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl after cluster creation Optional: Defaults to 4 imported from v3.1.0", + Description: "LeaderScheduleLimit is the max coexist leader schedules. Immutable, change should be made through pd-ctl after cluster creation. Optional: Defaults to 4. Imported from v3.1.0", Type: []string{"integer"}, Format: "int64", }, @@ -1884,7 +1884,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb }, "tolerant-size-ratio": { SchemaProps: spec.SchemaProps{ - Description: "TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made through pd-ctl after cluster creation imported from v3.1.0", + Description: "TolerantSizeRatio is the ratio of buffer size for balance scheduler. Immutable, change should be made through pd-ctl after cluster creation. Imported from v3.1.0", Type: []string{"number"}, Format: "double", }, @@ -1982,14 +1982,14 @@ func schema_pkg_apis_pingcap_v1alpha1_PDScheduleConfig(ref common.ReferenceCallb }, "enable-one-way-merge": { SchemaProps: spec.SchemaProps{ - Description: "EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. imported from v3.1.0", + Description: "EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. Imported from v3.1.0", Type: []string{"string"}, Format: "", }, }, "enable-cross-table-merge": { SchemaProps: spec.SchemaProps{ - Description: "EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. This option only works when key type is \"table\". imported from v3.1.0", + Description: "EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. This option only works when key type is \"table\". Imported from v3.1.0", Type: []string{"string"}, Format: "", }, @@ -2093,7 +2093,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDServerConfig(ref common.ReferenceCallbac }, "metric-storage": { SchemaProps: spec.SchemaProps{ - Description: "MetricStorage is the cluster metric storage. Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. imported from v3.1.0", + Description: "MetricStorage is the cluster metric storage. Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. Imported from v3.1.0", Type: []string{"string"}, Format: "", }, diff --git a/pkg/apis/pingcap/v1alpha1/pd_config.go b/pkg/apis/pingcap/v1alpha1/pd_config.go index 7556f92898..e308e37548 100644 --- a/pkg/apis/pingcap/v1alpha1/pd_config.go +++ b/pkg/apis/pingcap/v1alpha1/pd_config.go @@ -178,8 +178,8 @@ type PDReplicationConfig struct { // +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 - // imported from v3.1.0 + // Immutable, change should be made through pd-ctl after cluster creation. + // Imported from v3.1.0 // +optional StrictlyMatchLabel *bool `toml:"strictly-match-label,omitempty" json:"strictly-match-label,string,omitempty"` @@ -251,9 +251,9 @@ type PDScheduleConfig struct { // +optional MaxStoreDownTime string `toml:"max-store-down-time,omitempty" json:"max-store-down-time,omitempty"` // LeaderScheduleLimit is the max coexist leader schedules. - // Immutable, change should be made through pd-ctl after cluster creation - // Optional: Defaults to 4 - // imported from v3.1.0 + // Immutable, change should be made through pd-ctl after cluster creation. + // Optional: Defaults to 4. + // Imported from v3.1.0 // +optional LeaderScheduleLimit *uint64 `toml:"leader-schedule-limit,omitempty" json:"leader-schedule-limit,omitempty"` // RegionScheduleLimit is the max coexist region schedules. @@ -283,8 +283,8 @@ type PDScheduleConfig struct { // +optional HotRegionCacheHitsThreshold *uint64 `toml:"hot-region-cache-hits-threshold,omitempty" json:"hot-region-cache-hits-threshold,omitempty"` // TolerantSizeRatio is the ratio of buffer size for balance scheduler. - // Immutable, change should be made through pd-ctl after cluster creation - // imported from v3.1.0 + // Immutable, change should be made through pd-ctl after cluster creation. + // Imported from v3.1.0 // +optional TolerantSizeRatio *float64 `toml:"tolerant-size-ratio,omitempty" json:"tolerant-size-ratio,omitempty"` // @@ -349,12 +349,12 @@ type PDScheduleConfig struct { SchedulersPayload map[string]string `toml:"schedulers-payload" json:"schedulers-payload,omitempty"` // EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. - // imported from v3.1.0 + // Imported from v3.1.0 // +optional EnableOneWayMerge *bool `toml:"enable-one-way-merge" json:"enable-one-way-merge,string,omitempty"` // EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. // This option only works when key type is "table". - // imported from v3.1.0 + // Imported from v3.1.0 // +optional EnableCrossTableMerge *bool `toml:"enable-cross-table-merge" json:"enable-cross-table-merge,string,omitempty"` } @@ -410,7 +410,7 @@ type PDServerConfig struct { UseRegionStorage *bool `toml:"use-region-storage,omitempty" json:"use-region-storage,string,omitempty"` // MetricStorage is the cluster metric storage. // Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. - // imported from v3.1.0 + // Imported from v3.1.0 // +optional MetricStorage *string `toml:"metric-storage" json:"metric-storage,omitempty"` } From cbe0713b4d9ad5c18d286347f1947170b0f416d2 Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Mon, 23 Mar 2020 16:52:03 +0800 Subject: [PATCH 7/8] fix typo error --- docs/api-references/docs.html | 2 +- manifests/crd.yaml | 2 +- pkg/apis/pingcap/v1alpha1/openapi_generated.go | 2 +- pkg/apis/pingcap/v1alpha1/pd_config.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api-references/docs.html b/docs/api-references/docs.html index 21287666be..2cb38ad2bb 100644 --- a/docs/api-references/docs.html +++ b/docs/api-references/docs.html @@ -4368,7 +4368,7 @@When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd any more.
+When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd anymore.
When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd anymore.
+When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not used anymore.