You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: add scheduling recommendations for shared components and runners
* docs: mention service.trafficDistribution for zone-local traffic
Address review comment to mention trafficDistribution for shared components.
This complements pod-level scheduling by routing service traffic to endpoints
in the same zone, reducing cross-zone latency and cost.
* docs: mention .spec.trafficDistribution Kubernetes Service spec field
Addresses review comment from corrieriluca on PR #919
* docs: update trafficDistribution to PreferSameZone per reviewer feedback
PreferClose is deprecated in favor of PreferSameZone for Kubernetes Service
trafficDistribution field.
Addresses review comment from corrieriluca on PR #919.
Copy file name to clipboardExpand all lines: docs/operator-manual/runner-scheduling.md
+66-2Lines changed: 66 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Fine-tuning the scheduling of runner pods
1
+
# Fine-tuning the scheduling of Burrito pods
2
2
3
-
Burrito creates runner pods to execute plans and apply changes on your infrastructure. The scheduling of these pods can be fine-tuned to better fit your needs. (e.g. to avoid running too many pods at the same time, or to reduce the cost of your underlying infrastructure).
3
+
Burrito creates runner pods to execute plans and apply changes on your infrastructure, and it also runs shared components such as the controller, the datastore, and optionally Hermitcrab. Scheduling those workloads carefully can reduce inter-zone traffic, isolate noisy jobs, and keep costs under control.
4
4
5
5
## Limit the number of runner pods in parallel
6
6
@@ -13,3 +13,67 @@ You can also set this value in the TerraformRepository CRD by setting the `spec.
13
13
If the value of this parameter is set to `0`, there is no limit to the number of runner pods that can run in parallel.
14
14
15
15
When Burrito creates a pod, if the setting is both set in the controller and in the TerraformRepository, the TerraformRepository value will take precedence.
16
+
17
+
## Spread shared components across failure domains
18
+
19
+
When you run Burrito across multiple availability zones, spread the shared components that serve every reconciliation path:
20
+
21
+
-`datastore`
22
+
-`hermitcrab` when provider caching is enabled
23
+
- the Burrito server or controllers when you run multiple replicas
24
+
25
+
The Helm chart already exposes `deployment.nodeSelector`, `deployment.tolerations`, `deployment.affinity`, and `deployment.topologySpreadConstraints` for these components. A practical baseline is:
26
+
27
+
- use `topologySpreadConstraints` to keep replicas distributed across zones or nodes
28
+
- use anti-affinity to avoid placing every replica on the same node
29
+
- keep at least one `datastore` and `hermitcrab` pod per zone when cross-zone traffic is expensive
30
+
31
+
For example, `hermitcrab.deployment.topologySpreadConstraints` and `hermitcrab.deployment.affinity` can be used together to keep the provider cache available close to runner pods while avoiding a single-node concentration.
32
+
33
+
### Prefer zone-local traffic with `trafficDistribution`
34
+
35
+
The Helm chart exposes `service.trafficDistribution` for the `datastore`, `hermitcrab`, and `server` components. This value maps to the Kubernetes Service spec field [`.spec.trafficDistribution`](https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution). Setting this to `PreferSameZone` instructs the Service to route traffic to endpoints in the same zone as the client, reducing cross-zone traffic latency and cost. This complements the pod-level scheduling controls above by shaping where established connections land.
36
+
37
+
Example:
38
+
39
+
```yaml
40
+
hermitcrab:
41
+
service:
42
+
trafficDistribution: PreferSameZone
43
+
datastore:
44
+
service:
45
+
trafficDistribution: PreferSameZone
46
+
server:
47
+
service:
48
+
trafficDistribution: PreferSameZone
49
+
```
50
+
51
+
## Isolate runner pods onto dedicated nodes
52
+
53
+
Runner pods are usually the burstiest Burrito workload because they download code, contact providers, and execute Terraform plans or applies. If you want to keep that activity away from shared services, target a dedicated node pool for runners.
54
+
55
+
The recommended approach is to configure `spec.overrideRunnerSpec` with scheduling fields such as:
56
+
57
+
- `nodeSelector`
58
+
- `tolerations`
59
+
- `affinity`
60
+
61
+
That lets you direct runners to nodes reserved for infrastructure jobs while keeping the control plane components on a different pool. The full override mechanism is documented in [Override the runner pod spec](../user-guide/override-runner.md).
62
+
63
+
A common pattern is:
64
+
65
+
- label a dedicated node pool for Burrito runners
66
+
- taint those nodes so only runner pods land there
67
+
- add matching `nodeSelector` and `tolerations` in `overrideRunnerSpec`
68
+
- optionally add pod anti-affinity if you want to avoid stacking too many heavy runs on the same node
69
+
70
+
## Choose the knob that matches the goal
71
+
72
+
Use different scheduling controls depending on what you are optimizing for:
73
+
74
+
- **Cost control:** lower `maxConcurrentRunnerPods`, then place runners on cheaper or autoscaled nodes.
75
+
- **Lower latency:** spread `datastore` and `hermitcrab` close to the zones where runners execute; set `trafficDistribution: PreferSameZone` on their Services.
76
+
- **Isolation:** separate runners from controllers, server, and datastore with dedicated node pools.
77
+
- **Resilience:** add topology spread constraints and anti-affinity for shared multi-replica components.
78
+
79
+
Start with a simple policy, observe runner throughput and inter-zone traffic, then tighten the scheduling rules only where they solve a concrete bottleneck.
0 commit comments