Skip to content

Commit 3083240

Browse files
committed
Repeat priority classes in README
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 9eb3d2b commit 3083240

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

_posts/2025-07-22-headroom-controller.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,37 @@ spec:
104104
memory: 250Mi
105105
```
106106
107+
Now set up two priority classes.
108+
109+
1. Create a default priority priorityClassName
110+
111+
```bash
112+
kubectl apply -f - << EOF
113+
apiVersion: scheduling.k8s.io/v1
114+
kind: PriorityClass
115+
metadata:
116+
name: default
117+
value: 1000
118+
globalDefault: true
119+
description: "Default priority class for all pods"
120+
EOF
121+
```
122+
123+
2. Create a low priority class for the headroom Custom Resources
124+
125+
```bash
126+
kubectl apply -f - <<EOF
127+
apiVersion: scheduling.k8s.io/v1
128+
kind: PriorityClass
129+
metadata:
130+
name: headroom
131+
description: Low priority class for headroom pods
132+
globalDefault: false
133+
preemptionPolicy: Never
134+
value: -10
135+
EOF
136+
```
137+
107138
Within a short period of time, a new Deployment will be created with the request values you specified.
108139

109140
If these Pods cannot be scheduled, the autoscaler you're using should request one or more new nodes to be added to the cluster to host them.
@@ -219,7 +250,6 @@ spec:
219250
effect: "NoSchedule"
220251
```
221252

222-
223253
## Getting started with the headroom controller
224254

225255
You can get started right away, even if you're not an OpenFaaS customer. OpenFaaS is not a pre-requisite, but we've put it under the brand to signal to customers that this is something we are supporting, and think is an important add-on for any cluster autoscaler.

0 commit comments

Comments
 (0)