Support Listener and ClusterLoadAssignment in property-override#17497
Conversation
Add support for patching `Listener` resources via the builtin `property-override` extension. Refactor existing listener patch code in `BasicEnvoyExtender` to simplify addition of resource support.
There was a problem hiding this comment.
The golden files for these are already in main 😅
There was a problem hiding this comment.
We don't have a use case for list-order operations on this resource, so only singular patch op is supported
There was a problem hiding this comment.
This diff is odd-looking due to similar-shaped code being introduced below code that was edited; the red here is the modified end of patchClusters above, and the green is the tail end of the new patchClusterLoadAssignments.
There was a problem hiding this comment.
I switched to a single loop over listeners here and changed the filter chain fns below to handle individual listener values; this made introducing common listener patch code simpler. This didn't reduce any runtime iteration in practice, but I think it could aid similar changes in the future.
I also renamed those fns and updated their error messages to make it a bit more obvious what they're doing, since all of them deal exclusively w/ filter chains.
Add support for patching `ClusterLoadAssignment` resources via the builtin `property-override` extension.
1e9c56e to
a921bd1
Compare
| // This allows extensions to operate on a collection of listeners. | ||
| // For extensions that implement both PatchListener and PatchListeners, | ||
| // PatchListeners is always called first with the entire collection of listeners. | ||
| // Then PatchListeners is called for each individual listener. |
There was a problem hiding this comment.
| // Then PatchListeners is called for each individual listener. | |
| // Then PatchListener is called for each individual listener. |
There was a problem hiding this comment.
I'll make this change in a follow up PR
Add support for patching
ListenerandClusterLoadAssignmentresources via the builtinproperty-overrideextension.Changes for each resource split across two commits for easier review.
I skipped a separate changelog entry since this is an enhancement to a feature already introduced in the next release.
Note that several golden files used by new tests were previously committed with the bulk of
property-overrideextension work; they're now in use with this change.Description
BasicEnvoyExtenderto simplify addition of resource supportPR Checklist