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
483 stars 27 forks source link

validate all enabled modules #444

Closed miklezzzz closed 9 months ago

miklezzzz commented 9 months ago

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 if enabled: false isn't set.

Special notes for your reviewer