flant / addon-operator

A system to manage additional components for Kubernetes cluster in a simple, consistent and automated way.
https://flant.github.io/addon-operator/
Apache License 2.0
487 stars 27 forks source link

[module-manager] Disable modules hooks correctly #513

Closed miklezzzz closed 1 month ago

miklezzzz commented 1 month ago

Overview

Updates a hook storage's clean method to reset the controllersReady flag to false every time the module is disabled.

Also, contains a small fix to the scheduler's method.

What this PR does / why we need it

Without resetting the controllersReady flag when a module is disabled, there is a possibility to catch a panic next time the module is enabled, as the module's hooks have to get their hooks controllers set before they can be safely evoked. The controllersReady helps avoid evoking a hook which hook controller hasn't been set yet.

Special notes for your reviewer