Skip to content

Commit dfaa0e5

Browse files
committed
chore: shorten comments in kubernetesPodSpec.ts
1 parent 35eff67 commit dfaa0e5

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

apps/supervisor/src/workloadManager/kubernetesPodSpec.ts

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
import type { k8s } from "../clients/kubernetes.js";
22

33
/**
4-
* Path (relative to the kubelet seccomp root, /var/lib/kubelet/seccomp) of the
5-
* targeted seccomp profile that blocks only io_uring_setup/enter/register and
6-
* allows every other syscall. Must match the profile distributed to worker nodes
7-
* by the infra kubeadm config.
4+
* Relative path (kubelet seccomp root) of the profile blocking only io_uring
5+
* syscalls. Must match the profile deployed to worker nodes.
86
*/
97
export const BLOCK_IO_URING_SECCOMP_PROFILE = "profiles/block-io-uring.json";
108

119
/**
12-
* Node >= 24 (libuv >= ~1.52) unconditionally creates io_uring file descriptors,
13-
* which cannot be checkpointed. Launching those pods under a seccomp profile that
14-
* fails io_uring_setup makes libuv fall back to epoll, keeping the pod
15-
* checkpointable. "node" (21.x), "node-22" (UV_USE_IO_URING=0 still works) and
16-
* "bun" do not create these descriptors, so the profile is scoped to node-24+ to
17-
* avoid changing the syscall surface of existing runtimes.
18-
*
19-
* Tolerant of an "experimental-" prefix in case a non-normalized value reaches here.
10+
* Node >= 24 always creates io_uring fds, which can't be checkpointed. Blocking
11+
* io_uring_setup makes libuv fall back to epoll. Other runtimes don't need this,
12+
* so it's scoped to node-24+. Tolerates an "experimental-" prefix.
2013
*/
2114
export function runtimeRequiresSeccompProfile(runtime: string | null | undefined): boolean {
2215
if (!runtime) return false;
@@ -25,10 +18,8 @@ export function runtimeRequiresSeccompProfile(runtime: string | null | undefined
2518
}
2619

2720
/**
28-
* Applies the targeted Localhost profile that blocks only io_uring, preserving any
29-
* existing security-context fields. Unlike RuntimeDefault this restricts no other
30-
* syscalls, so it cannot break unrelated workloads (browsers, sandboxes, native
31-
* threads). Only call this for runtimes where runtimeRequiresSeccompProfile is true.
21+
* Applies the io_uring-blocking seccomp profile, preserving existing
22+
* security-context fields. Only call when runtimeRequiresSeccompProfile is true.
3223
*/
3324
export function withBlockIoUringSeccompProfile(
3425
podSpec: Omit<k8s.V1PodSpec, "containers">

0 commit comments

Comments
 (0)