Skip to content

Commit 92b04b3

Browse files
committed
Add runner affinity policy
1 parent 686a65d commit 92b04b3

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

k8s/app-chart/templates/runner_deployment.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ spec:
1717
labels:
1818
app: "runner"
1919
spec:
20+
affinity:
21+
podAntiAffinity:
22+
requiredDuringSchedulingIgnoredDuringExecution:
23+
- labelSelector:
24+
matchExpressions:
25+
- key: app
26+
operator: In
27+
values: ["runner"]
28+
topologyKey: "kubernetes.io/hostname"
2029
volumes:
2130
- name: users-code-path
2231
hostPath:
@@ -40,9 +49,7 @@ spec:
4049
initialDelaySeconds: 5
4150
periodSeconds: 5
4251
successThreshold: 1
43-
command:
44-
- bin/runner
45-
- start
52+
command: ["bin/runner","start"]
4653
ports:
4754
- containerPort: 4001
4855
volumeMounts:

k8s/app-chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ codebattle:
2626
CODEBATTLE_PORT: 4000
2727

2828
runner:
29-
replicaCount: 1
29+
replicaCount: 2
3030
# Deployment or DaemonSet
3131
type: Deployment
3232
image:

0 commit comments

Comments
 (0)