Mercurial > code > home > repos > infra
changeset 144:476b23425f8c
jobs allowed on dash, but not really busy ones
author | drewp@bigasterisk.com |
---|---|
date | Sun, 19 Feb 2023 21:35:22 -0800 |
parents | 6b4226845254 |
children | ee0384eebee5 |
files | k8s_reserve/deploy.yaml k8s_reserve/readme |
diffstat | 2 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/k8s_reserve/deploy.yaml Sun Feb 19 21:35:22 2023 -0800 @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: reserve-cpu-dash +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: reserve-cpu-dash + template: + metadata: + labels: + app.kubernetes.io/name: reserve-cpu-dash + annotations: { prometheus.io/scrape: "false" } + spec: + containers: + - name: sleep + image: "docker.io/rancher/pause:3.6" + resources: {requests: {cpu: "3"}} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "kubernetes.io/hostname" + operator: In + values: ["dash"]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/k8s_reserve/readme Sun Feb 19 21:35:22 2023 -0800 @@ -0,0 +1,3 @@ +It's ok for k8s to use dash's ram, but it can also tie up so much cpu (notably with frigate) that I notice stalls on my desktop. + +The plan is to make a sleeper job with required.cpu=N to reserve N cpus from getting scheduled with real work.