Skip to content

fix(v0.5.0): KairosDB datasource migration + integrate PRs #23/#24 + dashboard auto-provisioning#28

Merged
fbeneventi merged 14 commits into
release/v0.5.0from
fix/v0.5.0-grafana-and-merges
May 14, 2026
Merged

fix(v0.5.0): KairosDB datasource migration + integrate PRs #23/#24 + dashboard auto-provisioning#28
fbeneventi merged 14 commits into
release/v0.5.0from
fix/v0.5.0-grafana-and-merges

Conversation

@fbeneventi
Copy link
Copy Markdown
Collaborator

@fbeneventi fbeneventi commented May 14, 2026

Summary

Brings release/v0.5.0 to a state where a fresh helm install on 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

  • fix(grafana): migrate KairosDB datasource to ArpNetworking fork — switches values.yaml, values-staging.yaml, values-production.yaml to install arpnetworking-kairosdb-datasource v4.0.7 from its GitHub release and provision it with uid: examon-kairosdb. Closes grafana-kairosdb-datasource plugin broken on Grafana 11+: Angular support disabled by default #25 (the legacy grafana-kairosdb-datasource plugin is AngularJS-only and is blocked by Grafana 11+; our chart deploys Grafana 12.x).
  • Merge PR fix(dashboard): update Random Sensor dashboard for Grafana 10+ compatibility #24 (@maioranisimone) — updates dashboards/Examon Test - Random Sensor.json for Grafana 10+/11+ (timeseries panels, arpnetworking-kairosdb-datasource, schema v39).
  • chore(dashboards): archive the v0.4.0 dashboard at dashboards/legacy/Examon Test - Random Sensor.json with a README explaining the split; the legacy docker-compose v0.4.0 stack stays unchanged.
  • feat(helm): auto-provision bundled dashboards via Grafana sidecar — enables grafana.sidecar.dashboards, ships the test dashboard inside the chart as a labeled ConfigMap, and adds a bundledDashboards.enabled toggle.
  • Merge PR feat(helm): expose K8ssandra native Prometheus telemetry via values #23 (@maioranisimone) — exposes K8ssandra-native Prometheus telemetry via cassandra.telemetry.
  • feat(helm): default cassandra.telemetry values + entry in docs/Deployment/configuration.md so the key is no longer an undocumented hidden flag (disabled by default).
  • test(smoke): verify provisioned datasource type/uid and bundled dashboard in scripts/k8s-smoke-test.sh.
  • docs: point Docker Compose users at dashboards/legacy/ and document K8s auto-provisioning in docs/Deployment/kubernetes.md.

Commit history

3c12b1b chore(dashboards): archive v0.4.0 Random Sensor dashboard under legacy/
cc4ea95 Merge PR #24: dashboard Grafana 10+/11+ compatibility (Simone Maiorani)
a820eac docs: point Docker Compose users at dashboards/legacy/, document K8s auto-provisioning
86280f8 fix(grafana): migrate KairosDB datasource to arpnetworking fork (Issue #25)
b5aafbc feat(helm): auto-provision bundled Grafana dashboards via sidecar
8589e95 Merge PR #23: K8ssandra native Prometheus telemetry (Simone Maiorani)
9272e1c feat(helm): default cassandra.telemetry values + docs (PR #23 follow-up)
2fdb6b7 test(smoke): verify provisioned datasource type, uid, and bundled dashboard

Closes / Supersedes

Test plan

  • K8s Integration Test workflow green (runs scripts/k8s-local-setup.sh --ci + scripts/k8s-smoke-test.sh).
  • On a fresh k3d install with values-local.yaml: all pods Ready; Grafana login → KairosDB datasource "Test connection OK"; "Examon Test - Random Sensor" dashboard listed automatically and rendering live data.
  • With --set cassandra.telemetry.prometheus.enabled=true, K8ssandra produces a ServiceMonitor (verified on a cluster that has the CRD).

Out of scope

  • Cassandra Medusa backups, KairosDB HOCON ConfigMap overlay, security contexts, PodDisruptionBudgets, NetworkPolicies, HPA, full README-parity documentation pass.
  • The docker-compose v0.4.0 stack is explicitly frozen — its dashboards (kept under dashboards/legacy/) and Grafana 7.3.10 datasource remain unchanged.

Simone Maiorani and others added 10 commits April 20, 2026 14:26
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.
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.
@fbeneventi fbeneventi merged commit ef07525 into release/v0.5.0 May 14, 2026
1 check passed
@fbeneventi fbeneventi deleted the fix/v0.5.0-grafana-and-merges branch May 14, 2026 16:49
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