fix(v0.5.0): KairosDB datasource migration + integrate PRs #23/#24 + dashboard auto-provisioning#28
Merged
Conversation
Add opt-in `cassandra.telemetry.prometheus` block to the K8ssandraCluster
template so users can enable the native ServiceMonitor generated by the
K8ssandra Operator without maintaining a separate manifest.
When `cassandra.telemetry.prometheus.enabled: true`, the operator creates
a ServiceMonitor automatically. The block is guarded by `{{- with }}` so
existing deployments that omit the key are unaffected (retrocompatible).
Example values:
cassandra:
telemetry:
prometheus:
enabled: true
commonLabels:
release: prometheus # match kube-prometheus-stack selector
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ibility The original dashboard was built for Grafana 7.3 and uses panel types and plugin references that are broken on Grafana 10+: - `graph` panel type removed in Grafana 10 → replaced with `timeseries` - `grafana-piechart-panel` (AngularJS) disabled in Grafana 11+ → replaced with native `piechart` panel - `datasource: null` on all panels → replaced with explicit datasource reference (type + uid) required by Grafana 8+ schema - `grafana-kairosdb-datasource` type → updated to `arpnetworking-kairosdb-datasource` (React fork compatible with Grafana 11+) - Removed AngularJS artifacts ($$hashKey fields) - Removed deprecated histogram panel (incompatible data format) - Updated schemaVersion from 26 to 39
Snapshot the current Grafana 7.3.10 / grafana-kairosdb-datasource dashboard into dashboards/legacy/ before PR #24 overwrites the top-level file with the Grafana 10+/11+ version. Add a short README explaining the split. The legacy folder serves users still running the frozen docker-compose v0.4.0 stack. Kubernetes (v0.5.0+) users get the new dashboard from dashboards/, and it is auto-provisioned via the Grafana sidecar.
Updates dashboards/Examon Test - Random Sensor.json for Grafana 10+/11+: - graph -> timeseries panel - grafana-piechart-panel (AngularJS) -> native piechart - explicit datasource references (type + uid) - grafana-kairosdb-datasource -> arpnetworking-kairosdb-datasource (paired with Issue #25 fix in subsequent commits) - removed deprecated histogram and AngularJS artifacts - schema version 26 -> 39 The pre-merge legacy dashboard is preserved at dashboards/legacy/Examon Test - Random Sensor.json for users of the frozen docker-compose v0.4.0 stack. Co-authored-by: Simone Maiorani <simone.maiorani@e4company.com>
…auto-provisioning - README.md: note that dashboards/ targets the Kubernetes (v0.5.0+) stack and that Docker Compose v0.4.0 users should use dashboards/legacy/. - docs/Deployment/kubernetes.md: add a "Grafana Dashboards" section describing the auto-provisioned datasource and bundled test dashboard.
…#25) The legacy grafana-kairosdb-datasource is AngularJS-only and is blocked by Grafana 11+ (our chart deploys Grafana 12.x). Switch the provisioned datasource to arpnetworking-kairosdb-datasource (React fork). Changes in values.yaml, values-staging.yaml, values-production.yaml: - grafana.plugins: install the plugin from its GitHub release URL with the GRAFANA_PLUGIN_ID suffix (v4.0.7, unsigned). - grafana.grafana.ini.plugins.allow_loading_unsigned_plugins: arpnetworking-kairosdb-datasource (required since the plugin is not Grafana-signed). - grafana.datasources.datasources.yaml.datasources[0]: type -> arpnetworking-kairosdb-datasource uid -> examon-kairosdb (matches the dashboard JSON merged in PR #24) Also document the new keys in docs/Deployment/configuration.md. Closes #25
- Enable grafana.sidecar.dashboards in values.yaml (label grafana_dashboard=1). - Add templates/grafana-dashboards.yaml that emits one ConfigMap per JSON file under the chart's dashboards/ folder, labeled for the sidecar to pick up. - Bundle the v0.5.0+ test dashboard (Examon Test - Random Sensor) inside the chart so .Files.Glob can read it; canonical user-facing copy still lives at dashboards/ at the repo root, and the chart's dashboards/README documents the sync requirement. - Add a top-level bundledDashboards.enabled toggle (default true) so operators can opt out without removing files.
Adds an optional telemetry.prometheus block to the K8ssandraCluster CR, gated by .Values.cassandra.telemetry. When enabled, K8ssandra emits a ServiceMonitor for Cassandra metrics that any cluster-side Prometheus operator can scrape natively, with no separate ServiceMonitor manifest to maintain. The default values block + configuration.md documentation are added in the follow-up commit. Co-authored-by: Simone Maiorani <simone.maiorani@e4company.com>
PR #23 added the gated telemetry.prometheus block to the K8ssandraCluster template but the chart shipped without a default values entry, so the key was an undocumented hidden flag. Add it now: - values.yaml: cassandra.telemetry.prometheus.enabled (false) and commonLabels ({}) with explanatory comments. - docs/Deployment/configuration.md: two rows in the Cassandra table. Disabled by default so a fresh helm install still works on clusters that don't have the ServiceMonitor CRD.
…hboard Adds three checks to scripts/k8s-smoke-test.sh that match the new chart behavior: - Grafana /api/datasources/name/kairosdb returns type=arpnetworking-kairosdb-datasource, uid=examon-kairosdb. - A ConfigMap labeled grafana_dashboard=1 named examon-dashboard-* exists in the release namespace. - The "Examon Test - Random Sensor" dashboard is discoverable via Grafana's /api/search (with a short retry loop because the sidecar loads ConfigMaps asynchronously). These run in CI after the existing pipeline checks via .github/workflows/k8s-test.yml, so a regression in datasource type, uid, or dashboard provisioning fails the build.
This was referenced May 14, 2026
Closed
Kubernetes ConfigMap data keys must match [-._a-zA-Z0-9]+, but the
dashboard filename contains spaces ("Examon Test - Random Sensor.json"),
which made the install fail:
Error: ConfigMap "examon-dashboard-examon-test-random-sensor" is invalid:
data[Examon Test - Random Sensor.json]: Invalid value: ...
Use the already-sanitized $name (lowercase, dashes only) and append .json
for the data key. Grafana's sidecar reads the value as dashboard JSON
regardless of the key name, so this is purely a cosmetic identifier on
the K8s side.
…ovisioning Bring docs/Deployment/ in line with the chart changes already on this branch (Grafana sidecar dashboards, arpnetworking-kairosdb-datasource migration, K8ssandra-native Prometheus telemetry): - kubernetes-production.md: replace the manual KairosDB data source block with a description of the chart's auto-provisioning (plugin install, unsigned-plugin allowlist, datasource type/uid, sidecar dashboards); expand the Monitoring section to document cassandra.telemetry.prometheus and the commonLabels.release selector pattern for kube-prometheus-stack. - upgrading.md: split Grafana dashboard restore into bundled (no action, shipped by the chart) vs user-created (manual import after a jq rewrite to type=arpnetworking-kairosdb-datasource, uid=examon-kairosdb); add What Changed rows for the plugin migration and dashboard provisioning. - kubernetes-local.md: add a Grafana verification sub-step to the smoke test using the auto-provisioned data source and Examon Test - Random Sensor dashboard. - configuration.md: document the bundledDashboards.enabled top-level toggle for the chart-bundled dashboard ConfigMaps. - docker-compose.md: point legacy v0.4.0 users at dashboards/legacy/ for the Grafana 7.3.10-compatible test dashboard; clarify the dashboards directly under dashboards/ now target the Kubernetes v0.5.0+ stack. - troubleshooting.md: add a Grafana KairosDB datasource entry covering the Issue #25 failure class (AngularJS plugin incompatible with Grafana 11+) and the three-piece resolution baked into the chart defaults, plus a kubectl-based verification command.
The Helm chart already supports an arbitrary number of custom Grafana
dashboards via the Grafana sidecar (grafana_dashboard=1 ConfigMaps,
searchNamespace: ALL), but the user-facing docs only described the
single bundled test dashboard. This commit documents the simple strategy
without changing any chart behavior.
- docs/Deployment/kubernetes.md: expand the Grafana Dashboards section
with sub-headings:
* Bundled dashboard (preserves existing content)
* How dashboard auto-provisioning works (sidecar values + cluster-
wide ConfigMap discovery)
* Adding your own dashboards (Strategy A, recommended): single
dashboard, directory loop, and a GitOps YAML manifest variant;
explicit note that any namespace works
* Bundling extra dashboards into the chart (Strategy B): drop *.json
into deploy/helm/examon/dashboards/ and helm upgrade
* Tips: datasource type/uid requirements with a pointer to the
upgrading.md jq snippet, the 1 MiB ConfigMap size limit,
grafana_folder annotation as an optional knob, sidecar log
troubleshooting commands.
- docs/Deployment/configuration.md: enrich the
grafana.sidecar.dashboards.enabled row with a cross-reference to the
new section.
- docs/Deployment/upgrading.md: replace the duplicated provisioning
hint with a link to the K8s guide; keep the jq rewrite snippet
which is migration-specific.
- deploy/helm/examon/dashboards/README.md: prepend a notice that most
users should create a labeled ConfigMap instead of adding files here,
and clarify this folder is for chart forks/maintainers.
No chart, values, or template changes — current behavior already
supports the strategy.
This commit improves the documentation across several files by enhancing clarity and consistency in language.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings
release/v0.5.0to a state where a freshhelm installon a clean Kubernetes cluster delivers at least the same usable experience as the legacy docker-compose v0.4.0 stack — plus auto-provisioned Grafana datasource & test dashboard and optional K8ssandra Prometheus telemetry.This is mostly a merge job for the two open teammate PRs (#23, #24), wrapped with the small chart changes needed to make them work out-of-the-box.
What changed
values.yaml,values-staging.yaml,values-production.yamlto installarpnetworking-kairosdb-datasourcev4.0.7 from its GitHub release and provision it withuid: examon-kairosdb. Closes grafana-kairosdb-datasource plugin broken on Grafana 11+: Angular support disabled by default #25 (the legacygrafana-kairosdb-datasourceplugin is AngularJS-only and is blocked by Grafana 11+; our chart deploys Grafana 12.x).dashboards/Examon Test - Random Sensor.jsonfor Grafana 10+/11+ (timeseriespanels,arpnetworking-kairosdb-datasource, schema v39).dashboards/legacy/Examon Test - Random Sensor.jsonwith a README explaining the split; the legacy docker-compose v0.4.0 stack stays unchanged.grafana.sidecar.dashboards, ships the test dashboard inside the chart as a labeled ConfigMap, and adds abundledDashboards.enabledtoggle.cassandra.telemetry.cassandra.telemetryvalues + entry indocs/Deployment/configuration.mdso the key is no longer an undocumented hidden flag (disabled by default).scripts/k8s-smoke-test.sh.dashboards/legacy/and document K8s auto-provisioning indocs/Deployment/kubernetes.md.Commit history
Closes / Supersedes
Test plan
K8s Integration Testworkflow green (runsscripts/k8s-local-setup.sh --ci+scripts/k8s-smoke-test.sh).k3dinstall withvalues-local.yaml: all pods Ready; Grafana login → KairosDB datasource "Test connection OK"; "Examon Test - Random Sensor" dashboard listed automatically and rendering live data.--set cassandra.telemetry.prometheus.enabled=true, K8ssandra produces aServiceMonitor(verified on a cluster that has the CRD).Out of scope
dashboards/legacy/) and Grafana 7.3.10 datasource remain unchanged.