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

Add fake CRD modules to the enabledModules list and fix merge values procedure #506

Closed miklezzzz closed 1 month ago

miklezzzz commented 1 month ago

Overview

Adds an extra <module-name>-crd value to the enabledModules list if a custom module loader is implemented, and the module is enabled and has CRDs to apply. Required for backward compatibility and will be deleted after awhile.

Fixes an issue when Values, that are used in a mergeValues call, are getting overwritten unwittingly. An example is executing a module's enabled script, which would use global values to provide enabledModules value to the script. Without the fix, enabledModules list gets overwritten each time an enabled script is executed.

What this PR does / why we need it

Fake module records are required at the moment and will be cleaned-up later. The fix is required to prevent values in a value storage from overwriting when merging several values. Closes https://github.com/deckhouse/deckhouse/issues/9790

Special notes for your reviewer