Skip to content

GreenKube

v0.2.10 Breaking

This release includes breaking changes for platform teams planning a safe upgrade.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

carbon-emissions carbon-footprint cloud co2 cost-optimization devops
+12 more
fastapi finops grafana green-computing green-software greenops helm kubernetes prometheus python sustainability svelte

Summary

AI summary

Recommendation lifecycle, SQLite/PostgreSQL migrations, and Grafana dashboard updates affect SQLite, cluster handling, and namespace scoping.

Full changelog

What's Changed

Added

  • Recommendation full lifecycle: Recommendations now support a complete status lifecycle (open, in_progress, resolved, dismissed, snoozed). New API endpoints allow updating status, bulk-dismissing, and snoozing recommendations. DB migrations 0006 (lifecycle columns) and 0007 (upsert null-fix) applied for both PostgreSQL and SQLite.
  • Frontend recommendation lifecycle UI: The recommendations page now exposes status filters, per-recommendation status controls (dismiss, snooze, mark in-progress/resolved), and a lifecycle summary on the dashboard.
  • Recommendation deduplication by deployment: The recommender now groups pods by their parent Deployment (via regex matching the standard ReplicaSet pod-name suffix) before generating rightsizing and off-peak recommendations. This avoids duplicate entries for every pod in a Deployment and produces one consolidated recommendation per workload.
  • Expanded test coverage: Test suite extended with new files covering CollectionOrchestrator, MetricAssembler, MetricsCompressor, Scheduler, recommender v2, factory, SummaryRepository (SQLite), TimeseriesCacheRepository (SQLite), a full recommendation lifecycle end-to-end suite, and additional node repository / recommendation repository unit tests.
  • Real database integration tests: New tests/integration/test_real_database_repositories.py runs the full repository layer against live SQLite and PostgreSQL instances. docker-compose.test.yml spins up a throwaway PostgreSQL container for CI. Documentation added in docs/testing.md.
  • Grafana dashboard overhaul (scripts/build_grafana_dashboard.py): Complete rebuild of the Grafana JSON dashboard generation script with full PromQL aggregation correctness, instant-query bargauges for Top 3 panels, and a reduce transformation to fix bar-scale inflation from historical data.
  • New Prometheus metrics: Additional Prometheus gauges for recommendation counts by status, attributed savings, and node activity; exposed via src/greenkube/api/metrics_endpoint.py. ServiceMonitor updated to include the new scrape path. Grafana dashboard v2 built on these metrics with corrected PromQL and consistent namespace/cluster filters across all panels.
  • Savings attribution system: New SavingsAttributor service (src/greenkube/core/savings_attributor.py) prorates projected annual CO₂e and cost savings to the actual observation window. New SavingsLedger Pydantic model, abstract BaseSavingsRepository, and PostgreSQL/SQLite implementations. DB migrations 0008 applied for both engines. Two new Prometheus gauges: greenkube_co2e_savings_attributed_grams_total and greenkube_cost_savings_attributed_dollars_total.
  • Grafana dashboard: Sustainability Command Center row with Sustainability Score gauge, CO₂e/Cost/Energy stats, attributed savings window panels, active-recommendation counters, and three sorted Top-3 bargauges (CO₂e by namespace, Cost by namespace, Recommendation Types).
  • Demo mode "GreenOptic": New comprehensive demo mode simulating a fictional GreenOptic company with a fully pre-populated dataset — realistic node topology, multi-namespace workloads, historical metrics, and a backfilled savings ledger aligned with resolved demo recommendations. DB migration 0009 adds an is_active activity-status column to node records. New RecommendationRealization service (src/greenkube/core/recommendation_realization.py) links realised savings to specific recommendations in the ledger.
  • Redesigned frontend report page: The /report page rebuilt with a new reportOptions.js module for configurable report parameters and a new date_utils.py helper on the backend. Report layout and export logic simplified.

Fixed

  • Node recommendation memory usage: The underutilised-node recommender now correctly factors in memory utilisation alongside CPU, preventing false positives on memory-heavy workloads.
  • Node-level recommendation persistence: pod_name and namespace are now allowed to be NULL in the DB schema for node-scope recommendations, fixing an integrity error on save.
  • Embodied emissions default reduced to 100 kg: DEFAULT_EMBODIED_EMISSIONS_KG lowered from 350 kg to 100 kg to better match the average embodied footprint of a cloud VM vCPU slice, producing more accurate Scope 3 estimates when Boavizta returns no data.
  • Settings page stale warning removed: The frontend settings page no longer displays a warning about configuration not persisting, since settings are now written to the Kubernetes Secret and survive pod restarts.
  • Grafana: coverage metrics removed from GreenKube impact panel: Test-coverage Prometheus metrics were incorrectly included in the GreenKube impact/emissions panel and have been removed.
  • Grafana dashboard: filters applied to all charts: Namespace and cluster variable filters are now consistently wired to every panel in the dashboard, so selecting a namespace correctly scopes all charts rather than only some.

Changed

  • CI: automated test-coverage badge update: The README test-coverage shields are now refreshed automatically by CI on each push to dev.
  • All Grafana PromQL expressions deduplicated: Every expression across all rows uses the appropriate aggregation (sum(max by (cluster)(…)) for cluster-level scalars, sum by (namespace)(…) for namespace breakdowns, max by (namespace, pod)(…) for pod-level topk, max by (node)(…) for node metrics) to prevent value multiplication from multiple scrape instances.
  • Documentation restructured: README.md streamlined to a project overview; detailed reference content moved to dedicated files — docs/api.md, docs/cli.md, docs/configuration.md, and docs/prometheus-grafana.md.

Docker: docker pull greenkube/greenkube:0.2.10

Helm:

helm repo add greenkube https://GreenKubeCloud.github.io/GreenKube
helm repo update
helm install greenkube greenkube/greenkube -n greenkube --create-namespace

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track GreenKube

Get notified when new releases ship.

Sign up free

About GreenKube

All releases →

Related context

Related tools

Beta — feedback welcome: [email protected]