Skip to content

Commit

Permalink
generic proxy: new kafka codec support (#31407)
Browse files Browse the repository at this point in the history
* initial commit

Signed-off-by: wbpcode <[email protected]>

* add more test

Signed-off-by: wbpcode <[email protected]>

* complete test

Signed-off-by: wbpcode <[email protected]>

* Kick CI

Signed-off-by: wbpcode <[email protected]>

---------

Signed-off-by: wbpcode <[email protected]>

Mirrored from https://github.com/envoyproxy/envoy @ b039d8a316a081d1eae3e3222e045b749d26765e
  • Loading branch information
update-envoy[bot] committed Dec 20, 2023
1 parent 1c319c5 commit d46c08c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ proto_library(
"//contrib/envoy/extensions/filters/network/client_ssl_auth/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/action/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/matcher/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/router/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/v3:pkg",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.

load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")

licenses(["notice"]) # Apache 2

api_proto_package(
deps = [
"@com_github_cncf_xds//udpa/annotations:pkg",
"@com_github_cncf_xds//xds/annotations/v3:pkg",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
syntax = "proto3";

package envoy.extensions.filters.network.generic_proxy.codecs.kafka.v3;

import "xds/annotations/v3/status.proto";

import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.codecs.kafka.v3";
option java_outer_classname = "KafkaProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3;kafkav3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

// [#protodoc-title: Kafka codec configuration for Generic Proxy]
// [#extension: envoy.generic_proxy.codecs.kafka]

// Configuration for Kafka codec. This codec gives the generic proxy the ability to proxy
// Kafka traffic. But note any route configuration for Kafka traffic is not supported yet.
// The generic proxy can only used to generate logs or metrics for Kafka traffic but cannot
// do matching or routing.
//
// .. note::
// The codec can currently only be used in the sidecar mode. And to ensure the codec works
// properly, please make sure the following conditions are met:
//
// 1. The generic proxy must be configured with a wildcard route that matches all traffic.
// 2. The target cluster must be configured as a original destination cluster.
// 3. The :ref:`bind_upstream_connection
// <envoy_v3_api_field_extensions.filters.network.generic_proxy.router.v3.Router.bind_upstream_connection>`
// of generic proxy router must be set to true to ensure same upstream connection is used
// for all traffic from same downstream connection.
message KafkaCodecConfig {
}
1 change: 1 addition & 0 deletions versioning/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ proto_library(
"//contrib/envoy/extensions/filters/network/client_ssl_auth/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/action/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/matcher/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/router/v3:pkg",
"//contrib/envoy/extensions/filters/network/generic_proxy/v3:pkg",
Expand Down

0 comments on commit d46c08c

Please sign in to comment.