diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index a30e1012887..919ad57976c 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -25498,9 +25498,9 @@ github.com/pingcap/tidb-operator/pkg/apis/label.Label (Optional) -

MatchLabels is used to overwrite generated corev1.TopologySpreadConstraints.LabelSelector

-

corev1.TopologySpreadConstraint generated in component_spec.go will set a -NodeSelector automatically with some KV. +

MatchLabels is used to overwrite generated corev1.TopologySpreadConstraints.LabelSelector +corev1.TopologySpreadConstraint generated in component_spec.go will set a +LabelSelector automatically with some KV. Historically, it is l[“comp”] = “” for component tiproxy. And we will use MatchLabels to keep l[“comp”] = “” for old clusters with tiproxy/

diff --git a/pkg/apis/pingcap/v1alpha1/types.go b/pkg/apis/pingcap/v1alpha1/types.go index b0f50f162bb..5c745275d12 100644 --- a/pkg/apis/pingcap/v1alpha1/types.go +++ b/pkg/apis/pingcap/v1alpha1/types.go @@ -3004,9 +3004,8 @@ type TopologySpreadConstraint struct { // See pkg/apis/pingcap/v1alpha1/tidbcluster_component.go#TopologySpreadConstraints() TopologyKey string `json:"topologyKey"` // MatchLabels is used to overwrite generated corev1.TopologySpreadConstraints.LabelSelector - // // corev1.TopologySpreadConstraint generated in component_spec.go will set a - // NodeSelector automatically with some KV. + // LabelSelector automatically with some KV. // Historically, it is l["comp"] = "" for component tiproxy. And we will use // MatchLabels to keep l["comp"] = "" for old clusters with tiproxy/ // +optional