mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
Defaults set by the administrator have to reach every application kind, including ones from external catalogs, and give the same result for the dashboard, Terraform and kubectl, so the merge runs in the API server on create instead of in each client. User values win over installation defaults, which win over the developer defaults of the chart. Only objects with declared properties merge recursively. Arrays, dictionaries and free-form objects are replaced whole, so a pool that sets its own registry mirrors never receives the platform entries. The entry is checked against the application's OpenAPI schema before merging. CEL rules are left out of that check, since a rule such as an immutability test has no meaning on a partial object. The ConfigMap is read through a cache limited to that one object, so the API does not hold a watch on every ConfigMap in the cluster. A missing ConfigMap means no defaults. One that cannot be read, or an invalid configuration or entry, skips the defaults and the create goes on with a warning, because a configuration mistake must not stop applications from being created. Updates never apply defaults. The ConfigMap rule the API already has covers the read, and its comment now names this second user. Assisted-by: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>