gyptazy / ProxLB

ProxLB - (Re)Balance VM Workloads Across Nodes in Proxmox Clusters. A Load Balancer for Proxmox - and more!
https://proxlb.de
GNU General Public License v3.0
130 stars 6 forks source link

`Feature`: Create an API Interface #18

Open gyptazy opened 1 month ago

gyptazy commented 1 month ago

General

It would be cool to have an API Interface providing multiple different endpoints and returning JSON content for further parsing. Therefore, it would great to obtain the best optimal new node for placing new VMs (which could be easily used by Ansible, Terraform etc.,) and also providing the current and planned statistics of nodes and VMs.

It should at least contain the following ones:

Option Endpoint
Best new node /cluster/placement/nextnode
Current VM overview /cluster/placement/statistics/current/vms
Current Node overview  /cluster/placement/statistics/current/nodes
Rebalanced VM overview /cluster/placement/statistics/rebalanced/vms
Rebalanced Node overview /cluster/placement/statistics/rebalanced/nodes

Tasks

gyptazy commented 1 month ago

Instead of creating an own API interface by using http.server and doing everything on my own, I probably should consider switching to a framework which might offer more benefits and also a better maintenance in long-term.

I closed the idea PR with the old solution and will stick with a framework solution after releasing version 1.0.0.