Repository navigation
Conversation
Managed model services on a Kubernetes gateway will be placed with Kubernetes' own objects (claims, Deployments, Services and NetworkPolicies), the way Docker services are placed with the Docker provider. This commit only bundles the provider; nothing declares it yet. - versions.json pins hashicorp/kubernetes 3.3.0 for all five platforms. The checksums come from the release's SHA256SUMS, whose signature was verified against HashiCorp's signing key fingerprint C874011F0AB405110D02105534365D9472D7468F. The source revision is a612b9cfce0fd1321cf2d25084b07b8fccd79737. - The builder installs it like the Helm provider: the exact binary entry and the unchanged LICENSE.txt, as licenses/kubernetes-provider-LICENSE. The two share one installer. - The SDK pins the version (`kubernetes::models::PROVIDER_VERSION`), and a bundle without the provider or its license is rejected. - The provider reads `KUBE_*` settings, which processes the SDK starts already don't inherit. A test now names them. - docs/build.md and docs/provider.md list the provider. It is the only bundled provider with ephemeral resources and provider functions; generated graphs use none. The bundle grows by about 61 MB per platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ways ## Failure A managed Kubernetes or OpenShift gateway rejects `spec.services`, so a cluster deployment needs a model server deployed by hand (#13063). The earlier attempt, #13061 and #13062 at 9d3deaf, reconciled Pods through the SDK with its own placement, readiness over exec and generated keys. It was closed under docs/design/scope.md's upstream-boundary rule. ## Decision Place cluster model services the way Docker services are placed: the runtime contract describes the server, and an upstream provider runs it. NemoClaw declares the objects; it runs no controller of its own. - Configuration: a vLLM or Ollama service beside a managed Kubernetes or OpenShift gateway needs `kubernetes` settings: requests, `storageGiB`, optional `storageClass`, `nodeSelector`, `tolerations` and `runtimeClassName`, and for bearer vLLM `keySecret`, a platform Secret NemoClaw never reads. Both container limits are required. Docker placement, publication, host IPC and the ports OpenShell refuses are rejected. External gateways still reject services, and Docker and Podman reject `kubernetes`. - Routing: `serviceRef` resolves to the Service's cluster address. An authenticated service's provider names the same key in `credential`, as #13063's in-cluster providers do. That credential is accepted only there, and the schema keeps rejecting it elsewhere. - Compile: per service, `data.vllm_runtime` or `data.ollama_runtime` plus four `kubernetes_*_v1` objects: - a retained claim (`prevent_destroy`, `wait_until_bound = false`); - a NetworkPolicy that admits only OpenShell supervisors; - a one-replica `Recreate` Deployment running `launch.*` with the requests and limits and one `nvidia.com/gpu`. Its readiness probe is `launch.ready_command`, and it sets `NEMOCLAW_RUNTIME_ON_STOP=hold` (both from the runtime change this builds on); - a ClusterIP Service. `join` already holds every object until the Deployment's rollout completes. - Safety: - `updatePolicy: Preserve` refuses a plan that would replace a serving Pod: a delete, or a Pod-template change, unless OpenTofu is replacing a tainted Deployment. - The claim follows the Docker cache's rules: it is never dropped or replaced, and destroy keeps it. - A reapply after destroy reads only that claim's metadata and imports it when its owner label matches; any other owner stops apply. - State bindings flatten the objects to their name, namespace and owner. - The NetworkPolicy warning from #13062 is kept. ## Validation - New SDK tests: - configuration rules and routing (`cluster_service_config`); - compiled objects, gating, teardown and escaping (`cluster_services_compile`); - claim import against the in-memory API; - the cluster Preserve matrix, claim retention, state parsing and the NetworkPolicy warning. - New lifecycle test `cluster_models`: both fixtures' objects pass init, validate and plan with the bundled Kubernetes, vLLM and Ollama providers against a cluster that does not exist. The containers carry the contract's entrypoint, port, readiness command and key variable. - `cargo ci` on linux_arm64 (Rust 1.99.1) passed in 271 s: fmt, clippy, build, test (1624 passed, 202 skipped), schema, bundle and lifecycle (151 passed, 52 skipped), all within budget. `nemoclaw-build docs --check` passed. The authoring journey test now covers 42 single-sandbox examples, including the two new managed cluster examples. - Not run: any real cluster, GPU, OpenShift security constraint or NetworkPolicy plugin. The bundled Kubernetes provider sends protobuf, so the JSON in-memory API can't exercise create, update or delete; that needs the kind suite. docs/limits.md says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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. |
`cluster_models` failed on windows_amd64 because it cleared the environment before running OpenTofu. Without `SYSTEMROOT` and the other Windows system variables, the Kubernetes provider failed its go-plugin handshake. The test now passes those variables on, as the SDK does for its providers (`process::PLATFORM_VARIABLES`). It still passes on linux_arm64 against the local bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`stage_runtime_sources` ran `cargo package` online, so every call fetched the crates.io sparse index while holding Cargo's package cache lock. When the registry stalled on a CI runner, the runtime source identity test hung past its 24 s limit (run 39286680504, linux_amd64), and the other tests that take that lock, `cargo tree --offline` and `cargo generate-lockfile --offline`, waited 14-19 s behind it. The workspace lockfile already pins every dependency, so pass `--offline`: Cargo builds the package's lockfile from the index it has already cached. Online and offline packaging produce identical files. The new test points Cargo at an unreachable proxy and stages the sources. It failed with a registry connection error before this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rvices' into fix/13489-offline-runtime-package
…ices The base branch merged v1 up to 0bc2601. Resolutions: - SecretRef/FileRef split (#13222): `credential` on an inference provider is now a `SecretRef`. The cluster key keeps its description (the same key as the service's `kubernetes.keySecret`), and `InferenceTarget::Service` carries `Option<&SecretRef>`. The authored form, `credential: {env: …}`, is unchanged, so the examples and fixtures stay as they are. - context_advisory.rs was removed (#13485). This branch had only widened its `InferenceTarget::Service` pattern, so the merge takes the deletion and drops the call in `Deployment::run`, keeping the NetworkPolicy warning before it. - Runtime images now build with Bake under image/ (#13507), which removed nemoclaw-build's runtime_source.rs and tests/runtime_engine.rs. The merge takes both deletions. That also removes 05fb557's `--offline` packaging and its test: on Live/Docker runners, archived tests ran with a Cargo home that lacked the OpenShell git checkout, so offline packaging failed ("you are in the offline mode"). - The authoring journey count is 41: v1 removed one single-sandbox example and this branch adds two. - The schema and configuration reference are regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #13062, rebuilt on
v1's provider model. #13062 was a SDK-side Kubernetes reconciler stacked on #13061; its branchsplit/7-cluster-model-servicesstays at 9d3deaf. It was parked after #13131, and #13061 was closed underdocs/design/scope.md's upstream-boundary rule. This PR keeps none of that reconciler.Stacked on #13487 (
feat/runtime-ready-hold), whose commit is this branch's first; it targets that branch and moves tov1once #13487 merges. Merging still waits on the maintainers' answer in #12641 about NemoClaw placing model servers on clusters.What it does
A managed vLLM or Ollama service beside a managed Kubernetes or OpenShift gateway compiles the way a Docker service does:
data.vllm_runtimeordata.ollama_runtimedescribes the server, and an upstream provider runs it. Here the provider is the bundled hashicorp/kubernetes 3.3.0, which Kubernetes then runs, schedules and restarts.kubernetes_persistent_volume_claim_v1prevent_destroy, kept on destroy, imported again on reapply when its owner label matcheskubernetes_network_policy_v1kubernetes_deployment_v1Recreate, runninglaunch.*. Requests fromkubernetes, limits fromcontainer, onenvidia.com/gpu. Readiness probelaunch.ready_command, andNEMOCLAW_RUNTIME_ON_STOP=holdkubernetes_service_v1serviceRefresolves tohttp://<name>.<namespace>.svc.cluster.local:<port>/v1Keys: an authenticated vLLM server reads
kubernetes.keySecret, a Secret the platform owns. The provider'scredentialnames the same key wherenemoclawruns, as #13063's in-cluster providers do.The upstream-boundary questions
docs/provider.mdshows for Docker.Differences from #13062 (9d3deaf)
kubernetes::services, about 7.3k lines in feat(sdk): reconcile cluster model storage and workloads through the Kubernetes API #13061);openshell_kubernetes_service{,_storage}types;nemoclaw-tofu'sderived_input;pods/exec;imageMetadata;serviceRef).keySecret;examples/kubernetes/managed-{vllm,ollama}.yaml;kubernetes.md"Run a Managed Model Service").Validation
cargo cion linux_arm64: see the commit message for the numbers.cluster_models: both fixtures' objects pass init, validate and plan with the bundled Kubernetes, vLLM and Ollama providers against an unreachable cluster.Not covered (deferred)
nvidia.com/gpu.cargo images qualifyfor the readiness symlink, which need Docker.🤖 Generated with Claude Code