Skip to content
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

generic proxy: move generic proxy from contrib into extensions #34892

Merged
merged 15 commits into from
Jul 9, 2024
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ extensions/filters/http/oauth2 @derekargueta @mattklein123
/*/extensions/geoip_providers/maxmind @nezdolik @ravenblackx
# Match delegate extension
/*/extensions/filters/http/match_delegate @wbpcode @jstraceski @tyxia
# Generic proxy and related extensions
adisuissa marked this conversation as resolved.
Show resolved Hide resolved
/*/extensions/filters/network/generic_proxy/ @wbpcode @soulxu

/*/extensions/health_checkers/common @zuercher @botengyao

Expand Down
12 changes: 6 additions & 6 deletions api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,7 @@ proto_library(
"//contrib/envoy/extensions/filters/http/squash/v3:pkg",
"//contrib/envoy/extensions/filters/http/sxg/v3alpha:pkg",
"//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/http1/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",
"//contrib/envoy/extensions/filters/network/golang/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/kafka_broker/v3:pkg",
"//contrib/envoy/extensions/filters/network/kafka_mesh/v3alpha:pkg",
Expand Down Expand Up @@ -230,6 +224,12 @@ proto_library(
"//envoy/extensions/filters/network/dubbo_proxy/v3:pkg",
"//envoy/extensions/filters/network/echo/v3:pkg",
"//envoy/extensions/filters/network/ext_authz/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/action/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/codecs/http1/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/matcher/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/router/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/v3:pkg",
"//envoy/extensions/filters/network/http_connection_manager/v3:pkg",
"//envoy/extensions/filters/network/local_ratelimit/v3:pkg",
"//envoy/extensions/filters/network/mongo_proxy/v3:pkg",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.action.v3";
option java_outer_classname = "ActionProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/action/v3;actionv3";
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/action/v3;actionv3";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @htuch will this impact go based control planes that provided a contrib?
IMHO as this is contrib it may be ~ok to break, but just wondering whether we should reconsider the impact of moving an extension from contrib to extensions in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not worried about that since it was contrib (it will have build consequences though).

option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.codecs.dubbo.v3";
option java_outer_classname = "DubboProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3;dubbov3";
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3;dubbov3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.codecs.http1.v3";
option java_outer_classname = "Http1Proto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/codecs/http1/v3;http1v3";
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/codecs/http1/v3;http1v3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.matcher.v3";
option java_outer_classname = "MatcherProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/matcher/v3;matcherv3";
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/matcher/v3;matcherv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.router.v3";
option java_outer_classname = "RouterProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/router/v3;routerv3";
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/router/v3;routerv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

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

import "contrib/envoy/extensions/filters/network/generic_proxy/v3/route.proto";
import "envoy/config/accesslog/v3/accesslog.proto";
import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/extension.proto";
import "envoy/extensions/filters/network/generic_proxy/v3/route.proto";
import "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto";

import "xds/annotations/v3/status.proto";
Expand All @@ -16,7 +16,7 @@ import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.v3";
option java_outer_classname = "GenericProxyProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/v3;generic_proxyv3";
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/v3;generic_proxyv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.v3";
option java_outer_classname = "RouteProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/v3;generic_proxyv3";
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/v3;generic_proxyv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
option (xds.annotations.v3.file_status).work_in_progress = true;

Expand Down
12 changes: 6 additions & 6 deletions api/versioning/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ proto_library(
"//contrib/envoy/extensions/filters/http/squash/v3:pkg",
"//contrib/envoy/extensions/filters/http/sxg/v3alpha:pkg",
"//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/http1/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",
"//contrib/envoy/extensions/filters/network/golang/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/kafka_broker/v3:pkg",
"//contrib/envoy/extensions/filters/network/kafka_mesh/v3alpha:pkg",
Expand Down Expand Up @@ -168,6 +162,12 @@ proto_library(
"//envoy/extensions/filters/network/dubbo_proxy/v3:pkg",
"//envoy/extensions/filters/network/echo/v3:pkg",
"//envoy/extensions/filters/network/ext_authz/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/action/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/codecs/http1/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/matcher/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/router/v3:pkg",
"//envoy/extensions/filters/network/generic_proxy/v3:pkg",
"//envoy/extensions/filters/network/http_connection_manager/v3:pkg",
"//envoy/extensions/filters/network/local_ratelimit/v3:pkg",
"//envoy/extensions/filters/network/mongo_proxy/v3:pkg",
Expand Down
4 changes: 0 additions & 4 deletions contrib/contrib_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ CONTRIB_EXTENSIONS = {
"envoy.filters.network.mysql_proxy": "//contrib/mysql_proxy/filters/network/source:config",
"envoy.filters.network.postgres_proxy": "//contrib/postgres_proxy/filters/network/source:config",
"envoy.filters.network.rocketmq_proxy": "//contrib/rocketmq_proxy/filters/network/source:config",
"envoy.filters.network.generic_proxy": "//contrib/generic_proxy/filters/network/source:config",
"envoy.filters.network.golang": "//contrib/golang/filters/network/source:config",

#
Expand Down Expand Up @@ -71,9 +70,6 @@ CONTRIB_EXTENSIONS = {
#
# Extensions for generic proxy
#
"envoy.filters.generic.router": "//contrib/generic_proxy/filters/network/source/router:config",
"envoy.generic_proxy.codecs.dubbo": "//contrib/generic_proxy/filters/network/source/codecs/dubbo:config",
"envoy.generic_proxy.codecs.http1": "//contrib/generic_proxy/filters/network/source/codecs/http1:config",
"envoy.generic_proxy.codecs.kafka": "//contrib/generic_proxy/filters/network/source/codecs/kafka:config",

#
Expand Down
26 changes: 0 additions & 26 deletions contrib/extensions_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,39 +118,13 @@ envoy.xds_delegates.kv_store:
- envoy.xds_delegates
security_posture: data_plane_agnostic
status: wip
envoy.filters.network.generic_proxy:
categories:
- envoy.filters.network
security_posture: requires_trusted_downstream_and_upstream
status: wip
envoy.filters.generic.router:
categories:
- envoy.generic_proxy.filters
security_posture: requires_trusted_downstream_and_upstream
status: wip
type_urls:
- envoy.extensions.filters.network.generic_proxy.router.v3.Router
envoy.generic_proxy.codecs.dubbo:
categories:
- envoy.generic_proxy.codecs
security_posture: requires_trusted_downstream_and_upstream
status: wip
type_urls:
- envoy.extensions.filters.network.generic_proxy.codecs.dubbo.v3.DubboCodecConfig
envoy.generic_proxy.codecs.kafka:
categories:
- envoy.generic_proxy.codecs
security_posture: requires_trusted_downstream_and_upstream
status: wip
type_urls:
- envoy.extensions.filters.network.generic_proxy.codecs.kafka.v3.KafkaCodecConfig
envoy.generic_proxy.codecs.http1:
categories:
- envoy.generic_proxy.codecs
security_posture: requires_trusted_downstream_and_upstream
status: wip
type_urls:
- envoy.extensions.filters.network.generic_proxy.codecs.http1.v3.Http1CodecConfig
envoy.router.cluster_specifier_plugin.golang:
categories:
- envoy.router.cluster_specifier_plugin
Expand Down
24 changes: 0 additions & 24 deletions contrib/generic_proxy/filters/network/source/codecs/dubbo/BUILD

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ envoy_cc_contrib_extension(
"config.h",
],
deps = [
"//contrib/generic_proxy/filters/network/source/interface:codec_interface",
"//contrib/kafka/filters/network/source:kafka_request_codec_lib",
"//contrib/kafka/filters/network/source:kafka_response_codec_lib",
"//source/extensions/filters/network/generic_proxy/interface:codec_interface",
"@envoy_api//contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3:pkg_cc_proto",
],
)
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include "source/common/buffer/buffer_impl.h"
#include "source/extensions/filters/network/generic_proxy/interface/codec.h"

#include "contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3/kafka.pb.h"
#include "contrib/generic_proxy/filters/network/source/interface/codec.h"
#include "contrib/kafka/filters/network/source/request_codec.h"
#include "contrib/kafka/filters/network/source/response_codec.h"

Expand Down
105 changes: 0 additions & 105 deletions contrib/generic_proxy/filters/network/source/interface/BUILD

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ envoy_cc_test(
],
deps = [
"//contrib/generic_proxy/filters/network/source/codecs/kafka:config",
"//contrib/generic_proxy/filters/network/test/mocks:codec_mocks",
"//test/extensions/filters/network/generic_proxy/mocks:codec_mocks",
"//test/mocks/server:factory_context_mocks",
],
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include <cstdint>
#include <memory>

#include "test/extensions/filters/network/generic_proxy/mocks/codec.h"
#include "test/mocks/server/factory_context.h"

#include "contrib/generic_proxy/filters/network/source/codecs/kafka/config.h"
#include "contrib/generic_proxy/filters/network/test/mocks/codec.h"
#include "contrib/kafka/filters/network/source/external/requests.h"
#include "contrib/kafka/filters/network/source/external/responses.h"
#include "gtest/gtest.h"
Expand Down
Loading