From 94acd2707d41e896e8505e74ea67a182649b0de2 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Fri, 29 May 2020 03:51:06 +0000 Subject: [PATCH] udp_proxy: upgrade to not alpha (#11339) This extension is used in production and we should treat it as such. Signed-off-by: Matt Klein Mirrored from https://github.com/envoyproxy/envoy @ 86caf439d6cae2c8173b19fd4fdc95361565a72d --- BUILD | 2 +- .../udp/udp_proxy/v2alpha/udp_proxy.proto | 5 ++- .../extensions/filters/udp/udp_proxy/v3/BUILD | 12 ++++++ .../filters/udp/udp_proxy/v3/udp_proxy.proto | 38 +++++++++++++++++++ versioning/BUILD | 3 +- 5 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 envoy/extensions/filters/udp/udp_proxy/v3/BUILD create mode 100644 envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto diff --git a/BUILD b/BUILD index cdc59c8a..73912d9f 100644 --- a/BUILD +++ b/BUILD @@ -133,7 +133,6 @@ proto_library( "//envoy/config/core/v3:pkg", "//envoy/config/endpoint/v3:pkg", "//envoy/config/filter/thrift/router/v2alpha1:pkg", - "//envoy/config/filter/udp/udp_proxy/v2alpha:pkg", "//envoy/config/grpc_credential/v3:pkg", "//envoy/config/health_checker/redis/v2:pkg", "//envoy/config/listener/v3:pkg", @@ -223,6 +222,7 @@ proto_library( "//envoy/extensions/filters/network/thrift_proxy/v3:pkg", "//envoy/extensions/filters/network/zookeeper_proxy/v3:pkg", "//envoy/extensions/filters/udp/dns_filter/v3alpha:pkg", + "//envoy/extensions/filters/udp/udp_proxy/v3:pkg", "//envoy/extensions/internal_redirect/allow_listed_routes/v3:pkg", "//envoy/extensions/internal_redirect/previous_routes/v3:pkg", "//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg", diff --git a/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto b/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto index 5079c1f0..06dc150d 100644 --- a/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto +++ b/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto @@ -4,13 +4,16 @@ package envoy.config.filter.udp.udp_proxy.v2alpha; import "google/protobuf/duration.proto"; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.config.filter.udp.udp_proxy.v2alpha"; option java_outer_classname = "UdpProxyProto"; option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (udpa.annotations.file_migrate).move_to_package = + "envoy.extensions.filters.udp.udp_proxy.v3"; +option (udpa.annotations.file_status).package_version_status = FROZEN; // [#protodoc-title: UDP proxy] // UDP proxy :ref:`configuration overview `. diff --git a/envoy/extensions/filters/udp/udp_proxy/v3/BUILD b/envoy/extensions/filters/udp/udp_proxy/v3/BUILD new file mode 100644 index 00000000..c9a0d310 --- /dev/null +++ b/envoy/extensions/filters/udp/udp_proxy/v3/BUILD @@ -0,0 +1,12 @@ +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/filter/udp/udp_proxy/v2alpha:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto b/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto new file mode 100644 index 00000000..43d2c56c --- /dev/null +++ b/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package envoy.extensions.filters.udp.udp_proxy.v3; + +import "google/protobuf/duration.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.v3"; +option java_outer_classname = "UdpProxyProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: UDP proxy] +// UDP proxy :ref:`configuration overview `. +// [#extension: envoy.filters.udp_listener.udp_proxy] + +// Configuration for the UDP proxy filter. +message UdpProxyConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.filter.udp.udp_proxy.v2alpha.UdpProxyConfig"; + + // The stat prefix used when emitting UDP proxy filter stats. + string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; + + oneof route_specifier { + option (validate.required) = true; + + // The upstream cluster to connect to. + string cluster = 2 [(validate.rules).string = {min_bytes: 1}]; + } + + // The idle timeout for sessions. Idle is defined as no datagrams between received or sent by + // the session. The default if not specified is 1 minute. + google.protobuf.Duration idle_timeout = 3; +} diff --git a/versioning/BUILD b/versioning/BUILD index fecf08a9..1bc4b512 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -16,7 +16,6 @@ proto_library( "//envoy/config/core/v3:pkg", "//envoy/config/endpoint/v3:pkg", "//envoy/config/filter/thrift/router/v2alpha1:pkg", - "//envoy/config/filter/udp/udp_proxy/v2alpha:pkg", "//envoy/config/grpc_credential/v3:pkg", "//envoy/config/health_checker/redis/v2:pkg", "//envoy/config/listener/v3:pkg", @@ -106,6 +105,7 @@ proto_library( "//envoy/extensions/filters/network/thrift_proxy/v3:pkg", "//envoy/extensions/filters/network/zookeeper_proxy/v3:pkg", "//envoy/extensions/filters/udp/dns_filter/v3alpha:pkg", + "//envoy/extensions/filters/udp/udp_proxy/v3:pkg", "//envoy/extensions/internal_redirect/allow_listed_routes/v3:pkg", "//envoy/extensions/internal_redirect/previous_routes/v3:pkg", "//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg", @@ -217,6 +217,7 @@ proto_library( "//envoy/config/filter/network/thrift_proxy/v2alpha1:pkg", "//envoy/config/filter/network/zookeeper_proxy/v1alpha1:pkg", "//envoy/config/filter/thrift/rate_limit/v2alpha1:pkg", + "//envoy/config/filter/udp/udp_proxy/v2alpha:pkg", "//envoy/config/grpc_credential/v2alpha:pkg", "//envoy/config/listener/v2:pkg", "//envoy/config/metrics/v2:pkg",