Joulie Operator
The operator is Joulie’s cluster-level decision engine.
It does not write host power interfaces directly. Instead, it decides desired node states and publishes them through Kubernetes objects and labels.
Responsibilities
At each reconcile tick, the operator:
- selects eligible managed nodes,
- classifies workload demand from pod scheduling constraints,
- runs a policy algorithm to compute a plan,
- applies transition guards for safe downgrades,
- writes desired node targets (
NodePowerProfile) and node supply labels.
The agent then enforces those targets node-by-node.
Control boundary with the agent
- operator decides what each node should be (
performanceoreco) - agent decides how to apply controls on node interfaces
This separation keeps policy logic portable while actuator details stay node-local.
Reconcile flow
- Read nodes matching
NODE_SELECTOR(chart default:joulie.io/managed=true). - Ignore reserved/unschedulable nodes.
- Build demand view from active pods:
- performance-constrained
- eco-constrained
- unconstrained
- Run policy (
static_partition,queue_aware_v1, or debugrule_swap_v1). - For planned
performance -> ecotransitions, run downgrade guard:- keep
profile=ecoas desired supply - set
joulie.io/draining=truewhile performance-sensitive pods are still present
- keep
- Persist desired state through
NodePowerProfileand update node labels:joulie.io/power-profilejoulie.io/draining
Node state model
Joulie models two scheduler-facing supply states:
performanceeco
DrainingPerformance is an internal operator FSM state tracked while profile=eco and joulie.io/draining=true.
Why this model
- scheduler gets clear supply signal from node labels,
- policy can evolve independently of host control implementation,
- transitions are auditable and safer than instant downgrade.