planetscale / planetscale/vitess-operator

Tablet UID Pod label strips leading zeros

Open
#801 0 comments 0 reactions 1 assignee View on GitHub

@absolutejam is already working on this.

Since Jul 8, 2026.

Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

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)

https://github.com/planetscale/vitess-operator/blob/c0d5afeb1ec8dd4085dc6ed3e5cd947613a4deff/pkg/controller/vitessshard/reconcile_tablets.go#L298

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.