Skip to content

Commit

Permalink
Reserve capacity in cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
jmandel committed Sep 19, 2023
1 parent 58136de commit 3851e42
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
3 changes: 2 additions & 1 deletion images/ig-build/watch-and-publish
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ echo "Waiting for the builder to complete"
cd /scratch

while true; do
inotifywait -e create -q -q . && [ -f done ] && break
[ -f done ] && break
inotifywait -e create -q -q .
done
echo "Builder completed; uploading"

Expand Down
44 changes: 44 additions & 0 deletions k8s/reserved-capacity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: low-priority
value: -10
preemptionPolicy: Never
globalDefault: false
description: "Low priority workloads"
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: default-priority
value: 0
preemptionPolicy: PreemptLowerPriority
globalDefault: true
description: "The global default priority."
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: capacity-res-deploy
namespace: fhir
spec:
replicas: 2
selector:
matchLabels:
app: reservation
template:
metadata:
labels:
app: reservation
spec:
priorityClassName: low-priority
terminationGracePeriodSeconds: 0
containers:
- name: ubuntu
image: ubuntu
command: ["sleep"]
args: ["infinity"]
resources:
requests:
cpu: 500m
memory: 20Gi

0 comments on commit 3851e42

Please sign in to comment.