Files
RustProxy/docs/TODO.md
T
2026-11-16 13:46:24 +01:00

2.8 KiB

TODO

Planned work that is not implemented yet. Items here are not features of the current release.

LXC containers on Proxmox VE in Docker vhosts

Goal: discover Proxmox VE LXC containers the same way the Docker agent discovers Docker/Podman containers, and publish them as Docker vhosts (name, state, addresses, CPU/RAM/uptime, publishing by label/tag).

Why it is not a small change:

  • Backend address model. Docker services are reached through a port published on the agent host (bindings → agent address + public_port). An LXC container has its own IP address on a bridge/VLAN and publishes nothing. The service model (docker-agent/model.go service, src/docker/model.rs, reconcile.rs) needs a per-service upstream address (container IP + port) and the reconciler must build backends from it, with the same private-address/ACL safeguards as ordinary vhosts.
  • Discovery source. The agent talks to the Docker/Podman API over a unix socket. Proxmox needs an HTTPS API client (https://<pve>:8006/api2/json) with an API token (PVEAPIToken=user@realm!id=secret), TLS verification/pinning of the PVE certificate and a minimal read-only role (VM.Audit, Sys.Audit).
  • What to read:
    • GET /nodes → nodes (or /cluster/resources?type=vm for a cluster-wide list, filter type=lxc);
    • GET /nodes/{node}/lxc → vmid, name, status, cpu, mem, maxmem, uptime, tags;
    • GET /nodes/{node}/lxc/{vmid}/interfaces → runtime IPv4/IPv6 per interface (fallback: static ip= from GET /nodes/{node}/lxc/{vmid}/config net0..netN);
    • GET /nodes/{node}/lxc/{vmid}/status/current → detailed runtime metrics.
  • Ports and publishing. LXC has no port list. Use Proxmox tags or the description as labels, e.g. tags rustproxy-enable, rustproxy-port-8080, rustproxy-scheme-https, or rustproxy.*= lines in the description, mapped to the existing rustproxy.* label semantics.
  • UI/feature gaps. Live logs, image, restart count and Docker health checks do not exist for LXC; hide them per runtime and show a runtime badge (Docker / Podman / LXC). Show node and vmid.
  • Alternative to evaluate: run the agent inside each LXC that hosts Docker (works today) vs. one agent per Proxmox cluster talking to the API (needed for plain LXC services).

Steps:

  1. Agent: runtime abstraction (Docker/Podman socket vs. Proxmox API), Proxmox client + config (RUSTPROXY_PVE_URL, token, node filter, certificate pin), tests with a fake PVE API.
  2. Model/API: per-service upstream_address, runtime, node, vmid; backward-compatible defaults for existing Docker agents; OpenAPI.
  3. Server: reconcile backends from upstream_address; private-address policy; Prometheus/alerts unchanged.
  4. Panel: runtime badge, hide Docker-only actions, tag/label help.
  5. Docs: docs/DOCKER_DISCOVERY.md Proxmox section (token role, tags, networking), FEATURES, CHANGELOG.