Skip to content

feat(kubernetes): set a managed gateway's StorageClass and resources - #14771

Merged
cv merged 2 commits into
v1from
feat/14588-chart-settings
Nov 24, 2026
Merged

cv merged 2 commits into
v1from
feat/14588-chart-settings

Conversation

@gaveezy

@gaveezy gaveezy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

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. On the openshift target, a shared supervisor also leaves its user, group, and fsGroup to 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" in spec.gateway.config made the chart run its shared supervisor as UID and group 65534, which restricted-v2 refuses.

Resolves #14588, as proposed there: supervisor.network.additionalCaConfigMapName goes to #14486, there is no UID field, and rbac.clusterScoped.create, dataStorageSize, gateway pull Secrets and multi-replica gateways stay out of scope.

Change

  • target.kubernetes and target.openshift take dataStorageClass, passed to the chart's server.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).
  • They take resources, Kubernetes' requests/limits shape with only cpu and memory, passed to the chart's resources as 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 Mi or Gi only, since Kubernetes reads 256m as 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.
  • On the openshift target, the chart values also set supervisor.podSecurityContext's runAsUser, runAsGroup and fsGroup to null, 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).
  • The intent record moves to version 32, so this release refuses state from v0.1.0-rc12 and earlier.
  • Docs: a Kubernetes guide section for both fields, the two limits.md rows 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):

  • A deployment with dataStorageClass naming a second, non-default class of k3s's local-path provisioner, and resources of 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 wrote 1500m), the agent replied, and a second plan changed nothing.
  • Changing resources to 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.
  • Plan and apply refused a changed or removed dataStorageClass, memory of 1536m, a 2Gi request above a 1536Mi limit, and an unquoted cpu: 2, each with its rule, and left intent.json unchanged.
  • A deployment whose dataStorageClass named a class that didn't exist: its claim stayed pending, and apply failed after Helm's 600-second wait with context 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 openshift target's values and supervisor_topology = "gateway", was created in a scratch namespace with and without the new nulls. Without them, restricted-v2 refused 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 and fsGroup. No deployment with a shared supervisor has run on OpenShift.

🤖 Generated with Claude Code

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]>
@gaveezy

gaveezy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Claude Code 2.1.330 (desktop app, Code tab) Session record's version field
Skills recorded nemoclaw-contributor-create-pr (complete read); write-tests (complete read, in two parts) Repository skill files read in full; no Skill tool invocations to cutoff
Instruction files recorded AGENTS.md (complete read; also injected by a hook); WRITING.md (complete read); internal-docs/contributing/configuration-schema.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read); the user's memory index (injected) File reads and injections to cutoff
Tool calls recorded total: 248; Bash: 216; Edit: 20; update_plan: 4; Write: 3; Read: 2; Monitor: 2; ToolSearch: 1 Attempted calls to cutoff, including failed and refused ones; no subagents; commands run inside Bash are not counted separately
Tokens recorded input: 73863083; cached input: 73406947; output: 180111 Final usage of each assistant response to cutoff, by message and request ID
Session window recorded 2026-11-23T02:52Z to 2026-11-23T03:32Z; 40 min First record to cutoff, including idle time
Compactions recorded 0 Complete record to cutoff
Models recorded claude-opus-5-5 Assistant records; no changes
Reasoning levels recorded max Effort recorded on each request; no changes

@copy-pr-bot

copy-pr-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the v1 NemoClaw v1 branch label Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

@gaveezy gaveezy self-assigned this Nov 23, 2026
@sandl99
sandl99 marked this pull request as ready for review November 24, 2026 03:20
@sandl99
sandl99 requested a review from cv November 24, 2026 03:20
@github-actions

Copy link
Copy Markdown
Contributor

Selected hardware E2Es

Commit: 28ef6bc18ff2205a12fa07c04955ba51c3782c62

Selected cases run automatically; results do not gate merging.

Shared code or test infrastructure changed.

  • dgx-station-openclaw-nemotron
  • docker-openclaw-hermes-ollama
  • docker-openclaw-llama-cpp
  • docker-openclaw-vllm
  • docker-openclaw-vllm-shared

@cv
cv enabled auto-merge (squash) November 24, 2026 03:26
@cv
cv merged commit 0d594dc into v1 Nov 24, 2026
103 checks passed
@cv
cv deleted the feat/14588-chart-settings branch November 24, 2026 03:34
@sandl99

sandl99 commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Live Kubernetes validation recorded on 2026-11-24, posted after merge.

Tested PR head 28ef6bc18ff2205a12fa07c04955ba51c3782c62, using a Linux AMD64 bundle and dummy Fabric agent image built from that checkout. This run used a dedicated Ubuntu 24.04 VM with 15 GiB RAM and a single-node kubeadm cluster, rather than kind.

GoldenPath's v1 Kubernetes host preparation at f277a3e9e22bf3e02537e318a4627ee048b1f375 completed both --apply --with-docker and --verify --with-docker with K8S_PREREQUISITES_READY. The node was Ready on Kubernetes 1.37.1 and containerd 2.2.1; Calico, CoreDNS, local-path storage, and Agent Sandbox controllers were Running.

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:

Check Observed result
Gateway data PVC Bound, 1 GiB, StorageClass nc-pr14771-local-path
Sandbox workspace PVC Bound, 2 GiB, default StorageClass local-path
Gateway container requests CPU 300m, memory 384Mi
Gateway container limits CPU 1500m, memory 1536Mi; Kubernetes normalized the authored "1.5" CPU
Gateway, development issuer, supervisor, and dummy agent pods Each 1/1 Running, zero restarts at the last inspection

The gateway pod's observed resources were:

{
  "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 (APPROVAL_UNAVAILABLE). The attempted wrapper consequently found no script and made no update. The deployment remained Running at the last inspection.

The agent was org.nemoclaw.dummy; no model inference or agent invocation was tested. This establishes the initial YAML-to-gateway StorageClass and resource mapping on this cluster, not broader agent or platform support.

A separate input-path observation was preserved: an explicit policy with network_policies: {} passed schema validation but OpenTofu plan failed with Missing block label / At least one object property is required, whose name represents the network_policies block's key. The successful deployment used the default isolated policy. That error was not diagnosed or fixed in this run.

Raw evidence remains on the test host under the run's evidence/ directory: host-check.txt, host-apply.txt, host-verify.txt, build.txt, deployment-initial.yaml, plan-initial.txt, apply-initial.txt, objects-initial.json, plan-unchanged.txt, export.txt, and plan-empty-policy-failure.txt. No private host address, kubeconfig, state contents, or credentials are included here.

@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants