@@ -199,11 +199,12 @@ It supplies no logical Sandbox ID, gateway session token, or workload credential
199199The controller must persist the physical session, generation and route first,
200200admit the Sandbox and gated Pod, and verify the namespace and network fences.
201201The provisioning callback builds the boundary configuration and descriptor from
202- those observations using the TLS pin supplied by the helper. On retry, the helper
203- reads the existing Secret, checks its workspace and Pod UID ownership, and compares
204- the complete bootstrap configuration with the expected one. Concurrent creators
205- use the winning Secret's identity. Read failures, changed inputs and capacity
206- refusals fail without replacing keys, deleting resources or releasing the gate.
202+ those observations using the generated TLS pin. All bootstrap Secret creates,
203+ including managed image-pull copies and dedicated supervisor material, finish
204+ before the gateway records the preparation. Recovery reads that public record
205+ and compares its descriptor with current resource observations. Incomplete
206+ attempts remain gated and expire into retirement; a conflicting or ambiguous
207+ Secret create never authorizes adopting its contents.
207208
208209` driver::warm_pool ` now owns the physical provisioning sequence through
209210` prepare_warm_runtime ` , ` resume_warm_runtime ` , and ` warm_runtime_inventory ` . It
@@ -219,26 +220,26 @@ shared-supervisor capacity before releasing the scheduling gate. Immediately
219220before release it rechecks the CR, Pod, resource admission, namespace UID and
220221network fences. Pod and CR mutations carry resource-version preconditions;
221222gate removal preserves gates owned by other controllers. Lost responses recover
222- through the CR journal and existing immutable Secret . Replacements, changed
223+ through the CR journal and gateway preparation record . Replacements, changed
223224requests and premature gate removal fail closed. A replacement needs a fresh
224225session, generation, route and Secret. Pool controllers must retain request
225226identities across uncertain writes and never reuse retired names or sessions.
226227
227- ` retire_warm_runtime ` journals retirement before asking the gateway to fence the
228- physical route permanently, including when capacity admission never completed.
229- Only a confirmed fence permits foreground deletion of the CR with UID and
228+ ` retire_warm_runtime ` asks the gateway to fence the physical route permanently,
229+ including when capacity admission never completed. Only a confirmed fence permits
230+ marking the CR retiring and deleting it in the foreground with UID and
230231resource-version preconditions. Kubernetes collects its Pod, the Pod-owned
231232bootstrap Secret and the CR-owned control policy; namespace-wide network fences
232233remain. Ambiguous failures leave the journal for retry. Concurrent claims,
233234replaced resources and changed reservations do not authorize deletion. If the
234235CR is already absent, the controller must reconcile any remaining gateway
235236preparation independently from its durable inventory.
236237
237- These operations support dedicated and shared supervisors in shared and operator
238- workspace modes. Managed namespaces need bootstrap journaling in the gateway
239- namespace to preserve their create-only Secret permissions. Inventory includes preparing, retiring
240- and deleting resources; a released gate does not mean that the supervisor has
241- authenticated the runtime or that it is claimable.
238+ These operations support dedicated and shared supervisors in shared, operator
239+ and managed workspaces. Warm pooling requires no additional workspace Secret-read
240+ permissions. Secrets deliver bootstrap material to Pods; gateway persistence owns
241+ preparation and claim recovery. Inventory includes preparing, retiring and deleting
242+ resources; a released gate does not prove that a runtime is claimable.
242243
243244Template-driven pooling is enabled by default through ` warm_pool.enabled ` .
244245The gateway supplies stored template targets through the existing in-process
@@ -255,9 +256,6 @@ operator configurations. The fingerprint covers canonical driver settings,
255256workload shape and public verification keys. Deleted templates leave journal
256257tombstones that drain old inventory, even after restart. Recreating a name gets a
257258new pool. Disabling pooling drains spares without affecting claimed sandboxes.
258- Recovery requires namespace-scoped Secret ` get ` , granted by default in shared
259- mode and by the operator workspace chart's ` gateway.warmPoolSecretReads ` setting.
260- Kubernetes cannot constrain generated names by prefix; no list/watch is added.
261259
262260Each pool attempts at most four operations concurrently per pass, retries
263261unfinished operations no sooner than 30 seconds later, and bounds an operation
@@ -279,7 +277,6 @@ the process holding the authenticated connection.
279277The loop counts reserved or released runtimes as pending until then. A missing
280278owner, preparation timeout, maximum age or
28127960 seconds without a ready observation retires the spare. Template workloads pass through the normal driver conversion and admission.
282- Managed namespace pooling remains unsupported.
283280
284281A dedicated supervisor starts with public runtime coordinates and gateway TLS trust
285282mounted before the scheduling gate opens. It holds the authenticated runtime
@@ -298,18 +295,36 @@ original physical supervisor; restart provisions a fresh generation.
298295
299296Sandbox creation from a template selects a ready spare from that template's
300297current pool revision in the same workspace. Its rendered Pod shape and child environment must match exactly;
301- non-matching requests and empty pools use cold creation. The driver writes a
302- Pod-owned immutable claim Secret, then CAS-labels the physical CR with the logical
303- Sandbox ID before gateway activation. Retirement and competing claims use the
304- same CR fence. After this point an error never falls back to a second runtime.
298+ non-matching requests and empty pools use cold creation. A create that loses a
299+ spare to another sandbox or to retirement tries the next candidate only after
300+ gateway persistence confirms the outcome. Cold selection commits a launch decision
301+ that fences delayed warm reservations. An ambiguous failure cannot fall back. The driver writes a
302+ durable claim intent through ` SharedSupervision ` , then CAS-labels the physical CR
303+ with the logical Sandbox ID before gateway activation. Reservation and retirement
304+ compete on the gateway assignment version. Retirement must win before it marks or
305+ deletes the CR; a committed reservation excludes that runtime from pool maintenance.
306+ After reservation an error never falls back to a second runtime.
305307Activation atomically replaces the proposed cold identity with the physical
306- binding and canonical credentials. The canonical registration is persisted under
307- the logical Sandbox's generation Secret name for existing recovery. Reconciliation
308- finishes interrupted claims. Restart uses a new generation and updates the Pod's
309- pair label; the original physical CR name remains unchanged.
308+ binding and canonical credentials. Intent and committed material live in the
309+ existing gateway credential store, with references in gateway assignment records.
310+ The CR stores only the intent's route. A link on the logical launch selects one
311+ intent before CR binding; retries resolve it before considering cold creation,
312+ even when pooling has been disabled. Reconciliation discovers pending claims from
313+ gateway records even before CR binding. It cancels unactivated claims whose launch
314+ ends, times out, or loses its physical runtime. Cancellation fences activation and
315+ leaves a terminal launch decision; a delayed CR binding is collected using the
316+ retirement tombstone. Recovery never falls back to workspace Secret reads. Retirement
317+ fences delayed writers before collecting their credential material. Restart uses
318+ a new generation and updates the Pod's pair label; the original physical CR name remains unchanged.
319+
320+ Development deployments using the earlier Secret-backed claim format must finish
321+ pending claims with that gateway before upgrading. The driver rejects those
322+ references explicitly; it does not read legacy claim Secrets or discard a
323+ potentially activated workload.
310324
311325The focused gateway-backed claim E2E uses fresh branch images and checks physical
312- Pod reuse, refill, exec, and stop/start with a new identity:
326+ Pod reuse, gateway restart recovery before and after claiming, refill, exec,
327+ stop/start with a new identity, and draining without workspace Secret reads:
313328
314329``` shell
315330OPENSHELL_E2E_KUBE_TLS=1 \
@@ -318,6 +333,12 @@ e2e/with-kube-gateway.sh cargo test --manifest-path e2e/rust/Cargo.toml \
318333 --features e2e-kubernetes-shared-supervisor --test kubernetes_warm_pool -- --ignored --nocapture
319334```
320335
336+ Add ` ci/values-workspace-managed.yaml ` to the values list to exercise managed
337+ namespaces and generation image-pull copies. For operator workspaces, add
338+ ` ci/values-workspace-operator.yaml ` and set ` OPENSHELL_E2E_WARM_OPERATOR=1 ` ; the
339+ test installs the workspace chart in the test cluster's default namespace.
340+ Omit ` ci/values-supervisor.yaml ` to test dedicated supervisors.
341+
321342The Kubernetes API integration test exercises real Sandbox CRD defaulting, Pod
322343creation, Secret ownership, gate release, journal recovery and conditional
323344retirement. It uses an
0 commit comments