Skip to content

Give each Perses dashboard a unique metadata.name#2401

Merged
ArnobKumarSaha merged 1 commit into
masterfrom
arnob-perses-dup
Jul 23, 2026
Merged

Give each Perses dashboard a unique metadata.name#2401
ArnobKumarSaha merged 1 commit into
masterfrom
arnob-perses-dup

Conversation

@ArnobKumarSaha

Copy link
Copy Markdown
Member

Problem

Different PersesDashboard CRs reported the same .status.dashboard.id (e.g. kubedb-mysql-pod and kubedb-mariadb-pod both FktZiiOnz). That id is the dashboard model's metadata.name, surfaced verbatim by the operator. Two dashboards with the same name land on the same Perses dashboard (scoped only by project + folder), so each colliding pair overwrote the other — one dashboard per group was effectively missing.

Root cause: percli migrate copies the Grafana source uid into metadata.name, and the source carried duplicate uids. 16 groups (~30 files) collided. (Grafana dashboards don't collide because the chart omits uid and Grafana assigns its own id.)

Fix

Rename every dashboard metadata.name to kubedb-<db>-<type> = normalize(spec.display.name) (lower, strip spaces, split /, join -) — the exact rule the chart uses to derive the PersesDashboard CR name, so metadata.name now equals the CR name. Only the model's metadata.name changes; display names, panels, and variables are untouched.

Verification

  • 88 dashboards, one line changed each; helm template renders 88 models with 88 unique names, zero duplicates.
  • Companion fixes (separate PRs): the opnpulse/grafana-dashboards source data and the opnpulse/perses-dashboards generator, so future migrations are collision-proof.

Perses surfaces the dashboard model's metadata.name as
.status.dashboard.id, so duplicate names made distinct dashboards
collide on the same Perses dashboard (last writer wins). 16 groups of
dashboards shared an opaque metadata.name copied from the Grafana source
uid.

Rename every dashboard metadata.name to kubedb-<db>-<type>, i.e.
normalize(spec.display.name), which equals the PersesDashboard CR name
the chart derives. 88 dashboards, all names now unique.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha
ArnobKumarSaha merged commit 4027512 into master Jul 23, 2026
9 checks passed
@ArnobKumarSaha
ArnobKumarSaha deleted the arnob-perses-dup branch July 23, 2026 05:18
ArnobKumarSaha added a commit that referenced this pull request Jul 23, 2026
Perses surfaces the dashboard model's metadata.name as
.status.dashboard.id, so duplicate names made distinct dashboards
collide on the same Perses dashboard (last writer wins). 16 groups of
dashboards shared an opaque metadata.name copied from the Grafana source
uid.

Rename every dashboard metadata.name to kubedb-<db>-<type>, i.e.
normalize(spec.display.name), which equals the PersesDashboard CR name
the chart derives. 88 dashboards, all names now unique.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant