This pr should fix the situation when dynamically enabled modules don't get their config values applied if enabled: true isn't set in their configuration. Also, there were several other problems to solve like: module configs for dynamically enabled modules aren't applied at startup.
Relates to https://github.com/deckhouse/deckhouse/pull/7036.
What this PR does / why we need it
There is a problem with dynamically enabled modules (that are launched by global hooks) not getting their kube config values applied if enabled: true isn't set explicitly. It happens because HandleNewKubeConfig method doesn't count dynamically enabled modules as modules enabled by config which is partially true (enabled isn't set), but these modules still should have their config values applied and recalculated each time their configs change if enabled: false isn't set.
Overview
This pr should fix the situation when dynamically enabled modules don't get their config values applied if
enabled: true
isn't set in their configuration. Also, there were several other problems to solve like: module configs for dynamically enabled modules aren't applied at startup. Relates to https://github.com/deckhouse/deckhouse/pull/7036.What this PR does / why we need it
There is a problem with dynamically enabled modules (that are launched by global hooks) not getting their kube config values applied if
enabled: true
isn't set explicitly. It happens because HandleNewKubeConfig method doesn't count dynamically enabled modules as modules enabled by config which is partially true (enabled isn't set), but these modules still should have their config values applied and recalculated each time their configs change ifenabled: false
isn't set.Special notes for your reviewer