Feature Request: Traefik integration

toxic

Active Member
Aug 1, 2020
60
8
28
38
Hello,

I think Traefik offers APIs that Proxmox could leverage to become an integrated provider.
In the end, the goal would be that upon LXC or VM startup/shutdown, some config gets pushed or removed to Traefik. The config in question should be an optional field for the user to define on the VM/LXC.

Example: setup a VM in Proxmox adding labels (like in docker). When VM is started, proxmox reads the labels and calls the Traefik api to create a middleware/entrypoint/router/service and then deletes it using api again when VM shutdown.

For docker the work has been done by Traefik to declare a provider. So maybe some of us here knowing our proxmox API could also do the same instead of what I proposed and have Traefik poll the proxmox API and create routers/services based on labels it could read from proxmox. Except I don't believe Proxmox API has labels for VM/LXC that could be used for this or a subscription model to be notified of LXC/VM startup/shutdown/crash.

Feel free to ask for more details if I'm not clear.

Thanks for your kind help,
Best regards,
Toxic.
 
there are hooks that get called when a guest is started/stopped (obviously not for crashed, since that is not something that PVE does as an action where it can call a hook before/after ;) - but that can be done by polling status). you can also assign tags to guests (not exposed on the GUI, but possible via the API/CLI/config).