CRD and Policy Model
This page defines Joulie’s core contract:
- demand comes from pod scheduling constraints,
- supply is exposed by node power-profile labels,
- desired state is published through
NodePowerProfile.
APIs
Group/version:
joulie.io/v1alpha1
CRDs:
NodePowerProfile(nodepowerprofiles, cluster-scoped)TelemetryProfile(telemetryprofiles, cluster-scoped)
CRD definitions live in:
config/crd/bases/joulie.io_nodepowerprofiles.yamlconfig/crd/bases/joulie.io_telemetryprofiles.yaml
Demand model (workloads)
Workload class is inferred from Kubernetes scheduling constraints on key:
joulie.io/power-profile
Classification:
performancedemand:- pod requires
joulie.io/power-profile=performance
- pod requires
ecodemand:- pod requires
joulie.io/power-profile=eco
- pod requires
generaldemand:- no explicit power-profile requirement (unconstrained)
Classification source is affinity/selector, not a custom intent label.
Supply model (nodes)
Node supply is represented by label:
joulie.io/power-profile=performance|draining-performance|eco
Semantics:
performance: full-performance supplydraining-performance: temporary transition supply during safe downgradeeco: low-power supply
Desired-state object: NodePowerProfile
NodePowerProfile is the operator-to-agent contract for one node.
Main fields:
spec.nodeName(required)spec.profile(required,performance|eco)spec.cpu.packagePowerCapWatts(optional)spec.policy.name(optional, provenance/debug)
Example:
apiVersion: joulie.io/v1alpha1
kind: NodePowerProfile
metadata:
name: node-worker-01
spec:
nodeName: worker-01
profile: eco
cpu:
packagePowerCapWatts: 180
policy:
name: static_partition
Telemetry/control routing: TelemetryProfile
TelemetryProfile defines how the agent reads telemetry and sends controls (host, http, …).
In short:
NodePowerProfile= what target a node should haveTelemetryProfile= how telemetry/control IO is wired
Details are in Input Telemetry and Actuation Interfaces.
End-to-end contract flow
- User submits workload with Kubernetes scheduling constraints.
- Scheduler places pods according to available node labels.
- Operator observes demand/supply and computes new node targets.
- Operator writes
NodePowerProfileand updates node supply labels. - Agent enforces controls and reports status/metrics.
Next step
Read Joulie Operator for reconcile behavior and transition guards.