nokia / CPU-Pooler

A Device Plugin for Kubernetes, which exposes the CPU cores as consumable Devices to the Kubernetes scheduler.
BSD 3-Clause "New" or "Revised" License
93 stars 22 forks source link

(Re-)Implement cpuset re-provisioning for restarted containers #73

Closed Levovar closed 3 years ago

Levovar commented 3 years ago

As the result of the recent processing performance-increasing re-architecting restarted containers do not get their cpusets re-provisioned. This is because we stopped listening to UPDATE Events arriving from the Pod API

This PR re-introduces this functionality in the form of an independent reconciliation loop. We now pro-actively start a periodic reconciliation loop to check if all containers of all Pods on our Node are equipped with their intended cpusets

If not, it means said container was restarted, and we need to reset their cpuset to the intended value. As we can easily do that based on the Pods previously provisioned environment variables, we can have the intended functionality without needing to weather the constant assault of UPDATE events coming from the API server

Levovar commented 3 years ago

Note: with this PR CPU-Pooler requires Go 1.16+ to compile