Skip to content

docs(architecture): Tailscale-native fleet access + NATS hub design blueprint - #1831

Merged
POWERFULMOVES merged 4 commits into
mainfrom
docs/fleet-access-nats-hub-architecture
Jun 18, 2026
Merged

POWERFULMOVES merged 4 commits into
mainfrom
docs/fleet-access-nats-hub-architecture

Conversation

@POWERFULMOVES

@POWERFULMOVES POWERFULMOVES commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Maps Tailscale's official AI-infrastructure access pattern (tagged infra + deny-by-default grants + per-tenant tags + service sidecars) onto PMOVES, as a staged blueprint — no live changes.

Highlights

  • Keystone: tag the fleet as infra. Today fleet nodes are user-owned (not tagged), which is the root of three problems at once: the owner gets forced into SSH check-mode (tagged nodes leave autogroup:self → fixed by construction), server re-auth churn (tagged = key-expiry disabled), and no basis for tenant isolation (grants target tags).
  • NATS = dedicated hub (separate concern) — kept on its working host-publish + NATS_BIND=tailnet path. pmoves_bus_pub (the earlier dedicated-published-network idea) is dropped.
  • Storage/inference (JuiceFS, TensorZero/Ollama) = Tailscale sidecars + tags (hybrid) — sidesteps the internal-network/DNAT bug class fix(nats): multi-home nats on pmoves_external so published ports bind (fleet-bus unblock) #1824 worked around.
  • acls → grants, deny-by-default, with a concrete per-tenant tag:tenant-* / group:tenant-*-users model that maps onto existing tag:partner/tag:guest.

Staged rollout

  1. SSH unblock (PR fix(tailscale-acl): exempt owner from SSH check-mode; scope check to group:tenants #1828, stopgap) → 2. tag the fleet → 3. acls→grants → 4. sidecar JuiceFS/inference → 5. onboard tenants.

Companion to #1828 and the NATS restoration PRs (#1813/#1824/#1826/#1830). Execution steps (re-tagging every node, applying ACL/grants) are operator-gated and outward-facing — this doc is the reviewable plan.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive architecture documentation detailing fleet access infrastructure design, implementation approach, and operational guidelines.

…lueprint

Maps Tailscale's official AI-infrastructure access pattern (tagged infra +
deny-by-default grants + per-tenant tags + service sidecars) onto PMOVES, as a
staged blueprint. Keystone = tag the fleet as infrastructure, which fixes the
owner-SSH-check issue idiomatically (tagged nodes leave autogroup:self), ends
server re-auth churn, and is the prerequisite for real multi-tenant isolation.

Captures the 2026-06-16 decision: NATS is a DEDICATED HUB (separate concern),
kept on its working host-publish + tailnet-bind path; net-new services (JuiceFS,
inference) use Tailscale sidecars + tags (hybrid), which sidesteps the
internal-network/DNAT bug class that #1824 worked around. pmoves_bus_pub (the
earlier dedicated-published-network idea) is dropped in favor of the hub + sidecars.

No live changes — execution is staged (SSH stopgap #1828 → tag fleet → acls→grants
→ sidecar JuiceFS/inference → onboard tenants). Companion to #1828 and the NATS
restoration PRs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@POWERFULMOVES, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 51 minutes and 49 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f472edd3-b554-4fcf-a203-fc7821e3b81e

📥 Commits

Reviewing files that changed from the base of the PR and between 4407f2b and 0ff79a4.

📒 Files selected for processing (1)
  • pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md
📝 Walkthrough

Walkthrough

Adds pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md, a 178-line architecture blueprint that defines fleet node tagging, a dedicated NATS hub, Tailscale sidecar networking for storage/inference, an ACL-to-grants deny-by-default migration, a multi-tenant isolation model, a staged rollout sequence, and operational caveats. No code or configuration is changed.

Changes

Fleet Access & NATS Hub Architecture Blueprint

Layer / File(s) Summary
Document scope, gaps, and fleet tagging keystone
pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md
Introduces the blueprint with scope/status/SSH-stopgap pointer, identifies the two structural cross-node gaps (internal-network reachability, missing fleet tagging), and defines fleet node re-enrollment with machine-identity tags as the keystone fix for SSH check-mode, re-auth churn, and multi-tenant scoping.
NATS hub role and sidecar networking for storage/inference
pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md
Separates the NATS hub as the canonical bus endpoint (drops published-bus option), then specifies Tailscale sidecar containers for storage and inference services using shared network namespace, MagicDNS naming, and advertise-tags—explicitly contrasted against the internal-network/DNAT/host-bind bug class.
ACL→grants migration and multi-tenant isolation model
pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md
Defines deny-by-default grants for east-west reachability with tagged sources/destinations and explicit NATS port scoping, and proposes per-tenant tag+group pairs with SSH check-mode scoped to group:tenants (user-owned devices) while excluding owner-tagged fleet nodes.
Staged rollout plan, caveats, and references
pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md
Lists the ordered rollout steps (SSH unblock → fleet re-enrollment → ACL→grants migration → storage sidecar → inference sidecar → tenant onboarding), documents manual-only policy application, destructive re-tagging warning, console-preview requirement, and all reference links.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • POWERFULMOVES/PMOVES.AI#952: Adds the concrete Tailscale ACL policy/config and NATS subject catalog that directly implement the ACL→grants and fleet-tagging model this blueprint describes.

Poem

🐇 Hoppity-hop through the tailnet we go,
Tags on each node make the routing flow.
A hub for the bus, sidecars in line,
Deny by default — oh, how divine!
Grants replace ACLs, tenants rejoice,
The fleet finds its path with a Tailscale voice! 🌐

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is missing critical required sections from the template: Testing section is completely absent, Required Checks are not addressed, and Review Coordination is not completed. Add the Testing section with documented test commands/output, complete all Required Checks checkboxes (especially CHIT Contract Check and documentation updates), and specify Review Coordination requirements (Codex/Copilot reviews if needed).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main architectural change: introducing a Tailscale-native fleet access model with a NATS hub design blueprint. It accurately reflects the primary focus of the added documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/fleet-access-nats-hub-architecture

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 and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4407f2b40b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md
Comment thread pmoves/docs/architecture/FLEET_ACCESS_NATS_HUB.md
POWERFULMOVES and others added 3 commits June 17, 2026 10:11
…sole-only

The "no gitops-apply / apply manually" caveat was wrong. PR #1832 wires
tailscale/gitops-acl-action (test-on-PR diff, apply-on-merge); the policy can also
be applied via the Tailscale API. Allowlist done; TS_TAILNET secret pending.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…networking for sidecars

Codex P2 x2:
- The rollout references tag:hub/tag:storage/tag:inference but those are not in
  tagOwners; Tailscale rejects an auth key advertising an undefined tag, so the
  staged re-enroll would block. Add a note to define them in
  tailscale-acl-policy.json tagOwners first.
- The sidecar example left TS_USERSPACE at its Docker default (userspace), which
  only handles inbound port-forwards; outbound MagicDNS/100.x from the shared
  namespace needs kernel networking. Add TS_USERSPACE=false + /dev/net/tun.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@POWERFULMOVES
POWERFULMOVES merged commit b13fa3d into main Jun 18, 2026
13 checks passed
@POWERFULMOVES
POWERFULMOVES deleted the docs/fleet-access-nats-hub-architecture branch June 18, 2026 16:14
POWERFULMOVES added a commit that referenced this pull request Jun 18, 2026
…erge) (#1832)

* ci(tailscale): gitops sync for the ACL policy (test on PR, apply on merge)

Makes pmoves/configs/tailscale-acl-policy.json the source of truth for the tailnet
and applies it automatically via the official tailscale/gitops-acl-action — closing
the "no gitops-apply, apply manually in the console" gap (the wording in the SSH-fix
PR #1828 / fleet-access doc #1831 was wrong to call it manual-only).

- PR touching the policy → `test` (validate + diff vs live tailnet, no changes).
- push to main → `apply` (push the policy to the tailnet).

Action SHA-pinned to v1.5.2 (5a4a17f) per the repo's third-party-action convention.

Operator prerequisites (until done, the job no-ops/fails — documented in-file):
  1. Allowlist tailscale/gitops-acl-action in Settings → Actions (third-party
     actions require explicit allowlisting; its internal actions/setup-go is
     first-party). 2. Add TS_TAILNET secret; TAILSCALE_API_KEY already exists.
     OAuth client (acl:write, tag:ci) preferred over a 90-day API key for durable CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ci): use correct secret name TAILSCALE_APIKEY (no underscore)

The repo secret is TAILSCALE_APIKEY, not TAILSCALE_API_KEY. (deploy-gateway-agent.yml
references the wrong name too — pre-existing, tracked separately.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* ci(tailscale): split into PR-lint + apply-on-merge via Prod environment

TS_TAILNET lives in the protected Prod environment (wait_timer + protected-branch
policy), so the live-diff gitops `test` can't run on PR feature branches. Restructure:
  - validate (PR): lint the policy JSON locally, no secrets / any branch.
  - apply (push to main): tailscale/gitops-acl-action `apply` with environment: Prod
    (reads TS_TAILNET; TAILSCALE_APIKEY is repo-level). Matches the repo's
    environment-scoped secret convention (sync-secrets-*).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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