-
Notifications
You must be signed in to change notification settings - Fork 500
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
mapping some short label names to k8s well-known labels #4688
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4688 +/- ##
==========================================
+ Coverage 62.41% 69.06% +6.65%
==========================================
Files 196 200 +4
Lines 21781 24401 +2620
==========================================
+ Hits 13595 16853 +3258
+ Misses 6942 6261 -681
- Partials 1244 1287 +43
|
friendly ping @KanShiori @handlerww PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@nolouch: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
PTAL @KanShiori @csuzhangxc this feature is very important for some scenarios. like |
/test pull-e2e-kind pull-e2e-kind-serial |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: d486eb6
|
/test pull-e2e-kind pull-e2e-kind-serial |
/test pull-e2e-kind |
@glorv: Your PR was out of date, I have automatically updated it for you. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/test pull-e2e-kind-basic |
Why ci failed? |
/test pull-e2e-kind pull-e2e-kind-serial |
/test pull-e2e-kind-basic |
/test pull-e2e-kind |
What problem does this PR solve?
Support shorten some labels for k8s well-known labels when used in pd's location labels
Closes #4678
What is changed and how does it work?
Code changes
Tests
kubectl label nodes kind-control-plane
to add 2 labelstopology.kubernetes.io/region=us-west-2, topology.kubernetes.io/zone=us-west-2a
(kind itself can add the labelkubernetes.io/hostname=kind-control-plane
), then I addreplicate-labels = ["region", "zone", "host"]
to example/basic/tidb-cluster.yml and use it to start a cluster. After the cluster is started, tidb log contains[2022/09/14 06:09:15.541 +00:00] [INFO] [http_handler.go:2188] ["update server labels"] [labels="{\"host\":\"kind-control-plane\",\"region\":\"us-west-2\",\"zone\":\"us-west-2a\"}"]
, that show the labels are effective. Label the node withfailure-domain.beta.kubernetes.io/region=us-west-2, failure-domain.beta.kubernetes.io/zone=us-west-2a
has the same effect.Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.