Commit Graph
2 Commits
Author SHA1 Message Date
Myasnikov Daniil 8ef5ad1324 feat(api): treat objects that cannot be completed as one value
The merge completes an object field by field only when its schema
declares properties. An atomic object (x-kubernetes-map-type: atomic), a
dictionary value, a free-form object and an object that also takes
arbitrary keys are stored as written, so nothing can complete them
later. A default osImage.builtin plus a user's osImage.factory gave a
spec the kubernetes-nodes chart refuses to render, and an entry such as
a RabbitMQ vhost without roles was accepted and stored the same way.

The merge now copies such an object whole or leaves the user's value
alone, and an entry is validated for it as a whole, like an array row.
A branch of an allOf, anyOf or oneOf that names a property is judged
like the property declared next to it. An entry that gets this wrong is
skipped with a warning like any other invalid entry.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-27 07:39:01 +00:00
Myasnikov Daniil 77d8bf5001 feat(api): apply installation defaults when creating applications
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>
2026-11-26 14:20:05 +00:00