Issue
Pod label planetscale.com/tablet-uid strips leading zeros.
Root cause
The generated Pod label for UIDs with leading zeros is formatted with strconv.FormatUint(uint64(tabletAlias.Uid), 10)
|
labels[planetscalev2.TabletUidLabel] = strconv.FormatUint(uint64(tabletAlias.Uid), 10) |
Which results in leading zeros being removed, eg. 0790125915 -> 790125915.
While this doesn't affect the functionality of the operator or tablets, it makes it more difficult to correlate data because the UID is no longer correct. My use case is joining in Prometheus labels and I have some custom Steampipe connectors that allow me to query/join across Vitess, Kubernetes and other data-sources and I have to special-case the tablet UID.
I'll be happy to submit a PR shortly with a test case I have (a combination of labels that build the above uid).
Version
Operator: v2.16.0
Issue
Pod label
planetscale.com/tablet-uidstrips leading zeros.Root cause
The generated Pod label for UIDs with leading zeros is formatted with
strconv.FormatUint(uint64(tabletAlias.Uid), 10)vitess-operator/pkg/controller/vitessshard/reconcile_tablets.go
Line 298 in c0d5afe
Which results in leading zeros being removed, eg.
0790125915->790125915.While this doesn't affect the functionality of the operator or tablets, it makes it more difficult to correlate data because the UID is no longer correct. My use case is joining in Prometheus labels and I have some custom Steampipe connectors that allow me to query/join across Vitess, Kubernetes and other data-sources and I have to special-case the tablet UID.
I'll be happy to submit a PR shortly with a test case I have (a combination of labels that build the above uid).
Version
Operator: v2.16.0