-
Notifications
You must be signed in to change notification settings - Fork 98
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
Generate proto files for XDS filter configs #159
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
|
||
package quilkin.extensions.filters.debug.v1alpha1; | ||
|
||
import "google/protobuf/wrappers.proto"; | ||
|
||
message Debug { | ||
google.protobuf.StringValue id = 1; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,34 @@ mod envoy { | |
tonic::include_proto!("envoy.r#type.matcher.v3"); | ||
} | ||
} | ||
pub mod metadata { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Random thought - this seems like a lot of boilerplate. Macro time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That could be the case, not sure what a macro here would look like and I don't think it'll be trivial to write if possible, since the heirarchies are arbitrarily nested and the macro would need to figure out where each |
||
pub mod v3 { | ||
#![cfg(not(doctest))] | ||
#![doc(hidden)] | ||
tonic::include_proto!("envoy.r#type.metadata.v3"); | ||
} | ||
} | ||
pub mod tracing { | ||
pub mod v3 { | ||
#![cfg(not(doctest))] | ||
#![doc(hidden)] | ||
tonic::include_proto!("envoy.r#type.tracing.v3"); | ||
} | ||
} | ||
pub mod v3 { | ||
#![cfg(not(doctest))] | ||
#![doc(hidden)] | ||
tonic::include_proto!("envoy.r#type.v3"); | ||
} | ||
} | ||
pub mod config { | ||
pub mod accesslog { | ||
pub mod v3 { | ||
#![cfg(not(doctest))] | ||
#![doc(hidden)] | ||
tonic::include_proto!("envoy.config.accesslog.v3"); | ||
} | ||
} | ||
pub mod cluster { | ||
pub mod v3 { | ||
#![cfg(not(doctest))] | ||
|
@@ -62,6 +83,20 @@ mod envoy { | |
tonic::include_proto!("envoy.config.endpoint.v3"); | ||
} | ||
} | ||
pub mod listener { | ||
pub mod v3 { | ||
#![cfg(not(doctest))] | ||
#![doc(hidden)] | ||
tonic::include_proto!("envoy.config.listener.v3"); | ||
} | ||
} | ||
pub mod route { | ||
pub mod v3 { | ||
#![cfg(not(doctest))] | ||
#![doc(hidden)] | ||
tonic::include_proto!("envoy.config.route.v3"); | ||
} | ||
} | ||
} | ||
pub mod service { | ||
pub mod discovery { | ||
|
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 explain why a proto for each Filter is necessary? I'm assuming this is for being able to pull config info from the XDS proto values? Mostly just want to make sure I understand what is happening here. (Also leads me into that fact we should write some docs on "writing your own filters" 😄)
Looking at Envoy, I assume this matches up to something like:
https://github.com/envoyproxy/envoy/blob/master/api/envoy/extensions/filters/http/gzip/v3/gzip.proto
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.
Yes that's the case it matches envoy's filter proto files. XDS has a filter chain proto message that's a list of these config messages one per filter. Then on our end after receiving we transform that XDS filter chain into our own e32fb6d#diff-07a585ddcc9ea470eb22742d985007bb1483e42bafd05d660ed3ec5294cdb1d0R142-R154