feat: optional read-only root filesystem for run pods in the Kubernetes supervisor
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- kubernetes, typescript
- Lĩnh vực
- backend, infrastructure
Hướng nghiên cứu
Start with apps/supervisor/src/env.ts, workloadManager/kubernetes.ts, and workloadManager/kubernetesPodSpec.ts; trace how runner security context settings and pod volumes are configured. Check the existing unit tests for runnerSecurityContext and the proposed runnerTmpVolume helper. Done means both opt-in environment variables work as described, default behavior stays unchanged, and the related tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Self-hosters running Trigger.dev on Kubernetes with Pod Security / policy engines (Kyverno, OPA Gatekeeper, CIS benchmarks, some compliance scanners) are often required to run containers with readOnlyRootFilesystem: true. The supervisor's KUBERNETES_RUNNER_SECURITY_CONTEXT (off/baseline/restricted) doesn't set it, and no Pod Security Standards level requires it, so there is currently no way to get it on run pods without patching the supervisor.
Describe the solution you'd like to see
Add two opt-in supervisor env vars:
KUBERNETES_RUNNER_READ_ONLY_ROOT_FILESYSTEM(boolean, defaultfalse). When true, setssecurityContext.readOnlyRootFilesystem: trueon the run-controller container. It composes with anyKUBERNETES_RUNNER_SECURITY_CONTEXTlevel, includingoff.KUBERNETES_RUNNER_TMP_VOLUME_SIZE_LIMIT(default256Mi, blank = no per-volume cap). When read-only is enabled, anemptyDiris mounted at/tmpso tasks keep a writableos.tmpdir().
The runner runtime itself doesn't write to disk (IPC over socketpair, logs to stdout, OTLP over HTTP), so a single /tmp volume is sufficient. Default behavior is unchanged.
Describe alternate solutions
- A mutating admission webhook injecting
readOnlyRootFilesystemand a/tmpvolume. This works but adds cluster-side machinery for something the supervisor can do natively. - Maintaining a fork of the supervisor. This is what we do today and what we'd like to stop doing.
- Making
KUBERNETES_RUNNER_SECURITY_CONTEXT=restrictedimply the flag. This would break existing users, sincerestricteddoesn't imply a read-only root.
Additional information
We already run this in a private fork (including unit tests for runnerSecurityContext and the new runnerTmpVolume helper). The change touches apps/supervisor/src/env.ts, workloadManager/kubernetes.ts and workloadManager/kubernetesPodSpec.ts, and is roughly 60 lines of source. If this direction is acceptable, we'd be happy to open a PR once vouched, so we can drop our fork.
- Ngôn ngữ chính
- TypeScript
- Star
- 16.5k
- Fork
- 1.5k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của triggerdotdev/trigger.dev
-
bug: retry.fetch ignores the caller's abort signal and retries aborted requestsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
triggerdotdev/trigger.dev#5116 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: Chat transport crashes on Safari < 17.4: AbortSignal.any is not a functionCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
triggerdotdev/trigger.dev#5098 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: Side menu items lose their active state on detail pagesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
triggerdotdev/trigger.dev#5088 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: RBAC loader logs "plugin found but failed to load" when @triggerdotdev/plugins is simply not installedCó thể làm lại được @itsfaryal đã nhận 17 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
triggerdotdev/trigger.dev#5083 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
triggerdotdev/trigger.dev#5072 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của triggerdotdev/trigger.dev
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug platform-android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Termix-SSH/Mobile#146 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
devswha/herdr-web-ui#3875 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày