tidb-operator icon indicating copy to clipboard operation
tidb-operator copied to clipboard

shorten some default location labels

Open glorv opened this issue 2 years ago • 2 comments

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:

glorv avatar Aug 11 '22 10:08 glorv

@DanielZhangQD @KanShiori @nolouch PTAL

glorv avatar Aug 11 '22 10:08 glorv

looks good to me~

nolouch avatar Aug 11 '22 10:08 nolouch

@azurezyq Could you please take a look?

glorv avatar Aug 24 '22 11:08 glorv

I think it's more user friendly.

nolouch avatar Aug 26 '22 08:08 nolouch

LGTM

KanShiori avatar Aug 31 '22 06:08 KanShiori