diff --git a/docs/api-references/docs.html b/docs/api-references/docs.html
index 5ad25b202e..1a60532ed0 100644
--- a/docs/api-references/docs.html
+++ b/docs/api-references/docs.html
@@ -4546,7 +4546,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 used anymore.
|
@@ -4677,8 +4690,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
+Immutable, change should be made through pd-ctl after cluster creation.
+Optional: Defaults to 4.
+Imported from v3.1.0
|
@@ -4762,7 +4776,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
|
@@ -4922,6 +4937,33 @@ PDScheduleConfig
Only used to display
+
+
+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
@@ -5067,6 +5109,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
diff --git a/manifests/crd.yaml b/manifests/crd.yaml
index 0cd512cd81..f46c30beb7 100644
--- a/manifests/crd.yaml
+++ b/manifests/crd.yaml
@@ -1443,6 +1443,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.
@@ -1456,6 +1461,10 @@ spec:
replication:
description: PDReplicationConfig is the replication configuration.
properties:
+ enable-placement-rules:
+ description: When PlacementRules feature is enabled. MaxReplicas
+ and LocationLabels are not used anymore.
+ type: string
max-replicas:
description: 'MaxReplicas is the number of replicas for
each region. Immutable, change should be made through
@@ -1465,7 +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
+ should be made through pd-ctl after cluster creation.
+ Imported from v3.1.0
type: string
type: object
schedule:
@@ -1511,6 +1521,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
@@ -1537,7 +1558,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:
@@ -1643,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
+ 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 316b27eb52..149af83457 100644
--- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go
+++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go
@@ -1848,7 +1848,14 @@ 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: "",
+ },
+ },
+ "enable-placement-rules": {
+ SchemaProps: spec.SchemaProps{
+ Description: "When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not used anymore.",
Type: []string{"string"},
Format: "",
},
@@ -1917,7 +1924,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",
},
@@ -1959,7 +1966,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",
},
@@ -2055,6 +2062,20 @@ 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",
+ 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: "",
+ },
+ },
},
},
},
@@ -2152,6 +2173,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 bc75c1f659..e7ed6429c3 100644
--- a/pkg/apis/pingcap/v1alpha1/pd_config.go
+++ b/pkg/apis/pingcap/v1alpha1/pd_config.go
@@ -33,7 +33,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
@@ -179,9 +178,14 @@ 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
+ // 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"`
+
+ // 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"`
}
// PDNamespaceConfig is to overwrite the global setting for specific namespace
@@ -247,8 +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
+ // 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.
@@ -278,7 +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
+ // 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"`
//
@@ -341,6 +347,16 @@ type PDScheduleConfig struct {
// Only used to display
// +optional
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
+ // +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
@@ -392,6 +408,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 72baccc1ca..6bc97a3328 100644
--- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go
@@ -1290,6 +1290,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
}
@@ -1424,6 +1429,16 @@ func (in *PDScheduleConfig) DeepCopyInto(out *PDScheduleConfig) {
(*out)[key] = val
}
}
+ 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
}
@@ -1509,6 +1524,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
}