gocrane / crane

Crane is a FinOps Platform for Cloud Resource Analytics and Economics in Kubernetes clusters. The goal is not only to help users to manage cloud cost easier but also ensure the quality of applications.
https://gocrane.io
Apache License 2.0
1.83k stars 377 forks source link

When online resource usage is too high, the agent will set ext resources to 0 #890

Open payall4u opened 6 months ago

payall4u commented 6 months ago

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

  1. Find a node with 4 cores, of which 3 cores can be used for offline services (gocrane.io/cpu: 3)
  2. Create an pod with ext resources, such as gocrane.io/cpu: 1
  3. Create an pod with online resources, and run stress -c 4
  4. Crane agent will set gocrane.io/cpu=0
  5. 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

企业微信截图_daa0432e-70a6-4559-9b43-ce0c6bb54215

Environment (please complete the following information):