-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DFP proposal #10596
base: main
Are you sure you want to change the base?
DFP proposal #10596
Conversation
if !p.needFilter[fc.FilterChainName] { | ||
return nil, nil | ||
var ret []plugins.StagedHttpFilter | ||
if p.needAwsFilter[fc.FilterChainName] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it matter in which order we add the aws / dfp filters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think so; DFP filter only takes affect on DFP cluster. aws filter won't be active for those.. so they should never work at the same time.
needAwsFilter map[string]bool | ||
neededDfpFilter map[string]map[string]*envoydfp.FilterConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment on what the keys/values are?
} | ||
var anyCluster anypb.Any | ||
err := anypb.MarshalFrom(&anyCluster, c, proto.MarshalOptions{Deterministic: true}) | ||
// error should never happen here. panic? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have processDFPRoute/processDFPCluster return an error instead?
@@ -62,7 +64,8 @@ func (d *upstreamDestination) Equals(in any) bool { | |||
} | |||
|
|||
type UpstreamIr struct { | |||
AwsSecret *ir.Secret | |||
AwsSecret *ir.Secret | |||
dfpFilterConfig *envoydfp.FilterConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this field be exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think so, this struct is the IR (internal representation) that is only used inside this plug-in, and is meant to remain opaque to the rest of the system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in that case should awsSecret also be private?
very rough draft - mainly to get early feedback.
Adding dynamic forward proxy support.
Notes:
Unlike the previous impl that represents DFP as a route action, this one represents it as an upstream type. This makes more sense for the k8s-GW-API, as we cannot add custom route actions.
For every DFP upstream we add a DFP cluster and a filter on the relevant filter chain.