Repository navigation
feat(kubernetes): deploy OpenShell with bundled Helm provider - #12669
Merged
Merged
Conversation
|
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. |
# Conflicts: # .github/workflows/live-kind.yml # crates/nemoclaw-build/src/run_ci/live_kind.rs
Enforce the accepted Ownership and Recovery invariants in docs/design/scope.md by checkpointing native Helm state before deletion. Restore only a lost release binding through OpenTofu, retain current prerequisite state, and require a fresh checked plan on retry. Exercise actual-provider API outages, permission failures, interrupted deletion, and cancellation after successful apply. Document the separate deployment migration policy and test private credential and ownership boundaries. Validation: cargo ci (1,184 regular and 101 lifecycle tests), cargo ci live-kind (five checks on Linux AMD64, Kubernetes 1.37.0 and Agent Sandbox 0.5.0), and Fern checks. Kind cluster and test image cleanup verified.
gaveezy
marked this pull request as ready for review
October 6, 2026 14:03
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.
Managed Kubernetes deployments currently require a host-installed Helm CLI. This change lets OpenTofu manage the OpenShell release through the bundled
hashicorp/helmprovider, pinned to 3.3.0.Before
flowchart LR T["OpenTofu"] --> N["NemoClaw provider"] N --> H["Host Helm CLI"] H --> K["OpenShell release"] N --> A["Storage, issuer, readiness"]After
flowchart LR T["OpenTofu"] --> R["helm_release.gateway"] R --> H["Bundled Helm provider 3.3.0"] H --> K["OpenShell release"] T --> N["NemoClaw provider"] N --> A["Storage, issuer, readiness"]The runtime graph orders retained storage, development authentication,
helm_release.gateway, and gateway readiness. Teardown reverses that order and retains the namespace, encryption key, and PVCs. NemoClaw manages preparation and readiness; only the Helm provider installs, upgrades, and removes the chart release. The release cannot create/adopt the namespace or take ownership of existing resources. Issuer private material stays outside Helm values and OpenTofu state.On OpenShift, authentication preparation waits for UID/group ranges on the owned namespace and supplies numeric chart overrides through a computed OpenTofu value. The private receipt retains that identity: normal refresh rejects changed ranges, while cleanup uses the recorded identity if annotations disappear.
The bundle includes checksum-pinned provider archives and the unchanged upstream license for five platforms. The provider receives the authored kubeconfig and context; ambient Helm/Kubernetes controls and conflicting credential references are rejected. Release identity checks cover name, namespace, and chart, with an independent release-record observation before teardown accepts absence.
Recovery and migration
The pinned upstream provider can discard a release binding when a lookup fails during deletion, after planning has succeeded. SDK teardown now saves a private checkpoint before removal. If a failed or interrupted operation loses that binding, SDK recovery validates the original bundle, intent, generations, state lineage/serial, provider configuration, and retained resource identities. It then uses native OpenTofu state operations to restore only
helm_release.gateway, preserving the latest state of other resources. A retry obtains a fresh validated plan before further deletion. Successful authentication cleanup confirms release absence and prevents restoration after completed removal.Recovery makes no Kubernetes mutation or automatic deletion retry. Cancellation keeps destroy resumable, including cancellation immediately after successful native apply. Preview refuses when binding restoration is needed. Operators repair API access and rerun the normal destroy command with the same bundle and complete state directory; manual import or whole-state rollback is unnecessary. The upstream provider binary remains unchanged. See
docs/usage.mdanddocs/state.mdfor the recovery contract.docs/migration.mddefines a separate-deployment transition from the old combined gateway resource: retain the original bundle/configuration/state for recovery and retirement, and evaluate this graph with a fresh deployment UID, state directory, and unused namespace. There is no in-place state conversion or adoption of old retained storage. Native-data transfer remains outside this procedure.Local kind testing also exposed an existing issuer failure on hosts with many CPUs: Nginx's automatic worker count exceeded its 64 MiB limit. The issuer uses one worker, with a sustained HTTPS regression for that budget.
Validation
Validated commit
61d6d8984, including target branchfeat/kubernetes-profilesthrough5bb8651c2.cargo cipassed: formatting, Clippy, build, 1,184 regular tests, doctests, schema checks, verified bundle assembly, and all 101 lifecycle tests.cargo ci.cargo ci live-kindpassed all five checks (three live tests and two chart renders) on Linux AMD64, pinned Kubernetes 1.37.0, and Agent Sandbox 0.5.0. It built and loaded the OpenClaw image in a fresh cluster. Cluster deletion and removal of the test image tag were independently verified.PATH: initial plan without mutation, install, unchanged plan, authenticated access, forged-token rejection, removal, reinstallation, and retained namespace/key/PVC identities.The kind OpenShift-profile test supplies namespace range annotations and checks pod UIDs; kind does not enforce OpenShift security context constraints. This does not qualify actual OpenShift admission. SDK agent tests reach the expected unsupported Fabric health boundary and then destroy successfully; they do not establish healthy-agent behavior or inference.