crane
crane copied to clipboard
When online resource usage is too high, the agent will set ext resources to 0
Describe the bug When online resource usage is too high, the agent will set ext resources to 0, even if there are pods using ext resources on the node.
Reproduce steps
- Find a node with 4 cores, of which 3 cores can be used for offline services (gocrane.io/cpu: 3)
- Create an pod with ext resources, such as gocrane.io/cpu: 1
- Create an pod with online resources, and run stress -c 4
- Crane agent will set gocrane.io/cpu=0
- Kubelet with evict ext pod if restart.
Expected behavior Crane agent will set gocrane.io/cpu=1, and remain sum of ext resources of pods on the current node at least.
Screenshots
Environment (please complete the following information):
- K8S Version: 1.26