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 @@

PDConfig Optional: Defaults to true

+ + +enable-dynamic-config
+ +bool + + + +(Optional) + +

PDFailureMember @@ -4078,6 +4089,21 @@

PDLogConfig message.

+ + +sampling
+ +go.uber.org/zap.SamplingConfig + + + +(Optional) +

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.

+ +

PDMember @@ -4355,7 +4381,20 @@

PDReplicationConfig (Optional)

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 + + + +(Optional) +

When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd any more.

@@ -4487,7 +4526,8 @@

PDScheduleConfig (Optional)

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

@@ -4571,7 +4611,8 @@

PDScheduleConfig (Optional)

TolerantSizeRatio 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.0

@@ -4731,6 +4772,50 @@

PDScheduleConfig

Only used to display

+ + +store-limit-mode
+ +string + + + +(Optional) +

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 + + + +(Optional) +

EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. +imported from v3.1.0

+ + + + +enable-cross-table-merge,string
+ +bool + + + +(Optional) +

EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. +This option only works when key type is “table”. +imported from v3.1.0

+ +

PDSchedulerConfig @@ -4845,6 +4930,17 @@

PDSecurityConfig

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

+ + +client-cert-auth
+ +bool + + + +(Optional) + +

PDServerConfig @@ -4876,6 +4972,20 @@

PDServerConfig

UseRegionStorage enables the independent region storage.

+ + +metric-storage
+ +string + + + +(Optional) +

MetricStorage is the cluster metric storage. +Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. +imported from v3.1.0

+ +

PDSpec From 93f13bc18b358ce048446989ac7791ca30f22eae Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Mon, 23 Mar 2020 14:42:11 +0800 Subject: [PATCH 4/8] remove unnecessary configuration --- docs/api-references/docs.html | 54 ------------------- manifests/crd.yaml | 13 ----- .../pingcap/v1alpha1/openapi_generated.go | 27 +--------- pkg/apis/pingcap/v1alpha1/pd_config.go | 23 -------- .../pingcap/v1alpha1/zz_generated.deepcopy.go | 16 ------ 5 files changed, 1 insertion(+), 132 deletions(-) diff --git a/docs/api-references/docs.html b/docs/api-references/docs.html index 60bcd88205..ec633fbef6 100644 --- a/docs/api-references/docs.html +++ b/docs/api-references/docs.html @@ -3876,17 +3876,6 @@

PDConfig Optional: Defaults to true

- - -enable-dynamic-config
- -bool - - - -(Optional) - -

PDFailureMember @@ -4089,21 +4078,6 @@

PDLogConfig message.

- - -sampling
- -go.uber.org/zap.SamplingConfig - - - -(Optional) -

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.

- -

PDMember @@ -4774,23 +4748,6 @@

PDScheduleConfig -store-limit-mode
- -string - - - -(Optional) -

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 @@

PDSecurityConfig

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

- - -client-cert-auth
- -bool - - - -(Optional) - -

PDServerConfig diff --git a/manifests/crd.yaml b/manifests/crd.yaml index fbf1a279b1..702784c663 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -1344,8 +1344,6 @@ 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 @@ -1421,7 +1419,6 @@ spec: level: description: 'Log level. Optional: Defaults to info' type: string - sampling: {} type: object log-file: description: Backward compatibility. @@ -1665,14 +1662,6 @@ 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 @@ -1693,8 +1682,6 @@ 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 a9d32fbcf7..944ed491bf 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -1587,12 +1587,6 @@ func schema_pkg_apis_pingcap_v1alpha1_PDConfig(ref common.ReferenceCallback) com Format: "", }, }, - "enable-dynamic-config": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, }, }, }, @@ -1663,17 +1657,11 @@ 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", "go.uber.org/zap.SamplingConfig"}, + "github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.FileLogConfig"}, } } @@ -1992,13 +1980,6 @@ 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: "", - }, - }, "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", @@ -2090,12 +2071,6 @@ 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 aecbb072fb..7556f92898 100644 --- a/pkg/apis/pingcap/v1alpha1/pd_config.go +++ b/pkg/apis/pingcap/v1alpha1/pd_config.go @@ -16,8 +16,6 @@ package v1alpha1 import ( "strconv" "strings" - - "go.uber.org/zap" ) // Maintain a copy of PDConfig to make it more friendly with the kubernetes API: @@ -125,9 +123,6 @@ 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. @@ -163,14 +158,6 @@ 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. @@ -361,14 +348,6 @@ type PDScheduleConfig struct { // +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"` // 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 @@ -421,8 +400,6 @@ 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 78d839d499..e676ac15f2 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -18,7 +18,6 @@ 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" @@ -970,11 +969,6 @@ func (in *PDConfig) DeepCopyInto(out *PDConfig) { } } } - if in.EnableDynamicConfig != nil { - in, out := &in.EnableDynamicConfig, &out.EnableDynamicConfig - *out = new(bool) - **out = **in - } return } @@ -1068,11 +1062,6 @@ 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 } @@ -1337,11 +1326,6 @@ func (in *PDScheduleConfig) DeepCopyInto(out *PDScheduleConfig) { (*out)[key] = val } } - if in.StoreLimitMode != nil { - in, out := &in.StoreLimitMode, &out.StoreLimitMode - *out = new(string) - **out = **in - } if in.EnableOneWayMerge != nil { in, out := &in.EnableOneWayMerge, &out.EnableOneWayMerge *out = new(bool) From 24d6cac10af9c659ed2272fb9f30539faf9170d4 Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Mon, 23 Mar 2020 14:47:46 +0800 Subject: [PATCH 5/8] fix go mod tidy --- go.mod | 1 - 1 file changed, 1 deletion(-) diff --git a/go.mod b/go.mod index 2189e575b1..8153d820a0 100644 --- a/go.mod +++ b/go.mod @@ -70,7 +70,6 @@ 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 From 0a32933ebe2961874a7f4971b73a63225305497d Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Mon, 23 Mar 2020 14:56:07 +0800 Subject: [PATCH 6/8] revise Note --- docs/api-references/docs.html | 20 +++++++++---------- manifests/crd.yaml | 14 ++++++------- .../pingcap/v1alpha1/openapi_generated.go | 12 +++++------ pkg/apis/pingcap/v1alpha1/pd_config.go | 20 +++++++++---------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/docs/api-references/docs.html b/docs/api-references/docs.html index ec633fbef6..21287666be 100644 --- a/docs/api-references/docs.html +++ b/docs/api-references/docs.html @@ -4355,8 +4355,8 @@

PDReplicationConfig (Optional)

StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels. -Immutable, change should be made through pd-ctl after cluster creation -imported from v3.1.0

+Immutable, change should be made through pd-ctl after cluster creation. +Imported from v3.1.0

@@ -4499,9 +4499,9 @@

PDScheduleConfig (Optional)

LeaderScheduleLimit is the max coexist leader schedules. -Immutable, change should be made through pd-ctl after cluster creation -Optional: Defaults to 4 -imported from v3.1.0

+Immutable, change should be made through pd-ctl after cluster creation. +Optional: Defaults to 4. +Imported from v3.1.0

@@ -4585,8 +4585,8 @@

PDScheduleConfig (Optional)

TolerantSizeRatio is the ratio of buffer size for balance scheduler. -Immutable, change should be made through pd-ctl after cluster creation -imported from v3.1.0

+Immutable, change should be made through pd-ctl after cluster creation. +Imported from v3.1.0

@@ -4756,7 +4756,7 @@

PDScheduleConfig (Optional)

EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it. -imported from v3.1.0

+Imported from v3.1.0

@@ -4770,7 +4770,7 @@

PDScheduleConfig (Optional)

EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs. This option only works when key type is “table”. -imported from v3.1.0

+Imported from v3.1.0

@@ -4929,7 +4929,7 @@

PDServerConfig (Optional)

MetricStorage is the cluster metric storage. Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later. -imported from v3.1.0

+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 @@

PDReplicationConfig (Optional) -

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.

diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 82319d3035..e9ce685ce3 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -1463,7 +1463,7 @@ spec: properties: enable-placement-rules: description: When PlacementRules feature is enabled. MaxReplicas - and LocationLabels are not uesd any more. + and LocationLabels are not uesd anymore. type: string max-replicas: description: 'MaxReplicas is the number of replicas for diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 43ced8f3e3..cd851d0f53 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -1773,7 +1773,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDReplicationConfig(ref common.ReferenceCa }, "enable-placement-rules": { SchemaProps: spec.SchemaProps{ - Description: "When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd any more.", + Description: "When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd anymore.", Type: []string{"string"}, Format: "", }, diff --git a/pkg/apis/pingcap/v1alpha1/pd_config.go b/pkg/apis/pingcap/v1alpha1/pd_config.go index e308e37548..b8012b5a18 100644 --- a/pkg/apis/pingcap/v1alpha1/pd_config.go +++ b/pkg/apis/pingcap/v1alpha1/pd_config.go @@ -183,7 +183,7 @@ type PDReplicationConfig struct { // +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. + // When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd anymore. // +optional EnablePlacementRules *bool `toml:"enable-placement-rules" json:"enable-placement-rules,string,omitempty"` } From 6aacf61494142ab7d1929af06a0a880e5c6915bf Mon Sep 17 00:00:00 2001 From: Song Gao <2695690803@qq.com> Date: Mon, 23 Mar 2020 17:36:52 +0800 Subject: [PATCH 8/8] fix typo --- 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 2cb38ad2bb..3088e5bdd8 100644 --- a/docs/api-references/docs.html +++ b/docs/api-references/docs.html @@ -4368,7 +4368,7 @@

PDReplicationConfig (Optional) -

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

+

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

diff --git a/manifests/crd.yaml b/manifests/crd.yaml index e9ce685ce3..1e972929ac 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -1463,7 +1463,7 @@ spec: properties: enable-placement-rules: description: When PlacementRules feature is enabled. MaxReplicas - and LocationLabels are not uesd anymore. + and LocationLabels are not used anymore. type: string max-replicas: description: 'MaxReplicas is the number of replicas for diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index cd851d0f53..36d315ab1a 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -1773,7 +1773,7 @@ func schema_pkg_apis_pingcap_v1alpha1_PDReplicationConfig(ref common.ReferenceCa }, "enable-placement-rules": { SchemaProps: spec.SchemaProps{ - Description: "When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd anymore.", + Description: "When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not used anymore.", Type: []string{"string"}, Format: "", }, diff --git a/pkg/apis/pingcap/v1alpha1/pd_config.go b/pkg/apis/pingcap/v1alpha1/pd_config.go index b8012b5a18..e7ed6429c3 100644 --- a/pkg/apis/pingcap/v1alpha1/pd_config.go +++ b/pkg/apis/pingcap/v1alpha1/pd_config.go @@ -183,7 +183,7 @@ type PDReplicationConfig struct { // +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 anymore. + // When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not used anymore. // +optional EnablePlacementRules *bool `toml:"enable-placement-rules" json:"enable-placement-rules,string,omitempty"` }