-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
RFC: Streamlining stream info usage, init well known attribute sets #4748
Conversation
Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>
Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>
I think I need a refresher on why we need this to be dynamic vs. using fixed per-class types. I'm so confused now between filter state, dynamic metadata, this PR and #4723. We desperately need something like https://github.com/envoyproxy/envoy/pull/4723/files#diff-4ec21d29489e6427acb0e0e102cc6883 to make sense of this. Can you take https://github.com/envoyproxy/envoy/pull/4723/files#diff-4ec21d29489e6427acb0e0e102cc6883 and create a doc, then explain in that doc how your new design evolves this state? CC @stevenzzzz |
+1, thanks for asking for this @htuch. As I just mentioned to @htuch offline, I'm also super confused about the entire landscape of metadata now. It would be really useful to have a single MD (or gdoc first -> MD later) that explains the lanscape. I would prefer that we pause work until this exists and we can discuss and make sure we are all on the same page. |
To clarify, here is whats happening in the PR:
|
I think I should drop this effort.. Looking at the code
😑 !!! Dynamic metadata is like the all purpose data structure in Lua, access log, header to metadata. And of all things, its Protobuf Struct! Which brings me back to the question I asked on slack: why even have this per-request-state or per-connection-state (my fault for adding this based on perRequestState) when we already have this multi-purpose-thingy? Can't we stick with the metadata galore and get rid of the additional types? |
I just put this in slack but can we please do the following:
Then if we can't figure it out in the doc we can discuss at a community meeting. Thank you! |
@rshriram : Could you allow comments on that doc? I'm getting it view only. |
Oh sorry. Just noticed it.. Updated. |
during request processing. | ||
|
||
perFilterConfig shares same traits and design goals as the typed metadata. | ||
Its a specialized implementation focussing on per-route filter |
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.
It's
Closing as @venilnoronha broke this into smaller pieces and merged the clean up parts.. will send separate PR for write-many filter state. |
Nuking perConnectionState. Instead, introduce StreamInfo which has dynamicAttributes.
Initialize two well known dynamic attribute lists apriori (one for network level attributes, one for hcm level attributes).
I was hoping to read the info from envoy.connection.attributes in Istio mixer filter and push it to mixer.
At the same time, use in-house filters to generate additional attributes into this list.
Same goals for RBAC as well (wean off DynamicMetadata and source all the properties(?) from envoy.connection.attributes or envoy.hcm.attributes). This model allows arbitrary filters to stick data into StreamInfo.DynamicAttributes (e.g., http.inHouseFilter.AuthToken=abc). With some changes, RBAC filter can then use these dynamic attributes when it does its thing. (cc @rodaine - we talked about this earlier. cc @yangminzhu ).
Implementation is incomplete. Secondly, the hasString/hasInt etc. seems a bit clunky but I don't see a nicer way of encapsulating the whole thing into one shared list (e.g., envoy.connection.attributes).
Thoughts (@htuch / @ggreenway ) ?
If this is too much to bite off, I can split this PR into different pieces. My main goal is to initialize the two lists (envoy.connection.attributes, envoy.hcm.attributes) so that we can have multiple filters piling up info into these, and use the generated info in RBAC/telemetry.
Signed-off-by: Shriram Rajagopalan shriramr@vmware.com