Skip to content

Secure, Fast, and Extensible Sandbox runtime for AI agents.

fix(charts/fast-sandbox): runtime SA sandbox read + ublkd resources knob

高然b3491c9757eb
diff --git a/manifests/charts/fast-sandbox/README.md b/manifests/charts/fast-sandbox/README.md
index f504c13bd..95e44eed7 100644
--- a/manifests/charts/fast-sandbox/README.md
+++ b/manifests/charts/fast-sandbox/README.md
@@ -89,9 +89,10 @@ The following table lists the configurable parameters of the chart and their def
| runtime.oci.cacheSizeGB | int | `16` | Node cache capacity for the shared overlaybd block cache (OVERLAYBD_CACHE_SIZE_GB); independent of VM upper layers. |
| runtime.oci.enabled | bool | `false` | Whether the node OCI stack (tools init + overlaybd-ublkd sidecar + agent flag + janitor oci-state-root) is installed |
| runtime.registrySecret | string | `"fast-sandbox-agent-registry"` | Secret carrying the compiled agent registry configuration (registry.json key with artifact-store pull credentials); must be provisioned by the operator. |
-| runtime.resources | object | `{"agent":{},"janitor":{}}` | Container resources for the DaemonSet. Setting requests matters more than limits here: without them the pod is BestEffort and is evicted first under node pressure, taking down the management API for every fastlet on the node. Limits stay off by default so artifact pulls and the readiness loop are not throttled or OOM-killed at their spikes. |
+| runtime.resources | object | `{"agent":{},"janitor":{},"ublkd":{}}` | Container resources for the DaemonSet. Setting requests matters more than limits here: without them the pod is BestEffort and is evicted first under node pressure, taking down the management API for every fastlet on the node. Limits stay off by default so artifact pulls and the readiness loop are not throttled or OOM-killed at their spikes. |
| runtime.resources.agent | object | `{}` | Resources for the firecracker-runtime agent container. |
| runtime.resources.janitor | object | `{}` | Resources for the janitor sidecar container. |
+| runtime.resources.ublkd | object | `{}` | Resources for the overlaybd-ublkd sidecar container (runtime.oci.enabled only). |
| runtime.socketDir | string | `"/run/fast-sandbox/firecracker"` | Node hostPath sharing the agent UDS socket with fastlet Pods |
| runtime.stateRoot | string | `"/var/lib/fast-sandbox/firecracker"` | Node hostPath holding per-node Firecracker state (rootfs, snapshots). Each node needs its own directory; do not share across nodes. |
| runtime.tolerations | list | `[]` | Additional tolerations for the firecracker-runtime DaemonSet pod, appended to the built-in control-plane toleration. Needed when target nodes carry infra taints (e.g. sigma.ali resource-pool taints). |
diff --git a/manifests/charts/fast-sandbox/templates/NOTES.txt b/manifests/charts/fast-sandbox/templates/NOTES.txt
index 22968b127..d2b6633a9 100644
--- a/manifests/charts/fast-sandbox/templates/NOTES.txt
+++ b/manifests/charts/fast-sandbox/templates/NOTES.txt
@@ -10,6 +10,11 @@ Components:
readiness loop: host checks, Firecracker asset install, self-applied
scheduling labels + FirecrackerReady condition; janitor sidecar;
peer discovery Service: dart.{{ include "fast-sandbox.namespace" . }}.svc)
+{{- if .Values.runtime.oci.enabled }}
+ + OverlayBD OCI stack: install-oci-tools init, overlaybd-ublkd
+ sidecar (socket /run/fast-sandbox/overlaybd/ublkd.sock), agent
+ FAST_SANDBOX_OCI_ENABLED
+{{- end }}
{{- end }}
Next steps:
@@ -24,7 +29,14 @@ Next steps:
3. Build and load the companion images from the pinned source:
manifests/release/build-fast-sandbox.sh --load-kind <cluster>
4. Create a SandboxPool with runtime: firecracker and create Sandboxes
- against it (see docs/ and examples/).
+ against it (see docs/ and examples/).
+{{- if .Values.runtime.oci.enabled }}
+ 5. OverlayBD OCI is enabled on the nodes: set FAST_SANDBOX_OCI_ENABLED=true
+ on the SandboxPool's fastlet containers too, provision the registry
+ Secret (kubernetes.io/dockerconfigjson) + fast-sandbox-registry
+ ConfigMap in the pool's namespace, and point SandboxTemplate
+ output.publish at an oci:// registry the nodes trust.
+{{- end }}
{{- if and .Values.routeKeys.create .Values.routeKeys.developmentOnly }}
WARNING: the Ed25519 controller route keys in fast-sandbox-route-keys are
diff --git a/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml b/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml
index bad21afbc..9d02cc40e 100644
--- a/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml
+++ b/manifests/charts/fast-sandbox/templates/runtime-daemonset.yaml
@@ -48,6 +48,12 @@ rules:
# The janitor sidecar's pod informer tracks this node's pods to detect
# orphans the moment their pod disappears.
verbs: ["get", "list", "watch"]
+- apiGroups: ["sandbox.fast.io"]
+ resources: ["sandboxes"]
+ # Janitor revalidates the Sandbox assignment before cleaning its
+ # retained per-Pod resources (OCI ublk devices and checkpoint packs,
+ # plus the native snapshot state).
+ verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
@@ -289,6 +295,10 @@ spec:
value: {{ .Values.runtime.oci.cacheSizeGB | quote }}
securityContext:
privileged: true
+ {{- with .Values.runtime.resources.ublkd }}
+ resources:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
readinessProbe:
exec:
command:
diff --git a/manifests/charts/fast-sandbox/values.yaml b/manifests/charts/fast-sandbox/values.yaml
index f92fa7485..b519505f2 100644
--- a/manifests/charts/fast-sandbox/values.yaml
+++ b/manifests/charts/fast-sandbox/values.yaml
@@ -209,6 +209,9 @@ runtime:
agent: {}
# -- Resources for the janitor sidecar container.
janitor: {}
+ # -- Resources for the overlaybd-ublkd sidecar container
+ # (runtime.oci.enabled only).
+ ublkd: {}
# -- Secret carrying the compiled agent registry configuration
# (registry.json key with artifact-store pull credentials); must be
# provisioned by the operator.