Repository navigation
feat(kubernetes): set a managed gateway's StorageClass and resources - #14771
Conversation
A managed kubernetes or openshift gateway takes dataStorageClass, the StorageClass of its data volume, and resources, its container's CPU and memory requests and limits, which reach the OpenShell chart as written. Plan refuses a changed dataStorageClass on an existing deployment, memory that isn't whole Mi or Gi, and a request above its limit. On the openshift target, the chart values also unset the shared supervisor's runAsUser, runAsGroup and fsGroup, as the chart's OpenShift overlay does, so restricted-v2 admits it when supervisor_topology is "gateway". The intent record moves to version 32. Resolves #14588 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Hai Nguyen <[email protected]>
Authoring session — opening
|
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Selected hardware E2EsCommit: Selected cases run automatically; results do not gate merging. Shared code or test infrastructure changed.
|
|
Live Kubernetes validation recorded on 2026-11-24, posted after merge. Tested PR head GoldenPath's v1 Kubernetes host preparation at A hand-written NemoClaw YAML selected these gateway settings: spec:
gateway:
management: managed
target:
kubernetes:
kubeconfig: {env: NEMOCLAW_CLUSTER_KUBECONFIG}
context: gtc-dc
namespace: nc-pr14771-20261124
authentication:
profile: development
dataStorageClass: nc-pr14771-local-path
resources:
requests: {cpu: 300m, memory: 384Mi}
limits: {cpu: "1.5", memory: 1536Mi}Plan and apply succeeded. Kubernetes then reported:
The gateway pod's observed {
"limits": {"cpu": "1500m", "memory": "1536Mi"},
"requests": {"cpu": "300m", "memory": "384Mi"}
}The follow-up plan and export commands completed successfully. Export/reapply, resource-update rollout, sandbox/runtime preservation across that rollout, StorageClass-change refusal, and teardown were not verified: the SSH connector refused the verification-script upload when its approval prompt timed out ( The agent was A separate input-path observation was preserved: an explicit policy with Raw evidence remains on the test host under the run's |
A managed
kubernetesoropenshiftgateway takesdataStorageClass, the StorageClass of its data volume, andresources, its container's CPU and memory requests and limits, which reach the OpenShell chart as written. On theopenshifttarget, a shared supervisor also leaves its user, group, andfsGroupto OpenShift, as the gateway does.Problem
A managed cluster gateway's data volume always took the cluster's default StorageClass, and its container always requested 250m CPU and 256Mi and was limited to 1 CPU and 2Gi. On a cluster without a default StorageClass, the volume's claim stayed pending until Helm's wait timed out; a default on NFS doesn't suit the gateway's SQLite database, which runs in write-ahead-log mode; and a namespace LimitRange with a lower maximum refused the fixed resources. On OpenShift,
supervisor_topology = "gateway"inspec.gateway.configmade the chart run its shared supervisor as UID and group 65534, whichrestricted-v2refuses.Resolves #14588, as proposed there:
supervisor.network.additionalCaConfigMapNamegoes to #14486, there is no UID field, andrbac.clusterScoped.create,dataStorageSize, gateway pull Secrets and multi-replica gateways stay out of scope.Change
target.kubernetesandtarget.openshifttakedataStorageClass, passed to the chart'sserver.dataStorageClass. Without it, the claim keeps the cluster's default.Like the target, exposure and endpoint, it is fixed after the first plan: plan and apply refuse an added, removed or changed class with
state is bound to a different gateway StorageClass, because the claim keeps the class it was created with and a StatefulSet's claim template can't change. NemoClaw doesn't check that the class exists (it reads no cluster-wide objects).resources, Kubernetes'requests/limitsshape with onlycpuandmemory, passed to the chart'sresourcesas written. Omitted, the gateway keeps 250m/256Mi and 1/2Gi; set, it replaces all four, so a quantity it leaves out takes Kubernetes' default. A change restarts the gateway.The schema accepts memory in whole
MiorGionly, since Kubernetes reads256mas thousandths of a byte, and CPU as quoted cores with up to three decimals or as millicores. The parser refuses a request above its limit, which the API server would refuse only when Helm creates the gateway's StatefulSet, partway through apply.openshifttarget, the chart values also setsupervisor.podSecurityContext'srunAsUser,runAsGroupandfsGrouptonull, as the chart's OpenShift overlay does. They go with the gateway's nulls once the chart leaves OpenShift's IDs alone ([OpenShift] Remove the null gateway UID and fsGroup override when the pinned OpenShell chart includes NVIDIA/OpenShell#5483 #13828, feat(helm): let OpenShift assign the gateway's UID and fsGroup without value overrides ai-openshell/openshell#5483).v0.1.0-rc12and earlier.limits.mdrows for [Managed gateway] Decide which OpenShell chart-only settings NemoClaw exposes as typed fields #14588 removed and the OpenShift row updated, a troubleshooting row for the new refusal, and the release-candidate notes.Left out: a CPU written as a YAML number, such as
cpu: 2, is refused with a message to quote it, so that each quantity has one spelling and plan can compare a request with its limit.Beyond CI
Run by hand on this branch's bundle with an OpenClaw image built from it, on a single-node k3s v1.37.1 cluster (Agent Sandbox 1.0.3, hosted NVIDIA inference):
dataStorageClassnaming a second, non-default class of k3s's local-path provisioner, andresourcesof 300m/384Mi requested and"1.5"/1536Mi limits: the gateway's claim was bound in that class, the gateway container had exactly those resources (Kubernetes wrote1500m), the agent replied, and a second plan changed nothing.resourcesto 250m/512Mi requested and only a 3Gi memory limit: apply replaced only the gateway pod, which then had no CPU limit; the agent's pod, its supervisor and its runtime stayed, the agent replied through the new gateway, and a second plan changed nothing. The plan also updates the sandbox, agent, provider and workspace in place, because each carries the gateway's settings, as for any change to them.dataStorageClass, memory of1536m, a 2Gi request above a 1536Mi limit, and an unquotedcpu: 2, each with its rule, and leftintent.jsonunchanged.dataStorageClassnamed a class that didn't exist: its claim stayed pending, and apply failed after Helm's 600-second wait withcontext deadline exceeded, leaving the claim. Once the class existed, applying the same document again bound that claim in it, the gateway kept the default resources, the agent replied, and a second plan changed nothing.On OpenShift Local 4.22.14, the chart's shared supervisor Deployment, rendered from the pinned chart with the
openshifttarget's values andsupervisor_topology = "gateway", was created in a scratch namespace with and without the new nulls. Without them,restricted-v2refused its pod (65534 is not an allowed group,65534: must be in the ranges: [1000670000, 1000679999]); with them, it admitted the pod as the range's first UID andfsGroup. No deployment with a shared supervisor has run on OpenShift.🤖 Generated with Claude Code