How avivgt/keck works
Keck meters workload power on Kubernetes nodes, enriches and attributes measurements, aggregates them cluster-wide, and exposes results through a console UI. Its documented flow runs from hardware and kernel observations through per-workload attribution to agent reports, controller aggregation, and dashboard queries. The repository also includes an operator for cluster deployment and a fleet manager for multi-cluster governance. Some subsystem details are documented but their implementation was not sampled, so those branches are shown only where the README or excerpts establish the relationship.
Main entry points: main.rs Node agent · PowerManagementPage.tsx Power console · collector.rs Hardware collection · mod.rs Controller REST API
Components 32
Node measurement
- Node agent
keck-agent/src/main.rs - Hardware collection
keck-agent/src/hardware/collector.rs - RAPL energy
keck-agent/src/hardware/rapl.rs - hwmon sensors
keck-agent/src/hardware/hwmon.rs - PSU ground truth
keck-agent/src/hardware/platform.rs - GPU power
keck-agent/src/hardware/gpu.rs - eBPF observer
keck-agent/src/ebpf/mod.rs - Kernel programs
keck-ebpf/src/main.rs - Hardware counters
keck-agent/src/perf_counters.rs - Attribution engine
keck-agent/src/attribution/engine.rs - Attribution models
keck-agent/src/attribution/model.rs - Kubernetes enrichment
keck-agent/src/k8s/workload.rs - Agent ring buffer
keck-agent/src/store/mod.rs
Cluster service
- Controller REST API
keck-controller/src/api/mod.rs - Cluster aggregator
keck-controller/src/aggregator/mod.rs - Workload classification
keck-controller/src/application.rs - Kepler comparison
keck-controller/src/kepler_scraper.rs
Fleet management
- Fleet API
keck-fleet/src/api/mod.rs - Cluster registry
keck-fleet/src/registry/mod.rs - Fleet policies
keck-fleet/src/policy/mod.rs - Fleet reporting
keck-fleet/src/reporting/mod.rs
Kubernetes deployment
- Cluster operator
keck-operator/controllers/keckcluster_controller.go - KeckCluster resource
keck-operator/api/v1alpha1/types.go
Console dashboard
- Power console
keck-ui/src/components/PowerManagementPage.tsx - Cluster overview
keck-ui/src/components/cluster/ClusterOverview.tsx - Namespace view
keck-ui/src/components/namespace/NamespaceView.tsx - Application view
keck-ui/src/components/application/ApplicationsView.tsx - Node view
keck-ui/src/components/node/NodesView.tsx - Pod view
keck-ui/src/components/pod/PodView.tsx - Kepler comparison view
keck-ui/src/components/kepler/KeplerComparisonView.tsx - Dashboard API client
keck-ui/src/utils/api.ts
Other components
- Console user
Connections 30
- Cluster operator → KeckCluster resource: reconciles
keck-operator/controllers/keckcluster_controller.go - Node agent → Hardware collection: collects signals
keck-agent/src/main.rs - Node agent → eBPF observer: reads observations
keck-agent/src/main.rs - Node agent → Hardware counters: reads counters
keck-agent/src/main.rs - Node agent → Attribution engine: attributes power
keck-agent/src/main.rs - Node agent → Kubernetes enrichment: enriches workloads
keck-agent/src/main.rs - Node agent → Agent ring buffer: stores measurements
- Hardware collection → RAPL energy: reads energy
- Hardware collection → hwmon sensors: reads sensors
- Hardware collection → PSU ground truth: reads PSU
- Hardware collection → GPU power: reads GPU power
- eBPF observer → Kernel programs: loads programs
- Attribution engine → Attribution models: uses models
keck-agent/src/attribution/engine.rs - Node agent → Controller REST API: posts reports
- Controller REST API → Cluster aggregator: updates state
keck-controller/src/api/mod.rs - Controller REST API → Workload classification: uses classification
keck-controller/src/api/mod.rs - Kepler comparison → Cluster aggregator: adds comparison data
keck-controller/src/kepler_scraper.rs - Console user → Power console: opens
- Power console → Cluster overview: shows overview
- Power console → Namespace view: shows namespaces
- Power console → Application view: shows applications
- Power console → Node view: shows nodes
- Power console → Pod view: shows pods
- Power console → Kepler comparison view: compares Kepler
- Cluster overview → Dashboard API client: requests data
keck-ui/src/components/cluster/ClusterOverview.tsx - Namespace view → Dashboard API client: requests data
keck-ui/src/components/namespace/NamespaceView.tsx - Dashboard API client → Controller REST API: queries REST
- Fleet API → Cluster registry: ingests reports
keck-fleet/src/api/mod.rs - Fleet policies → Cluster registry: evaluates registry
keck-fleet/src/main.rs - Fleet reporting → Cluster registry: reports registry
keck-fleet/src/main.rs