Skip to content

Commit 9b656b8

Browse files
committed
feat(supervisor): optional custom scheduler
1 parent 53acdf8 commit 9b656b8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

apps/supervisor/src/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ const Env = z.object({
9090
KUBERNETES_MEMORY_REQUEST_MIN_GB: z.coerce.number().min(0).default(0),
9191
KUBERNETES_MEMORY_REQUEST_RATIO: z.coerce.number().min(0).max(1).default(1), // Ratio of memory limit, so 1 = 100% of memory limit
9292
KUBERNETES_MEMORY_OVERHEAD_GB: z.coerce.number().min(0).optional(), // Optional memory overhead to add to the limit in GB
93+
KUBERNETES_SCHEDULER_NAME: z.string().optional(), // Custom scheduler name for pods
9394

9495
// Placement tags settings
9596
PLACEMENT_TAGS_ENABLED: BoolEnv.default(false),

apps/supervisor/src/workloadManager/kubernetes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ export class KubernetesWorkloadManager implements WorkloadManager {
274274
restartPolicy: "Never",
275275
automountServiceAccountToken: false,
276276
imagePullSecrets: this.getImagePullSecrets(),
277+
...(env.KUBERNETES_SCHEDULER_NAME
278+
? {
279+
schedulerName: env.KUBERNETES_SCHEDULER_NAME,
280+
}
281+
: {}),
277282
...(env.KUBERNETES_WORKER_NODETYPE_LABEL
278283
? {
279284
nodeSelector: {

0 commit comments

Comments
 (0)