Repository navigation
fix(dashboard-ui): upgrade Grafana to 11.6.16 and pin plugins - #114
Conversation
GF_INSTALL_PLUGINS installed the newest Infinity release on every container creation. Infinity 4.0.0 requires Grafana >=11.6.11, while bitnamilegacy/grafana:11.4.0 reports Grafana 11.3.1, so the plugin frontend failed to load and Infinity panels showed no data. bitnamilegacy/grafana is frozen (newest tags 11.6.1 and 12.1.1) and cannot run Infinity 4.x, so switch to the official grafana/grafana image, move config mounts to /etc/grafana, pin Infinity 4.0.0 and OpenSearch 2.34.4, and disable Grafana's unpinned default plugin preinstalls. Use the same image in the dashboard service tests. Fixes #106
maxlastglance
left a comment
There was a problem hiding this comment.
The Grafana image and plugin changes look right, and the dashboard tests pass. One thing to fix before taking this out of draft: .scripts/test-grafana-plugins.py is not invoked anywhere in CI, so the new regression check can silently stop working.
Please run it from the existing lint-compose job, which already has Docker Compose available. The three red Java jobs are the unrelated MinIO failure addressed by #113.
The Helm chart had the same Grafana problem as Compose, plus one of its own: since dfb2f97 dashboardui.plugins is empty, so Infinity and OpenSearch were never installed and the dbrepojson0/dbrepoopensearch0 datasources reported "Plugin not registered". The datasources secret that defines them was also not mounted. The Bitnami Grafana chart only ships bitnamilegacy images, which cannot run Infinity 4.x. Switch the dashboardui dependency to the grafana-community chart 8.15.0 with grafana/grafana:11.6.16, matching Compose. Pin Infinity 4.0.0 and OpenSearch 2.34.4, disable preinstalls, load env from dashboard-ui-secret (now with admin-user/admin-password), and mount dashboard-ui-datasources-secret as provisioned datasources. Extend the plugin regression script to cover the Helm values. Refs #106
maxlastglance
left a comment
There was a problem hiding this comment.
Thanks for adding the Helm changes and wiring the plugin check into CI. The Compose changes look good. I see two problems for existing Helm installations:
- The old Bitnami setup uses SQLite on the dashboard-ui PVC. The new chart loads the PostgreSQL settings from dashboard-ui-secret and disables persistence. Existing dashboards, users and credentials are not migrated, and the old PVC can disappear from the release. We should either preserve the current database for upgrades or provide a tested migration before dropping the claim.
- The chart change also changes the selector of Deployment/dashboard-ui. Kubernetes will reject that during a normal helm upgrade because deployment selectors are immutable. Recreate only changes the rollout strategy; it does not recreate the Deployment. This needs a compatible selector or a controlled replacement step.
Small thing: .scripts/test-grafana-plugins.py checks the image repository but not the tag, so grafana:latest still passes. The plugin checks also do not verify the expected versions. It would be better to assert the actual pins.
Fresh installs should be fine. My concern is the upgrade path for installations that already have Grafana data.
… steps The Bitnami Grafana Deployment selects pods by app.kubernetes.io/component, which the grafana-community chart does not set, and Deployment selectors are immutable, so helm upgrade failed. Run Grafana as a StatefulSet instead: Helm then creates the StatefulSet and deletes the old Deployment itself, and a rollback to the Bitnami release works the same way back. DBRepo 1.14.0 and 1.14.1 dropped the dashboard database settings, so a Bitnami install that got Grafana running there kept a SQLite database on the dashboard-ui claim, which Helm deleted on upgrade. Keep that claim with helm.sh/resource-policy: keep, rendering only the fields the Bitnami chart rendered so neither upgrades nor rollbacks touch its immutable spec. Disable the chart's RBAC, which is only needed for sidecars and created cluster-wide roles, restore the PodDisruptionBudget the Bitnami chart had (maxUnavailable 1), and make the plugin check assert the exact image tag and plugin versions.
|
Thanks, I could reproduce both upgrade problems. They are fixed in 5ffa279:
I also turned off the chart's RBAC (it only serves the sidecars, which we don't use, and it created cluster-wide roles) and kept the PodDisruptionBudget the Bitnami chart had. The test setup and results are in the PR description. |
Description
Dashboards that read from the
dbrepo-json(Infinity) datasource show "No data" and this error:GF_INSTALL_PLUGINSinstalls the newest Infinity release every time the container is created. Infinity 4.0.0 needs Grafana >=11.6.11, butbitnamilegacy/grafana:11.4.0actually reports Grafana 11.3.1. So the plugin frontend fails to load.Pinning the plugin alone keeps us on an old Infinity. Upgrading alone doesn't work while we stay on Bitnami.
bitnamilegacy/grafanastopped getting updates in August 2025, and its newest tags are 11.6.1 and 12.1.1, which are both too old for Infinity 4.x.Docker Compose
In
docker-compose.yml,.docker/docker-compose.ymland the.liveskel compose:grafana/grafana:11.6.16image. I stayed on 11.6 to avoid the Grafana 12 breaking changes./opt/bitnami/grafana/conf/...to/etc/grafana/.... The dashboards are already provisioned from/app/dashboards, so they don't change.yesoreyeram-infinity-datasourceto 4.0.0 andgrafana-opensearch-datasourceto 2.34.4.GF_PLUGINS_PREINSTALL_DISABLED. Otherwise the official image installs unpinned default apps (grafana-lokiexplore-app,grafana-pyroscope-app, ...) in the background on every start.Helm
On Helm the dashboards are broken for one more reason. Since dfb2f97
dashboardui.pluginsis empty, so Infinity and OpenSearch are never installed, anddashboardui.datasourcesonly defines Prometheus.templates/dashboard-ui-datasources-secret.yaml(which definesdbrepojson0anddbrepoopensearch0, used by the dashboards and the Dashboard Service) is not referenced anywhere. On a v1.14.1 install both datasources report "Plugin not registered".The Bitnami Grafana chart only ships
bitnamilegacyimages, so this switches thedashboarduidependency to the official chart, matching Compose:grafanachart 8.15.0 fromhttps://grafana-community.github.io/helm-charts(grafana/helm-chartsis frozen at 10.5.15), with imagegrafana/grafana:11.6.16.GF_PLUGINS_PREINSTALL_DISABLED.dashboard-ui-secret, which now also holdsadmin-user/admin-passwordforadmin.existingSecret.dashboard-ui-datasources-secretat/etc/grafana/provisioning/datasources.helm upgradefrom a Bitnami-chart release needs no manual step (see Existing deployments). No persistence (Grafana's state is indashboard-db), test framework off, and the chart's RBAC off: it only serves the sidecars, which are not used, and would create cluster-wide roles. Keeps the PodDisruptionBudget the Bitnami chart had (maxUnavailable: 1). README table andvalues.schema.jsonupdated.templates/dashboard-ui-legacy-pvc.yaml, which keeps thedashboard-uiPVC of the old Bitnami Grafana instead of letting Helm delete it.Also
.scripts/test-grafana-plugins.py, which checks that every Compose file and the Helm values use exactlygrafana/grafana:11.6.16with Infinity 4.0.0 and OpenSearch 2.34.4, and disable preinstalls. CI runs it in thelint-composejob.Deployment evidence
We hit the same bug in our ITB Docker Compose deployment of v1.13.4. Infinity 3.10.1 crashed the query editor with React error #130, and 3.7.1 (its manifest says >=10.4.8) still crashed on the Bitnami image. We have been running a pinned Infinity on ITB since then.
Type of Change
Related Issue
Closes #106
Checklist
Additional Notes
Validation: Docker Compose
On a local Docker Compose stack using
.docker/docker-compose.yml(v1.14.1 images):/api/v1/imageshowed "No data" and the exact error above.dbrepo-dashboard-uiwith this change on the same dashboard database. The panel shows the data, and the Infinity query editor renders with no console errors (checked in Chrome).dbrepo-json, Prometheus and OpenSearch.grafana-piechart-panel, which the Bitnami image bundled. Angular is already disabled on the current image, and those panels are migrated to the core piechart on both images. No "panel plugin not found".pytest tests/test_integration_app.pyindbrepo-dashboard-serviceagainstgrafana/grafana:11.6.16: 14 passed.python3 .scripts/test-grafana-plugins.py: passes, and fails on main.docker compose configon all three Compose files: passed.Validation: Helm
The chart on main (and the published 1.14.1 chart) does not render with its own default
values.yaml(gatewayservicecontainerPorts.httpis the first error). That comes from the values rewrite in be186a7 and is not related to Grafana, so I will send it as a separate PR. To test this change I used the pre-be186a7e6 values with thedashboarduiblock from this PR:helm templaterenders 169 objects andhelm lintpasses. The render is identical to this branch's chart apart from generated random secrets.dbrepojson0,dbrepoopensearch0anddbrepometrics0, the Infinitymodule.jsloads (200), and an inline Infinity query through/api/ds/queryreturns data.dbrepojson0anddbrepoopensearch0health "Plugin not registered", no plugins installed.Validation: Helm upgrade from the Bitnami chart
Tested on OrbStack Kubernetes 1.35 with Helm 4.3.0. To change only the Grafana part of a release, I used a small umbrella chart with the released subcharts (Bitnami
grafana11.4.2,grafana8.15.0,postgresql16.1.0) and DBRepo's own dashboard templates. Each source release was seeded with a private dashboard (Viewer permission removed, asupdate_anonymous_read_accessdoes), a public dashboard, a hand-made dashboard and a service account.Sources:
dashboard-db, no PVC.dashboard-service-configdoes not exist, andadmin.userKey/passwordKeyare keys of the official chart, so the Bitnami chart reads the keypasswordfromdashboard-service-secret, which is not there. With those two fixed, Grafana runs on SQLite on thedashboard-uiPVC, and that is the source I used.Results:
helm upgradefails (spec.selector: field is immutable, plusspec.strategy.rollingUpdate: Forbiddenfor the switch toRecreate). After the documentedkubectl delete deployment, the upgrade succeeds, but Helm deletes thedashboard-uiPVC and its volume, and Grafana starts empty.dashboard-db. A second upgrade changes nothing.helm rollbackto the Bitnami revision brings back Grafana 11.3.1 with all three dashboards and the service account from SQLite.--server-side=false(client-side apply, as in Helm 3). I did not run a Helm 3 binary.dashboard-uiis taken over with the new selector and covers both pods (1 disruption allowed). Rollback restores the old selector.helm lintpasses, andhelm templatewith the pre-be186a7e6 values and thisdashboarduiblock renders the StatefulSet and its headless Service and no Grafana ClusterRole. I have not upgraded a full DBRepo stack with this commit.Alternatives I tried and dropped: a pre-upgrade hook that deletes the old Deployment (the upgrade works, but
helm rollbackfails on the same selector error in reverse, and it needs RBAC and a kubectl image), renaming the Grafana objects and adding adashboard-uiService alias (works, but renames every Grafana object), and staying on SQLite on the same PVC (works, but needs the hook, allows one replica only, and would leave thedashboard-dbdata of 1.13 installs unused).Existing deployments
helm upgradefrom a Bitnami-chart release needs no manual step. The old Deployment selects pods byapp.kubernetes.io/component: grafana, which the official chart does not set, and selectors cannot be changed in place. Because Grafana is now a StatefulSet, Helm creates it and removes the old Deployment.helm rollbackto the Bitnami release works the same way back.GF_DATABASE_*fromdashboard-ui-secretand stores its state indashboard-db, as on 1.13 and earlier. The values rewrite in be186a7 (1.14.0) droppedgrafana.extraEnvVarsSecret: dashboard-ui-secretandpersistence.enabled: false, so a 1.14 install whose Grafana was running used SQLite on thedashboard-uiPVC whiledashboard-dbstayed unused. That PVC (10Gi by default) is now kept (helm.sh/resource-policy: keep) and never deleted by Helm, so a rollback finds its data, but it is not migrated. The Dashboard Service setup job recreates the dashboards of existing databases. Dashboards made by hand in that SQLite database are not carried over. Once it is no longer needed:kubectl delete pvc dashboard-ui -n <namespace>.helm template, helm-diff, a plain--dry-runor Argo CD:lookupreturns nothing there, so their output shows the PVC as deleted, and Argo CD would really delete it. Annotate it before upgrading:kubectl annotate pvc dashboard-ui helm.sh/resource-policy=keep -n <namespace>.dashboardui.grafana.replicaCount/dashboardui.replicaCountis nowdashboardui.replicas(official chart naming), anddashboardui.admin.user/passwordare now set in the chart values.