feat(deploy): wire k8s provider through New Fleet wizard submit (studio#104) - #118
Merged
Conversation
…io#104) Removes the client-side "Kubernetes provisioning isn't available yet" block in deploy.ts's identity step — the backend dispatch (deploy_ provision's provider="k8s" path) and Tauri bridges have been reachable since #117, this just connects the wizard's submit handler to them. deployForm's submit now branches on provider: k8s calls deploy_provision with provider/context/expected_principal (built from the selected namespace + service account, in the system:serviceaccount:<ns>:<name> form provision_from_library_k8s expects), then persists the new fleet to fleets-k8s.toml via a new read/write pair — k8s_fleet_config (MCP tool + Tauri bridge, mirroring fleet_config) plus the existing k8s_fleet_config_ write, since appending a block requires reading the current file first and no such read tool existed yet. Rust changes are hand-verified line by line, not locally compiled — this environment reliably OOM-kills on aws-sdk-ec2 regardless of -j/codegen settings (a known, pre-existing limitation, not new to this change); TS side is verified for real (typecheck + 106/106 tests + build all pass).
This was referenced Aug 28, 2026
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.
Summary
Connects the New Fleet wizard's actual submit path to the k8s dispatch that's been backend-reachable since #117 (Tauri bridge fix).
deploy.ts's identity step previously hard-blockedprovider === "k8s"with "Kubernetes provisioning isn't available yet — tracked in #104" — that block is removed, anddeployForm's submit handler now branches on provider:deploy_provisionwithprovider: "k8s",context(selected kubeconfig context), andexpected_principalbuilt from the selected namespace + service account in thesystem:serviceaccount:<ns>:<name>formprovision_from_library_k8sexpects (it extracts the bare name itself). On success, appends the new fleet tofleets-k8s.toml.New:
k8s_fleet_config(read)Appending a fleet block needs the current file text first (
appendK8sFleetBlock, same pattern as AWS'sappendFleetBlock) — but onlyk8s_fleet_config_writeexisted, no read counterpart. Addedk8s_fleet_config(MCP tool inoab-mcp+#[tauri::command]bridge insrc-tauri, mirroringfleet_config/fleet_config_write's existing pair) so the wizard can read-then-append instead of clobbering any existingfleets-k8s.tomlcontent.Also refactored
t_k8s_fleet_write's fleet→JSON mapping into a sharedk8s_fleets_jsonhelper reused by both the new read tool and the existing write tool.Scope note
Add-instance-to-an-existing-k8s-fleet isn't wired — the provider
<select>only appears in the identity step, which "add instance" mode skips entirely (confirmed:reset()runs on everyopen()and puts the select back to its"aws"default), so this only covers new k8s fleets via the wizard. Fine for now; flagging so it doesn't look like an oversight.Verification
npm run typecheckclean,npm test106/106 passing,npm run buildsucceeds.crates/oab-mcp,src-tauri): not locally compiled — this environment reliably OOM-kills onaws-sdk-ec2regardless of-j/codegen-units settings, a known pre-existing limitation (see fix(src-tauri): register missing Tauri command bridges for k8s onboarding tools (studio#104) #117's same disclaimer), not something new here. Every new/changed function is a small, mechanical mirror of an already-working sibling (t_fleet_config/fleet_configfor the read tool+bridge;t_k8s_fleet_write's existing mapping logic for the shared helper), hand-verified line by line against them. CI'sbuild-test+bundle-macosjobs are the real gate here.Ref #104.
🤖 Generated with Claude Code