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
feat(supervisor): harden org placement override parsing and visibility
Blank env value now means no overrides instead of failing startup.
Tolerations also accept an array of entries to match the Helm list
shape, scalar node selector values are coerced to strings, keys and
values are trimmed, and empty selector values are rejected since they
would pin the org to nothing. Startup fails when an override pins the
large-machine pool while non-large presets are required to stay off
it. The supervisor logs configured override orgs at startup and warns
when an override replaces a default node selector key.
message: `Org "${orgId}" pins run pods to the large-machine pool, but non-large presets are required to stay off it, so those runs would never schedule. Use a different pool or disable KUBERNETES_LARGE_MACHINE_AFFINITY_ENABLED.`,
message: `Invalid node selector value "${value}" for key "${key}". Must be a Kubernetes label value: alphanumeric, with dashes, underscores and dots inside, at most 63 characters.`,
message: `Invalid node selector key "${rawKey}". Must be a Kubernetes label key, optionally prefixed with a DNS subdomain.`,
168
+
});
169
+
continue;
170
+
}
171
+
172
+
if(!value){
173
+
ctx.addIssue({
174
+
code: z.ZodIssueCode.custom,
175
+
message: `Empty node selector value for key "${key}". Remove the key instead of blanking the value.`,
176
+
});
177
+
continue;
178
+
}
179
+
180
+
if(!isLabelValue(value)){
181
+
ctx.addIssue({
182
+
code: z.ZodIssueCode.custom,
183
+
message: `Invalid node selector value "${value}" for key "${key}". Must be a Kubernetes label value: alphanumeric, with dashes, underscores and dots inside, at most 63 characters.`,
184
+
});
185
+
continue;
186
+
}
187
+
188
+
result[key]=value;
163
189
}
164
-
}
165
-
});
190
+
191
+
returnresult;
192
+
});
166
193
167
194
/**
168
-
* Per-organization placement overrides for run pods, as JSON keyed by org id:
195
+
* Per-organization placement overrides for run pods, as JSON keyed by the
Copy file name to clipboardExpand all lines: docs/self-hosting/env/supervisor.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ mode: "wide"
48
48
|`KUBERNETES_NAMESPACE`| No | default | The namespace that runs should be in. |
49
49
|`KUBERNETES_WORKER_NODETYPE_LABEL`| No | v4-worker | Nodes for runs need `nodetype=<this>`. Empty: any node. |
50
50
|`KUBERNETES_RUNNER_TOLERATIONS`| No | — | Run pod tolerations. CSV: `key=value:effect`/`key:effect`. |
51
-
|`KUBERNETES_ORG_PLACEMENT_OVERRIDES`| No | — | Per-org node selector and tolerations. JSON keyed by org ID.|
51
+
|`KUBERNETES_ORG_PLACEMENT_OVERRIDES`| No | — | Per-org node selector and tolerations for run pods, merged over the defaults. JSON keyed by the org's internal ID (the `org` label on run pods). |
52
52
|`KUBERNETES_IMAGE_PULL_SECRETS`| No | — | Image pull secrets (CSV). |
53
53
|`KUBERNETES_EPHEMERAL_STORAGE_SIZE_LIMIT`| No | 10Gi | Ephemeral storage size limit. Applies to all runs. |
54
54
|`KUBERNETES_EPHEMERAL_STORAGE_SIZE_REQUEST`| No | 2Gi | Ephemeral storage size request. Applies to all runs. |
Copy file name to clipboardExpand all lines: hosting/k8s/helm/values.yaml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -297,7 +297,9 @@ supervisor:
297
297
namespace: ""# Default: uses release namespace
298
298
workerNodetypeLabel: ""# When set, runs will only be scheduled on nodes with "nodetype=<label>"
299
299
runnerTolerations: [] # Run pod tolerations, e.g. ["dedicated=runs:NoSchedule"]
300
-
orgPlacementOverrides: {} # Per-org run pod placement, e.g. {"<orgId>": {"nodeSelector": {"pool": "dedicated"}, "tolerations": "dedicated=runs:NoSchedule"}}
300
+
# Per-org run pod placement, keyed by the org's internal ID (the `org` label on run pods).
301
+
# Merged over the default node selector. e.g. {"<orgId>": {"nodeSelector": {"pool": "dedicated"}, "tolerations": ["dedicated=runs:NoSchedule"]}}
0 commit comments