Open arkodg opened 1 year ago
This issue has been automatically marked as stale because it has not had activity in the last 30 days.
My use case where i need this: we have a global security policy which have defined cors, each dev can select various predefined security policies for auth, cors and other stuff based on label selectors for there routes. To achieve this, merging would be required in our use case.
@guicassolato and the Kuadrant team had to solve a similar problem and their solution was a strategy:Merge
field
more in https://docs.kuadrant.io/0.8.0/architecture/rfcs/0009-defaults-and-overrides/#design-option-strategy-field
Description:
With policies such as the ClientTrafficPolicy, a user can target a
section
within a target e.g. aListener
within aGateway
which applies or overrides the target with thespec
of the policy.Another use case is where a user wants to only override some fields i.e. the top level policy might setup defaults for fields like keep alive but a specific policy for a specific target/section may want to only apply an extra setting such as retries
One way to achieve this is to add a
type
field within the policy resource which can be set toReplace
orMerge
, which defaults toReplace
(apply entire spec)[optional Relevant Links:]