Provisioning on shared storage without topology.kubernetes.io/zone label#357
Provisioning on shared storage without topology.kubernetes.io/zone label#357Mrton0121 wants to merge 7 commits intosergelogvinov:mainfrom
Conversation
|
Hello. Thank you for PR. The CSI plugin should work with an external load balancer placed in front of the Proxmox API. Could you please share what issue you encountered with the load balancer setup? Regarding env.SHARED_STORAGE, it introduces implicit logic and additional complexity, which can make the project harder to maintain. In most cases, the Proxmox API still requires the correct node name to be set, even when using shared disk storage. https://pve.proxmox.com/pve-docs/api-viewer/ |
|
Hi! In a HA proxmox cluster there is no guarantee that the kuberentes node (VM) will be at the same place every time. I also have ProxLB installed which is moving the VMs with a given schedule to the least used proxmox node. In an enterprise environment it is required for the CSI to fetch the correct node dinamically. We really need this functionality to make our kubernetes clusters work. |
|
Let's get back to the issue. What kind of error do you encounter when using an external load balancer on top of the Proxmox API? |
|
Sorry for being misleading with this LB issue. |
|
Hello, here small example how to use sidecar as load balancer for proxmox-api https://github.com/sergelogvinov/proxmox-cloud-controller-manager/blob/main/docs/loadbalancer.md Try this method for proxmox-csi helm chart. proxmox-csi-plugin/charts/proxmox-csi-plugin/values.yaml Lines 236 to 256 in 797dc62 |
|
Let’s set aside the load balancer discussion — that was a misunderstanding in the earlier phrasing. The load balancer is working fine. The core issue this PR addresses is the use of a fixed zone label for CSI operations. In dynamic HA clusters, this approach becomes problematic. A fixed zone label ties CSI API operations to a single node — but what happens when that node is down for maintenance or fails? This is a common scenario in larger Proxmox clusters where node-level maintenance (BIOS/OS/CEPH upgrades, disk swaps, etc.) is ongoing. Additionally, using a fixed zone label creates a bottleneck for API operations. Even though requests are routed through a load balancer, the fixed host reference in the API endpoint causes all requests to be redirected to the same node. This leads to scalability and reliability issues — for instance, during high-load operations like provisioning 100 volumes for a Redis deployment with 100 replicas. The Proxmox API simply can't handle that volume of requests efficiently when funneled through a single node. Our cluster uses an additional layer called proxLB to automatically migrate VMs based on load or availability. In such a setup, VMs regularly move between nodes, and assuming a static zone no longer reflects reality. For shared storage accessible from all nodes, the zone label isn’t required, and in fact causes the issues described above. This PR introduces an improvement: the ability to handle dynamically changing clusters while preserving compatibility with static setups. We plan to use CSI extensively, and since we are contributing the feature, we are committed to supporting it as well. If we can align on this, it could open the door for more collaboration in the future. |
|
Thank you, I understand now. The Proxmox API requires the node name for most API calls. I believe these changes do not require |
|
For such a large cluster, we should consider implementing additional changes — for example, adding extra checks when modifying the VM configuration. However, it would be better to address this in a separate issue or pull request |
|
So, would you mind @miberecz squashing the commits into one and signing off the changes (DCO https://github.com/sergelogvinov/proxmox-csi-plugin/blob/main/CONTRIBUTING.md)? I’d be happy to help if you need any assistance with that. |
commit 1874eed Author: Mrton0121 <gombimarci@gmail.com> Date: Wed May 7 13:43:17 2025 +0000 finalizee Signed-off-by: Mrton0121 <gombimarci@gmail.com> commit b9e2e0b Author: root <gombimarci@gmail.com> Date: Wed May 7 13:41:02 2025 +0000 finalize Signed-off-by: root <gombimarci@gmail.com> commit cd229da Author: root <gombimarci@gmail.com> Date: Wed May 7 13:33:35 2025 +0000 feat: update README.md commit 1f3bbf8 Author: root <gombimarci@gmail.com> Date: Wed May 7 13:30:50 2025 +0000 feat: using shared storage without applying zone labels for the kubernetes nodes Signed-off-by: Mrton0121 <gombimarci@gmail.com>
|
Its now signed, squashing can be done at merge. Or if you want we can open a new PR with only one commit. |
|
Hey! BR, |
Sorry for delay. Yeah, GitHub Actions requires a single commit with a sign-off message. Squashing commits via GitHub changes the commit message and SHA. |
b5f9a02 to
eb86759
Compare
…tes nodes It can be accessed from multiple nodes regardless of their region assignment. This simplifies configuration and eliminates the need for zone topology-based scheduling Signed-off-by: Mrton0121 <gombimarci@gmail.com> Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
|
Hello @Mrton0121, could you run the integration tests in your cluster using my latest changes? The label |
|
If you have only one storage class, gathering storage capacity information is probably unnecessary, you can disable it #366 |
|
Hey! I'll get back to you about the changes ASAP |
|
Hi! Sorry for the delay. |
|
I’ve been thinking about your ideas a few weeks now. I believe the best way to solve this is by adding smart routing logic to the Proxmox API go-module. But right now, it’s quite difficult to add this kind of feature to the current module. I also thought about using another go module, but it didn’t find better than the current one. If you have any ideas or suggestions, feel free to contact me on kubernetes slack. I’ll be happy to talk more. |
Pull Request
What? (description)
I modified the CSI in a way that you can set the SHARED_STORAGE environment variable in the pods and if it's "1" then you don't need to set the topology.kubernetes.io/zone label on the kubernetes nodes.
Why? (reasoning)
I have a loadbalancer in front of the proxmox cluster and wanted to spread the API load between the nodes. With the topology.kubernetes.io/zone label, I couldn't do that because it asked that node everytime.
Acceptance
Please use the following checklist:
make conformance)make lint)make unit)