Pod Compatibility for Joulie
Joulie uses Kubernetes scheduling constraints as the single source of truth for workload placement intent.
Power profile supply is exposed on node label:
joulie.io/power-profile=performancejoulie.io/power-profile=ecojoulie.io/power-profile=draining-performance (transition state)
Workload behavior:
performance workload: require joulie.io/power-profile=performanceeco workload: require joulie.io/power-profile=eco- unconstrained workload: no power-profile affinity, can run on either profile
Base Pod Spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| apiVersion: apps/v1
kind: Deployment
metadata:
name: my-workload
spec:
replicas: 1
selector:
matchLabels:
app: my-workload
template:
metadata:
labels:
app: my-workload
spec:
containers:
- name: app
image: ghcr.io/example/app:latest
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| apiVersion: apps/v1
kind: Deployment
metadata:
name: my-workload
spec:
replicas: 1
selector:
matchLabels:
app: my-workload
template:
metadata:
labels:
app: my-workload
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: joulie.io/power-profile
operator: In
values: ["performance"]
containers:
- name: app
image: ghcr.io/example/app:latest
|
Eco-only Pod (lines to add)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| apiVersion: apps/v1
kind: Deployment
metadata:
name: my-workload
spec:
replicas: 1
selector:
matchLabels:
app: my-workload
template:
metadata:
labels:
app: my-workload
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: joulie.io/power-profile
operator: In
values: ["eco"]
containers:
- name: app
image: ghcr.io/example/app:latest
|
Unconstrained Pod
Do not set power-profile affinity. Kubernetes can schedule it on either eco or performance nodes.
Reference manifests: