kubesim
kubesim copied to clipboard
Use more generic interface to mock node resources
Currently, it only passes cpu and memory resources into cadvisor.Interface which is not enough to mock real world cases. https://github.com/volcano-sh/kubesim/blob/f4bd53f0b81c06f72466d981c5aabf11e044b8d1/pkg/mock/kubelet/cadvisor/testing/cadvisor_fake.go#L59-L60
We should extend this to a more generic way to better simulate production nodes
/assign
I will file an improvement PR later
Thanks Jeffwan. The fack struct should be refactored to a generic way to support more types of resources.
em. The most elegant way is to extend https://github.com/kubernetes/kubernetes/blob/5ab4b580de915cffd901c7a1304aca5fdcca88e7/pkg/kubelet/cm/container_manager_stub.go#L89-L91
However, this is a dependency that we can not easily bring back to kubesim. I filed an upstream PR https://github.com/kubernetes/kubernetes/pull/100267
Once it's merged, we can backport to kubesim and use it with node templates