feat: Proxmox VE LXC provider#868
Conversation
Proxmox icon from Dashboard Icons (Apache-2.0) https://dashboardicons.com/icons/proxmox
|
Impressive work @mzyy94 Thank you for contributing! I will review, but it will take some time. I will also ask github copilot to review it, but it doees not mean that each comment made by Copilot must be resolved. |
There was a problem hiding this comment.
Pull request overview
Adds a new proxmox_lxc instance provider so Sablier can start/stop and discover Proxmox VE LXC containers via the Proxmox API, aligning behavior with existing provider patterns (discovery, grouping, readiness, and stop notifications).
Changes:
- Introduces the Proxmox LXC provider implementation (discovery via tags, start/stop, inspect/readiness, stop-event polling) plus unit/integration tests.
- Extends config/CLI/docs to support Proxmox API token auth and TLS settings.
- Updates module dependencies to include
github.com/luthermonson/go-proxmox.
Reviewed changes
Copilot reviewed 32 out of 34 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/sabliercmd/testdata/config_yaml_wanted.json | Updates expected config JSON to include ProxmoxLXC defaults. |
| pkg/sabliercmd/testdata/config_env_wanted.json | Updates expected config JSON to include ProxmoxLXC defaults. |
| pkg/sabliercmd/testdata/config_default.json | Updates default config JSON to include ProxmoxLXC defaults. |
| pkg/sabliercmd/testdata/config_cli_wanted.json | Updates expected config JSON to include ProxmoxLXC defaults. |
| pkg/sabliercmd/root.go | Adds CLI flags and viper bindings for Proxmox LXC config. |
| pkg/sabliercmd/provider.go | Wires proxmox_lxc into provider setup and constructs the Proxmox client. |
| pkg/provider/proxmoxlxc/proxmox_lxc.go | Core provider: discovery across nodes, caching, instance resolution. |
| pkg/provider/proxmoxlxc/tags.go | Implements tag parsing and group extraction conventions. |
| pkg/provider/proxmoxlxc/container_list.go | Implements InstanceList and InstanceGroups. |
| pkg/provider/proxmoxlxc/container_start.go | Implements InstanceStart with async task tracking. |
| pkg/provider/proxmoxlxc/container_stop.go | Implements InstanceStop and task wait. |
| pkg/provider/proxmoxlxc/container_inspect.go | Implements InstanceInspect, readiness via NIC IP, and pending-task polling/TTL. |
| pkg/provider/proxmoxlxc/events.go | Implements stop notifications via polling. |
| pkg/provider/proxmoxlxc/testhelper_test.go | Mock Proxmox API server for unit tests. |
| pkg/provider/proxmoxlxc/export_test.go | Exports test helpers for external test packages. |
| pkg/provider/proxmoxlxc/tags_test.go | Unit tests for tag parsing/group extraction. |
| pkg/provider/proxmoxlxc/container_list_test.go | Unit tests for list/groups behavior, multi-node, duplicate hostname detection. |
| pkg/provider/proxmoxlxc/container_start_test.go | Unit tests for start behavior and task failure/in-progress handling. |
| pkg/provider/proxmoxlxc/container_stop_test.go | Unit tests for stop behavior. |
| pkg/provider/proxmoxlxc/container_inspect_test.go | Unit tests for inspect behavior and lookup modes. |
| pkg/provider/proxmoxlxc/events_test.go | Unit test ensuring notify loop closes channel on ctx cancel. |
| pkg/provider/proxmoxlxc/integration_test.go | Integration test suite against a real Proxmox cluster (env-gated). |
| pkg/provider/proxmoxlxc/testcontainers_test.go | Integration helper to clone/tag/cleanup a real LXC container. |
| pkg/config/provider.go | Adds ProxmoxLXC config struct, provider list entry, and validation. |
| pkg/config/provider_test.go | Adds validation test cases for the new provider config. |
| docs/providers/proxmox_lxc.md | New provider documentation (config, tagging, readiness, naming). |
| docs/providers/overview.md | Adds Proxmox LXC to providers overview table. |
| docs/configuration.md | Updates configuration docs and CLI help listing to include proxmox_lxc. |
| docs/assets/img/proxmox.png | Adds Proxmox icon used by docs. |
| docs/_sidebar.md | Adds Proxmox LXC entry to docs sidebar. |
| docs/README.md | Updates terminology to include Proxmox LXC containers as instances. |
| README.md | Adds Proxmox LXC section and updates config examples/provider list. |
| go.mod | Adds new indirect requirements related to Proxmox client usage. |
| go.sum | Adds checksums for new dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tation Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Yuki MIZUNO <mizuyuu0904@gmail.com>
|
|
@mzyy94 I think we can merge this PR if you think it is ready? People can then contribute further to improve it as needed |
|
I made it ready 🚀 |
|
@mzyy94 can you please resolve conflicts with the latest changes ? |
|
'main' merged 🆗 |




Lets Sablier manage LXC containers via the Proxmox API, following the same patterns as existing providers.
github.com/luthermonson/go-proxmoxwith API token authsablier) and grouping (sablier-group-<name>)100), or node/VMID (pve1/100)Design: comparison with Docker provider
sablier.enable=truelabel (server-side filter)sabliertag (client-side filter, no API-level tag filtering)sablier.group=<name>labelsablier-group-<name>tagnode/vmidContainerStartpendingTasks, polled viaInstanceInspectInstanceInspectreportsUnrecoverableInstanceStateConfiguration
How it's tested
Unit tests cover all provider methods with an
httptestmock server. Integration tests run against a real Proxmox VE cluster (template clone, full start/inspect/stop lifecycle, stop notification).Been running this on a real cluster for a few days. Everything works fine.