csi-driver-lvm icon indicating copy to clipboard operation
csi-driver-lvm copied to clipboard

Capacity tracking support

Open jleeh opened this issue 1 year ago • 6 comments

Enable storage capacity tracking as per the CSI documentation: https://kubernetes-csi.github.io/docs/storage-capacity-tracking.html

While using this CSI driver in-cluster, I hit issues where pods would be attempted to be scheduled on nodes that didn't have enough disk space remaining to satisfy the request while the topology requirements kept the same so the provisioner would get in an endless error loop.

Since capacity requests aren't supported in the node server, this takes the same approach to provisioning in which a pod is created on the specified node to check remaining capacity based on the device pattern.

Tested in-cluster and is working.

jleeh avatar May 18 '23 16:05 jleeh

Nice !

majst01 avatar May 19 '23 06:05 majst01

Thanks! Will get the comments actioned and add a test that asserts the storage capacity objects get created.

jleeh avatar May 19 '23 07:05 jleeh

Got this updated and tested in-cluster. Couldn't unfortunately add tests as I realised it depended on the helm chart changes to enable capacity tracking.

jleeh avatar Jul 13 '23 12:07 jleeh

Got this updated and tested in-cluster. Couldn't unfortunately add tests as I realised it depended on the helm chart changes to enable capacity tracking.

having tests for this would be very much appreciated

majst01 avatar Jul 13 '23 12:07 majst01

@majst01 since the tests install the helm chart and for capacity tracking to be enabled it requires the helm chart changes as per this PR: https://github.com/metal-stack/helm-charts/pull/68/files

How would you propose to add tests? One solution would be to disable capacity tracking in that PR by default, then enable it in the values file in this repo for testing.

jleeh avatar Jul 17 '23 10:07 jleeh

Hey @jleeh,

having the feature disabled by default and then enable it for integration testing in this repository sounds good to me.

I just allowed your PR in the helm repo to be built such that there will also be a PR helm repo available that you can use for trying out your changes (https://helm.metal-stack.io/pull_requests/<branch-name>).

Gerrit91 avatar Jul 24 '23 10:07 Gerrit91