2.8 KiB
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.goservice,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=vmfor a cluster-wide list, filtertype=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: staticip=fromGET /nodes/{node}/lxc/{vmid}/confignet0..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, orrustproxy.*=lines in the description, mapped to the existingrustproxy.*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:
- Agent:
runtimeabstraction (Docker/Podman socket vs. Proxmox API), Proxmox client + config (RUSTPROXY_PVE_URL, token, node filter, certificate pin), tests with a fake PVE API. - Model/API: per-service
upstream_address,runtime,node,vmid; backward-compatible defaults for existing Docker agents; OpenAPI. - Server: reconcile backends from
upstream_address; private-address policy; Prometheus/alerts unchanged. - Panel: runtime badge, hide Docker-only actions, tag/label help.
- Docs:
docs/DOCKER_DISCOVERY.mdProxmox section (token role, tags, networking), FEATURES, CHANGELOG.