tikv / pd

Placement driver for TiKV
Apache License 2.0
1.05k stars 724 forks source link

location-labels does not support Backslash symbols #1588

Closed xiaojingchen closed 5 years ago

xiaojingchen commented 5 years ago
  1. What did you do? When I deploy TiDB cluster by TiDB operator on K8s, I want to use the labels which have been set in K8s node, but current PD does not support label which contains \. e.g:failure-domain.beta.kubernetes.io/region

  2. What did you expect to see? PD supports the label which matches K8s's label style. ref: https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/

shafreeck commented 5 years ago

Thanks for your feedback, I will check about this.

shafreeck commented 5 years ago

related: https://github.com/pingcap/pd/pull/1154

shafreeck commented 5 years ago

the k8s style: https://github.com/kubernetes/apimachinery/blob/master/pkg/util/validation/validation.go#L42