diff --git a/build.rs b/build.rs index 005eb7a515..94a9e44885 100644 --- a/build.rs +++ b/build.rs @@ -18,11 +18,17 @@ // we need for XDS GRPC communication. fn main() -> Result<(), Box> { let proto_files = vec![ + "proto/data-plane-api/envoy/config/accesslog/v3/accesslog.proto", "proto/data-plane-api/envoy/config/cluster/v3/cluster.proto", + "proto/data-plane-api/envoy/config/listener/v3/listener.proto", + "proto/data-plane-api/envoy/config/route/v3/route.proto", "proto/data-plane-api/envoy/service/cluster/v3/cds.proto", "proto/data-plane-api/envoy/service/discovery/v3/ads.proto", "proto/data-plane-api/envoy/service/discovery/v3/discovery.proto", + "proto/data-plane-api/envoy/type/metadata/v3/metadata.proto", + "proto/data-plane-api/envoy/type/tracing/v3/custom_tag.proto", "proto/udpa/udpa/core/v1/resource_name.proto", + "proto/quilkin/extensions/filters/debug/v1alpha1/debug.proto", ] .iter() .map(|name| std::env::current_dir().unwrap().join(name)) @@ -33,6 +39,7 @@ fn main() -> Result<(), Box> { "proto/udpa", "proto/googleapis", "proto/protoc-gen-validate", + "proto/quilkin", ] .iter() .map(|i| std::env::current_dir().unwrap().join(i)) diff --git a/proto/quilkin/extensions/filters/debug/v1alpha1/debug.proto b/proto/quilkin/extensions/filters/debug/v1alpha1/debug.proto new file mode 100644 index 0000000000..7f5b1d9ffa --- /dev/null +++ b/proto/quilkin/extensions/filters/debug/v1alpha1/debug.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package quilkin.extensions.filters.debug.v1alpha1; + +import "google/protobuf/wrappers.proto"; + +message Debug { + google.protobuf.StringValue id = 1; +} + diff --git a/src/extensions/filters/debug.rs b/src/extensions/filters/debug.rs index 01cb0bdb8c..ba1bb1f382 100644 --- a/src/extensions/filters/debug.rs +++ b/src/extensions/filters/debug.rs @@ -22,6 +22,21 @@ use crate::extensions::filter_registry::{ }; use crate::extensions::Filter; +/// Protobuf config for this filter. +mod quilkin { + pub(crate) mod extensions { + pub(crate) mod filters { + pub(crate) mod debug { + pub(crate) mod v1alpha1 { + #![cfg(not(doctest))] + #![doc(hidden)] + tonic::include_proto!("quilkin.extensions.filters.debug.v1alpha1"); + } + } + } + } +} + /// Debug logs all incoming and outgoing packets /// /// # Configuration diff --git a/src/xds/mod.rs b/src/xds/mod.rs index 3e1bc45398..7820dec8cc 100644 --- a/src/xds/mod.rs +++ b/src/xds/mod.rs @@ -33,6 +33,20 @@ mod envoy { tonic::include_proto!("envoy.r#type.matcher.v3"); } } + pub mod metadata { + 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)] @@ -40,6 +54,13 @@ mod envoy { } } 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 {