Allow a Harness to reference a Substrate WorkerPool in another namespace (cross-namespace workerPoolRef)
维护者通常 1 天内回复
评估
调研方向
Start from the Harness.spec.substrate.workerPoolRef field in the api.kagent.dev/v1alpha3 CRD, which today is a LocalObjectReference resolved in the Harness's own namespace. The issue has no agreed design: it proposes an optional namespace plus either a WorkerPool allowedNamespaces selector or a ReferenceGrant-style grant. Done means a maintainer-approved mechanism exists first, then the reference, authorization and credential-namespace scoping are implemented.
由索引模型根据 Issue 内容生成。
描述
Summary
Harness.spec.substrate.workerPoolRef (api.kagent.dev/v1alpha3, kagent 1.0.0-alpha13) is a LocalObjectReference. The CRD describes it as "a WorkerPool in the resource's namespace". As a result, every namespace that runs an Agent also needs its own Substrate WorkerPool, and the worker pods run in that namespace.
We'd like the option to point a Harness at a WorkerPool in another namespace. This would be opt-in, and the pool owner would control which namespaces may use it.
Why it matters (multi-tenant clusters)
The worker (ateom) container needs far more than PodSecurity baseline allows. Here is the pod we run on Substrate 0.5.0-alpha2:
{"runAsUser":0,"capabilities":{"add":["NET_ADMIN","SYS_ADMIN","SYS_CHROOT","SYS_PTRACE","SETUID","SETGID","SETPCAP","DAC_OVERRIDE","FOWNER","CHOWN","MKNOD","NET_RAW","SETFCAP"],"drop":["ALL"]},
"seccompProfile":{"type":"Unconfined"},"appArmorProfile":{"type":"Unconfined"}}
That is expected, since the worker execs gVisor itself. It does mean that in a cluster where tenant namespaces enforce baseline, which is the normal posture for namespaces whose content tenants control, there is no place to put a tenant's Agents. Today the options are:
- Relabel every tenant namespace
privileged. This weakens the boundary for everything else in that namespace, so it would need an extra ValidatingAdmissionPolicy to pin the worker image and ServiceAccount. - Run all Agents in one platform namespace. This loses per-tenant RBAC, quotas, NetworkPolicy and Secret scoping for the Agent objects.
What we want instead: Agents, Harnesses and AgentTemplates in the tenant namespace (baseline), and workers in a platform-owned, privileged sandbox namespace per tenant, for example one per org.
Proposal
- Add an optional
namespacetoworkerPoolRef. It defaults to the Harness's namespace, so nothing changes for existing users. - Authorise cross-namespace references on the pool side, so a tenant cannot claim someone else's pool. For example, a
WorkerPoolfieldallowedNamespaces/ a namespace selector, or a Gateway-API-styleReferenceGrant. - Define what scopes to which namespace:
- The actor and session stay attributed to the Harness/Agent namespace (the atespace).
- The credential-provider namespace policy is keyed on that namespace, not the pool's.
- The snapshot location stays per Harness.
Context
- kagent 1.0.0-alpha13 + Substrate 0.5.0-alpha2 on EKS 1.37, in production since 2026-10-16.
- Related: https://github.com/kagent-dev/kagent/issues/3139 (worker capabilities/seccomp not configurable). Making those configurable would narrow the gap, but
SYS_ADMIN+Unconfinedcan never passbaseline, so the placement question stays open.
Happy to contribute the change if the direction is acceptable.
- 主要语言
- Go
- 星标
- 4.2k
- 派生
- 890
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 189
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kagent-dev/kagent 的其他 Issue
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)可能已有人在做 @talcoh2x 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 84/100
kagent-dev/kagent#3571 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Gemini catalogs omit gemini-4-argon and gemini-3.8-flash可能已有人在做 @jayunit100 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
kagent-dev/kagent#3524 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Don't add the provider's public host to egress when a ModelConfig sets baseUrl可能已有人在做 @lakshyab20 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 81/100
kagent-dev/kagent#3507 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[BUG] OpenAI and Ollama adapters send an empty tool message when a tool returns a dict可能已有人在做 @helloxjade 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
kagent-dev/kagent#3462 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
kagent-dev/kagent#3428 · 1 条评论 ·
维护者通常 1 天内回复
查看 kagent-dev/kagent 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
radius-project/radius#13744 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
mvanhorn/printing-press-library#2460 ·
维护者通常 1 天内回复
-
Mark the `--migrate-db` option to `podman system migrate` as hidden, and remove it from the Manpages未关闭Contribfest kind/cleanup
难度 2/5 1-3 小时 新手友好度 68/100
podman-container-tools/podman#30210 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 78/100
fabriziosalmi/secure-proxy-manager#619 ·
维护者通常 1 天内回复
-
bug needs-triage P1 tier:1-mechanical
难度 1/5 1 小时以内 新手友好度 88/100
krakenhavoc/cmd_and_ctrl#5434 ·
维护者通常 1 天内回复