Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shorten some default location labels #4678

Closed
glorv opened this issue Aug 11, 2022 · 5 comments · Fixed by #4688
Closed

shorten some default location labels #4678

glorv opened this issue Aug 11, 2022 · 5 comments · Fixed by #4688
Labels
enhancement New feature or request

Comments

@glorv
Copy link
Contributor

glorv commented Aug 11, 2022

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 tikv/pd#5360 for more details.

Describe the feature you'd like:

As we already support mapping host to kubernetes.io/hostname in:

if storeLabel == "host" {
if host, found := ls[corev1.LabelHostname]; found {
labels[storeLabel] = host
}
}

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 glorv added the enhancement New feature or request label Aug 11, 2022
@glorv
Copy link
Contributor Author

glorv commented Aug 11, 2022

@DanielZhangQD @KanShiori @nolouch PTAL

@nolouch
Copy link
Member

nolouch commented Aug 11, 2022

looks good to me~

@glorv
Copy link
Contributor Author

glorv commented Aug 24, 2022

@azurezyq Could you please take a look?

@nolouch
Copy link
Member

nolouch commented Aug 26, 2022

I think it's more user friendly.

@KanShiori
Copy link
Collaborator

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants