Skip to content

feat(local): kind extraMounts + Dory docker for hostPath spike - #92

Merged
patrickleet merged 2 commits into
fix/workbench-preserve-shared-identity-nsfrom
feat/kind-hostpath-extramounts
Aug 12, 2026
Merged

patrickleet merged 2 commits into
fix/workbench-preserve-shared-identity-nsfrom
feat/kind-hostpath-extramounts

Conversation

@patrickleet

Copy link
Copy Markdown
Collaborator

Summary

Spike for [[specs/local-workbench/proposals/kind-dory-hostpath-named-clusters]] (experimental): kind on Dory’s docker engine with $HOME extraMounts so hostPath delivery can pass the node probe on Mac.

  • build_kind_config injects kind extraMounts for $HOME
  • Auto DOCKER_HOST=unix://$HOME/.dory/dory.sock when unset and sock exists (toward --docker-provider dory)
  • Registry hostPort 30501 when product dory-k8s is present (avoids 30500 clash; LWB-REQ-254 seed)
  • Post-create docker exec … test -d $HOME verification

Live evidence (this machine)

hops local reset --backend kind
# kind docker engine: DOCKER_HOST=unix://…/dory.sock
# kind registry hostPort=30501
# Creating kind cluster 'hops' with extraMounts /Users/… → /Users/…
# kind node sees host mount path /Users/…
MOUNT_OK
docker inspect: /Users/patrickleet -> /Users/patrickleet

Test plan

  • cargo test --bin hops-cli kind:: (9 tests)
  • Live recreate on Dory + mount probe
  • Follow-up: full hops local up hostPath selection + UI HMR dogfood
  • Follow-up: --cp/--dp CLI (still --backend kind this PR)
  • Follow-up: named clusters + workspace→cluster registry

Stack

Base: fix/workbench-preserve-shared-identity-ns (stacked workbench series).

Mount $HOME into the kind node so Mac worktrees are node-visible for
hostPath delivery (LWB proposal kind-dory-hostpath-named-clusters).

- build_kind_config with extraMounts; auto DOCKER_HOST from ~/.dory/dory.sock
- shift registry hostPort to 30501 when product dory-k8s holds 30500
- verify mount after create; unit tests for config

Live: hops local reset --backend kind on Dory → node sees $HOME.
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e664dfde-673b-4d00-8961-7642680aaf53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Productize Wave A residual (LWB-REQ-250/251/261):
- pure pick_registry_host_port + NodeMountReport for create/doctor
- doctor Source delivery section: kind projects-root mount visibility
- happy-path docs: preferred Mac path kind+Dory, reset for mounts

Live: kind node sees $HOME; doctor reports hostPath capable.
@patrickleet
patrickleet merged commit e92d525 into main Aug 12, 2026
5 checks passed
patrickleet added a commit that referenced this pull request Aug 12, 2026
)

* feat(local): dual providers, named kind clusters, workspace cluster bind

Wave B–D residual for local-workbench epic:

- --cluster-provider/--cp and --docker-provider/--dp with --backend alias
- providers.json persist; apply_docker_provider_env for dory sock
- named kind clusters via --cluster-name (context kind-<name>)
- workspace registry clusterName/kubeContext + sticky rebind policy
- status/up surface cluster binding; unit tests for pure logic

Stacked on feat/kind-hostpath-extramounts (PR #92).

* fix(local): sticky workspace cluster bind and activate on status/down/open

When --cluster-name is omitted, keep the workspace's bound cluster instead of
comparing against the process default. Activate bound kube context before
kubectl in status/down/open. Unit test covers sticky None request.

* fix(local): activate bound cluster on gitops worktree

* fix(local): narrower kind extraMount default + raise inotify limits

Mount $HOME/dev (or HOPS_KIND_EXTRA_MOUNT) instead of entire $HOME to avoid
kube-proxy EMFILE on large Mac trees. After create, raise node inotify
max_user_instances/watches so kind stays healthy with hostPath mounts.

Live proof: hostPath UI on kind-hops Vite ready; host write visible in pod.

* fix(local): rebind refreshes kube context; narrower kind mounts

--rebind-cluster updates kubeContext even when cluster name is unchanged
(stale dory → kind-hops). Keep $HOME/dev mount default + inotify sysctl.

* feat(local): add cluster and worktree GitOps commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant