tidb-operator
tidb-operator copied to clipboard
shorten some default location labels
Feature Request
Is your feature request related to a problem? Please describe:
Currently, when use tidb-operator to deploy cluster in cross AZ environment, it's common to set the location-labels like ["topology.kubernetes.io/region", "topology.kubernetes.io/zone", "kubernetes.io/hostname"]
, but long label names may cause performance problems. See https://github.com/tikv/pd/issues/5360 for more details.
Describe the feature you'd like:
As we already support mapping host
to kubernetes.io/hostname
in: https://github.com/pingcap/tidb-operator/blob/00002ede5e5b2c811d8bbff4043a4cc7a2a1e2a6/pkg/manager/member/node.go#L35-L39
I think it's also useful to treat region
and zone
in the same way:
region
--> topology.kubernetes.io/region
and failure-domain.beta.kubernetes.io/region
(for old k8s version)
zone
--> topology.kubernetes.io/zone
and failure-domain.beta.kubernetes.io/zone
(for old k8s version)
So user can config both zone
or topology.kubernetes.io/zone
, and the effect is the same.
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
@DanielZhangQD @KanShiori @nolouch PTAL
looks good to me~
@azurezyq Could you please take a look?
I think it's more user friendly.
LGTM