From 3fa301625218273d5c9be8b147c5c36dd8d63c9d Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Wed, 2 Nov 2022 17:04:06 +0000 Subject: [PATCH] [Overload] Active downstream connections resource monitor (#23361) * [Overload] Active downstream connections resource monitor Signed-off-by: Kateryna Nezdolii Mirrored from https://github.com/envoyproxy/envoy @ c5199512e9d3d0c393dfdfbb815f5796b1c3940b --- BUILD | 1 + .../downstream_connections/v3/BUILD | 12 +++++++++ .../v3/downstream_connections.proto | 25 +++++++++++++++++++ versioning/BUILD | 1 + 4 files changed, 39 insertions(+) create mode 100644 envoy/extensions/resource_monitors/downstream_connections/v3/BUILD create mode 100644 envoy/extensions/resource_monitors/downstream_connections/v3/downstream_connections.proto diff --git a/BUILD b/BUILD index 29414b11..71cce936 100644 --- a/BUILD +++ b/BUILD @@ -257,6 +257,7 @@ proto_library( "//envoy/extensions/rbac/matchers/upstream_ip_port/v3:pkg", "//envoy/extensions/regex_engines/v3:pkg", "//envoy/extensions/request_id/uuid/v3:pkg", + "//envoy/extensions/resource_monitors/downstream_connections/v3:pkg", "//envoy/extensions/resource_monitors/fixed_heap/v3:pkg", "//envoy/extensions/resource_monitors/injected_resource/v3:pkg", "//envoy/extensions/retry/host/omit_canary_hosts/v3:pkg", diff --git a/envoy/extensions/resource_monitors/downstream_connections/v3/BUILD b/envoy/extensions/resource_monitors/downstream_connections/v3/BUILD new file mode 100644 index 00000000..ec1e778e --- /dev/null +++ b/envoy/extensions/resource_monitors/downstream_connections/v3/BUILD @@ -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_udpa//udpa/annotations:pkg", + "@com_github_cncf_udpa//xds/annotations/v3:pkg", + ], +) diff --git a/envoy/extensions/resource_monitors/downstream_connections/v3/downstream_connections.proto b/envoy/extensions/resource_monitors/downstream_connections/v3/downstream_connections.proto new file mode 100644 index 00000000..782acda5 --- /dev/null +++ b/envoy/extensions/resource_monitors/downstream_connections/v3/downstream_connections.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package envoy.extensions.resource_monitors.downstream_connections.v3; + +import "xds/annotations/v3/status.proto"; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.downstream_connections.v3"; +option java_outer_classname = "DownstreamConnectionsProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/downstream_connections/v3;downstream_connectionsv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; +option (xds.annotations.v3.file_status).work_in_progress = true; + +// [#protodoc-title: Downstream connections] +// [#extension: envoy.resource_monitors.downstream_connections] + +// The downstream connections resource monitor tracks the global number of open downstream connections. +message DownstreamConnectionsConfig { + // Maximum threshold for global open downstream connections, defaults to 0. + // If monitor is enabled in Overload manager api, this field should be explicitly configured with value greater than 0. + int64 max_active_downstream_connections = 1 [(validate.rules).int64 = {gt: 0}]; +} diff --git a/versioning/BUILD b/versioning/BUILD index a3935c83..ea1ae783 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -202,6 +202,7 @@ proto_library( "//envoy/extensions/rbac/matchers/upstream_ip_port/v3:pkg", "//envoy/extensions/regex_engines/v3:pkg", "//envoy/extensions/request_id/uuid/v3:pkg", + "//envoy/extensions/resource_monitors/downstream_connections/v3:pkg", "//envoy/extensions/resource_monitors/fixed_heap/v3:pkg", "//envoy/extensions/resource_monitors/injected_resource/v3:pkg", "//envoy/extensions/retry/host/omit_canary_hosts/v3:pkg",