Skip to content

Commit 9162407

Browse files
authored
Add tolerations for shards and proxy pods (#4435)
## Motivation We're splitting the proxies, shards, monitoring, etc into separate VMs for better resource management and isolation. ## Proposal We need to add these tolerations to ensure that the proxies and shards will only get scheduled in the appropriate VMs ## Test Plan Deployed a network with these changes plus XXX, saw the pods were deployed into separate VMs, as expected ## Release Plan - Nothing to do / These changes follow the usual release cycle.
1 parent c6c32c1 commit 9162407

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

kubernetes/linera-validator/templates/proxy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ spec:
5050
labels:
5151
app: proxy
5252
spec:
53+
{{- if eq .Values.environment "GCP" }}
54+
nodeSelector:
55+
workload: proxies
56+
tolerations:
57+
- key: proxies
58+
value: "true"
59+
effect: NoSchedule
60+
{{- end }}
5361
terminationGracePeriodSeconds: 10
5462
initContainers:
5563
- name: linera-proxy-initializer

kubernetes/linera-validator/templates/shards.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ spec:
3030
labels:
3131
app: shards
3232
spec:
33+
{{- if eq .Values.environment "GCP" }}
34+
nodeSelector:
35+
workload: shards
36+
tolerations:
37+
- key: shards
38+
value: "true"
39+
effect: NoSchedule
40+
{{- end }}
3341
terminationGracePeriodSeconds: 10
3442
initContainers:
3543
- name: linera-server-initializer

linera-service/src/cli_wrappers/helmfile.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ impl HelmFile {
4242
)
4343
.env("LINERA_HELMFILE_SET_NUM_SHARDS", num_shards.to_string())
4444
.env("LINERA_HELMFILE_LINERA_IMAGE", docker_image_name)
45+
.env(
46+
"LINERA_HELMFILE_SET_KUBE_CONTEXT",
47+
format!("kind-{}", cluster_id),
48+
)
4549
.arg("sync")
4650
.arg("--wait")
47-
.args(["--kube-context", &format!("kind-{}", cluster_id)])
4851
.spawn_and_wait()
4952
.await
5053
}

0 commit comments

Comments
 (0)