loki icon indicating copy to clipboard operation
loki copied to clipboard

fix: ConfigMap "grafana-dashboard-loki_thanos_object_storage" is invalid

Open fitz123 opened this issue 7 months ago • 2 comments
trafficstars

What this PR does / why we need it: Fixes an invalid ConfigMap name by replacing underscores with hyphens in the dashboard filename. The current name loki_thanos_object_storage.json results in a ConfigMap with name grafana-dashboard-loki_thanos_object_storage, which fails Kubernetes validation as it contains underscores. The PR changes the filename to loki-thanos-object-storage.json to ensure the resulting ConfigMap name complies with Kubernetes naming requirements.

Which issue(s) this PR fixes: NA

Special notes for your reviewer: The error occurs because Kubernetes ConfigMap names must follow the RFC 1123 subdomain naming convention, which doesn't allow underscores. This is a simple fix to ensure dashboard deployments succeed.

fitz123 avatar Apr 09 '25 16:04 fitz123

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 09 '25 16:04 CLAassistant

We're using this workaround until this is merged:

dashboards+: std.mergePatch(
  lokiMixin.grafanaDashboards,
  {
      "loki-thanos-object-storage.json": lokiMixin.grafanaDashboards["loki_thanos_object_storage.json"],
      "loki_thanos_object_storage.json": null,
  }),

andrein avatar Jun 17 '25 11:06 andrein