Commit a5a7f83
committed
Edit a K8s aggregator without losing what the form does not show
Motivation:
The aggregator form modelled part of the schema and rebuilt the document from that model on save, so
every field it had no editor for was erased: distinctEndpoint, the metadata mappings, and the policy.
An operator who edited an aggregator through the console discarded them without being told; losing
distinctEndpoint, for instance, brings duplicate endpoints back on the next rolling restart.
Modifications:
- The form holds the stored document itself, so a field it renders is the field that gets saved and
a field it does not render cannot be silently rebuilt away. What is left is pruning empty values
before the document is written, and two adapters the document shape cannot express as form fields:
the additional-properties map, whose keys are data, and the source-key oneof.
- Add the missing editors: distinct endpoint, metadata mappings, and the policy. Drop overloads stay
read-only because Envoy applies at most one and rejects the endpoints outright when it sees more;
a stored one is shown and saved back unchanged. The two policy fields the Armeria xDS client does
not read are marked as Envoy-only.
- Send the revision the form was loaded at, and surface the server's 409 as a prompt to reload.
Result:
Editing an aggregator through the console keeps every field it was stored with, and a save based on
a stale read is refused instead of rolling back a concurrent change.1 parent 00ea163 commit a5a7f83
4 files changed
Lines changed: 738 additions & 156 deletions
File tree
- webapp
- src/dogma/features/xds
- tests/dogma/features/xds
0 commit comments