Add a "Sync from Proxmox" action to IP Addresses (IPAM)
Extends the Tailscale IPAM sync to Proxmox: pulls every VM/LXC's IP address(es) across all enabled Proxmox integrations into the inventory, reusing the same never-overwrite-a-manual-entry semantics. Proxmox guests can have multiple NICs (each IP synced as its own entry) and, for QEMU VMs, IP discovery depends on a responsive guest agent — a VM with none simply contributes zero entries rather than erroring, matching getGuestDetail()'s existing best-effort behavior. listGuests() doesn't include IPs, so this fetches getGuestDetail() per guest; acceptable for an explicit, user-triggered sync rather than a background poll. Extracted the shared "insert, update only if I own this row, else skip and report" upsert logic (previously inline in the Tailscale sync handler) into upsertSyncedEntry(), now used by both sync routes so the core safety rule can't drift between them. Verified end-to-end against a mock Proxmox server covering: an LXC with two NICs (both synced), a QEMU VM with a responsive guest agent, a QEMU VM with no agent (zero entries, no error), a manual-entry collision (skipped and reported, never overwritten), and idempotent re-sync (add -> update on the second run). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d714a87754
commit
e7ac6fea3b
4 files changed
+122
-27
No files matched your search
@@ -19,9 +19,10 @@ All modules from the original plan are built:
|
||||
- Authentik OIDC login, roles (first user to sign in becomes admin), audit log
|
||||
- **Secrets** — expiry tracking for API tokens/certs/passwords
|
||||
- **IP Addresses (IPAM)** — inventory of IPs across vendors/locations,
|
||||
with a "Sync from Tailscale" action to pull in tailnet device IPs
|
||||
(never overwrites a manually-entered IP), and each entry now shows
|
||||
its matching DNS record(s) from the DNS module's cache
|
||||
with "Sync from Tailscale" and "Sync from Proxmox" actions to pull in
|
||||
tailnet device IPs and VM/LXC IPs (never overwrites a
|
||||
manually-entered IP), and each entry now shows its matching DNS
|
||||
record(s) from the DNS module's cache
|
||||
- **DNS** — zone/record management across Cloudflare, Loopia, Pi-hole, Azure
|
||||
DNS, cPanel, and Technitium; providers are configured in-app (not via env
|
||||
vars) and their credentials are encrypted at rest
|
||||
|
||||
Reference in new issue
Block a user