Description
Bug Report
What version of Kubernetes are you using?
1.30
What version of TiDB Operator are you using?
1.6.1
What did you do?
In the DMCluster resource, the dm-discovery deployment is created with a topologySpreadConstraints that does not match the actual labels on the Pod.
The name of the discovery pod in a DMCluster is suffixed with -dm
at the following location:
tidb-operator/pkg/manager/member/tidb_discovery_manager.go
Lines 359 to 364 in 639482c
However, the TopologySpreadConstraints configuration uses DMCluster.name
directly as the instanceLabel:
tidb-operator/pkg/apis/pingcap/v1alpha1/component_spec.go
Lines 459 to 463 in 639482c
What did you expect to see?
The topologySpreadConstraints for the dm-discovery pod should match the pod's actual labels, including the app.kubernetes.io/instance label with the -dm suffix.
What did you see instead?
The topologySpreadConstraints uses the DMCluster.name as the instance label without the -dm suffix, which causes a mismatch with the actual label on the dm-discovery pod.