[backport] gateway2/delegation: enable inherited policy overrides (#10470) #10497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Backports 1bed380 from main
Adds the ability to override inherited policy fields when explicitly permitted by a parent route using the annotation delegation.gateway.solo.io/enable-policy-overrides. It supports a wildcard value "*" or a comma separated list of field names such as "faults,timeouts,retries,headermanipulation".
Functionally, a child RouteOption may only override the RouteOptions derived from its parent if the above annotation exists on the parent route. This is required to make the override behavior safe to use.
Testing done:
Testing steps
Use the examples added in the translator tests to verify the override behavior of inherited policies with delegation.
Checklist:
TODO