Repository navigation
Share the tenant namespace for single-cluster Gateways - #925
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
|
Free's clanker here (an AI agent reviewing on Free's behalf). I re-reviewed the branch at Still open: upgrade of existing single-cluster installs (blocking) The new commits do not change this path.
The plan says "Existing split-layout resources and volumes are not migrated or deleted." That holds only for fresh installs. For an install that already runs, one of these is needed:
Whichever you pick, a regression test that starts from the split layout would cover it. Still open: isolation boundary (needs maintainer/security sign-off) Gateways (holding the Gateway password, transport token and canonical tenant credentials) now share a Kubernetes namespace with Harness Pods that run untrusted code. Isolation now rests only on per-Pod service accounts, RBAC and NetworkPolicy, and any namespace-scoped grant or policy gap now reaches Gateway Secrets. Minor (non-blocking)
|
|
Free's clanker here (an AI agent reviewing on Free's behalf). The only new commit since my last comment, |
|
Free's clanker here (an AI agent reviewing on Free's behalf). Re-review at head
Scope notes for the maintainer:
Optional nit: in an unconfigured development worker, |
|
Free's clanker here (an AI agent reviewing on Free's behalf). I checked the new merge of main, 36fb4af. The conflict resolution in the real-k3d tests keeps main's coverage. My 10-03 verdict stands. The upgrade break is resolved, and the two scope notes for the maintainer still apply:
|
|
Free's clanker here (an AI agent reviewing on Free's behalf). A heads-up from upgrading our dogfood install (single cluster, released layout, three Namespaces with Agents) to main after this landed. The new API and worker refuse to start while split-layout tenants exist, as the kubernetes-compute reference describes. The upgrade path doesn't catch that yet:
We're preparing a small fix for 1 and 2: run the Compute check in the helper's preflight before it stops anything, and add a warning to the checklist. Whether 3 should be a migration or a documented "discard first" step is your call. |
…cret in both modes Since the shared tenant namespace change (openclaw#925), embedded and dedicated Agents both keep the Gateway password in gateway-password-<suffix>; the transport Secret of a new embedded Agent carries only the token. The model-verification guide still read data[gateway-password] from the transport Secret for embedded Agents, so its embedded path failed with a missing key. Read the password Secret first in both modes and fall back to the transport Secret only for Agents deployed before the separate Secret existed.
|
Free's clanker here (an AI agent working for @freeqaz). Heads-up for @Kimiyu-186: we're designing an in-place migration off the split The shape under review: an offline step in
It keeps the refusal for anyone who doesn't run the migration. We'll link the PR or design decision here. If you already have a migration in mind or see a trap in this approach, we'd like to hear it. |
|
Free's clanker here (an AI agent reviewing on Free's behalf). A heads-up about upgrades after this PR. Releases before it created one #1643 proposes the smaller fix:
A full migration into the shared namespace is deferred. It would have to move PVCs and UID-bound credential references. #1643 reverses part of plan 0043's choice, so it is a draft and will not be merged without your or Free's agreement. Feedback on whether you'd rather keep the refusal and own a migration is very welcome. |
|
Free's clanker here (an AI agent working on Free's behalf). @Kimiyu-186, an FYI on the upgrade path from the 2026-09-28 release to this PR's shared tenant namespace: #1979 adds an in-place "adopt" step, and plan 0043's single target is kept.
We dropped the earlier alternative of keeping old-layout tenants in place (#1643), so nothing here reverses this PR's design. Review of the Compute change in #1979 is welcome if you have time. |
Single-cluster Kubernetes currently creates a separate Gateway namespace for each tenant. This change places dedicated Gateways, Harnesses and canonical tenant storage in the same created or adopted namespace. Pods, ServiceAccounts, private PVCs, node placement and exact Agent/revision network peers remain separate. Harness credential projections contain selected model credentials and transport authentication, never Gateway passwords or channel credentials. The experimental two-cluster profile keeps its separate control target.
Namespace workload managers are trusted for both roles; quotas and namespace-wide operations affect both. This is the intended namespace boundary.
Existing split-layout installations cannot upgrade in place. Configured API composition (including development) and worker startup preflight check all storage-namespace pages and explicitly refuses the old layout before tenant reconciliation. It preserves existing namespaces and state, and the operator reference explains what must be retained. This PR does not migrate private volumes or UID-bound credential references. Removing old labels or namespaces is not a migration.
Every worker, including development workers using Docker or SSH Compute, now runs the selected Driver's optional preflight and refuses startup if it fails. Configured development API composition runs it too. This covers old k3d layouts before reconciliation. The unconfigured Docker entrypoint retains its early read-only check before opening the database pool.
Concurrent legacy password delivery now re-reads a Secret after HTTP 409 and accepts only the exact-owned password with identical bytes. Foreign or conflicting sources still fail. Main's bounded runtime-image snapshot checks and worker liveness configuration are retained alongside shared-namespace assertions and configurable worker settings.
Validation at
71a1cedb(main merged atad15e741; previous mergec0409318passed full CI):Earlier native acceptance on
94364ae9covered real OpenClaw/Codex model turns, files and durable private state, attachments, Memory, Skills, mode changes, Secret rotation/rebinding, repeated API restarts and sibling-preserving deletion. Those receipts predate this merge of main; they are not a fresh native-runtime run of this revision. The current fixture results are listed above. Final required CI passes on71a1cedb, tested as GitHub merge39e6c50a64cc7b048411a267cd0542e21ef67225(run 37160853744). The final k3d configuration lane reports 22 passed, 0 failed, 0 skipped, including all four Kubernetes Compute scenarios in one run.Proof boundaries: disposable single-cluster Kubernetes, not a Helm installation, production node-pool isolation or real two-cluster execution. External Slack and OTLP acceptance are not claimed. See TASK-0043 for source and historical verification evidence.
Main refresh:
36fb4afamerges pinned maindd934c39, resolving seven conflicted files without rewriting history. Shared placement and legacy upgrade assertions follow main's new lifecycle test file and common helper. Runtime credential RBAC diagnostics, scheduling-event filtering and bounded volume cleanup from main are retained. Focused and adjacent local contracts: 537 passed, 0 failed, 1 macOS skip; lint, format, docs/links and workspace/module checks pass. Local typecheck cannot complete against the older installed dependency graph (main adds a direct Fastify compiler dependency); final clean CI passes (run 37351785476), including typecheck. The run tests merge SHA353f2ce1e2b5310f3cf2a3ca3831a3b4a425479cwith parentsdd934c39and36fb4afa. Both k3d lanes confirm all four core lifecycle/adoption/provisioning/API-worker scenarios passed with no skips; installation/deployment/chat/stop/start smoke also passes. Earlier validation above applies to71a1cedb, not this refreshed head.