upstream: API proposal for extensions to outlier detection (#31205)

* API for defining HTTP errors, locally originated errors and database errors.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Adjusted next free field.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Use Any for monitor extensions.
Moved proto for errors and consecutive errors monitor to envoy/extensions.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Adjusted main api's BUILD file.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Renamed common to error_types.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Fixed docs.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Used TypedExtensionConfig instead of user-define message.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Redesign ErrorBucket to avoid using oneof.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

* Renamed error buckets.

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

---------

Signed-off-by: Christoph Pakulski <paker8848@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 6e71eb87e5d1c5b1853763afce64738bce13b586
main
update-envoy[bot] 10 months ago
parent 1ce1c244d5
commit b35fc98fbb
  1. 2
      BUILD
  2. 8
      envoy/config/cluster/v3/outlier_detection.proto
  3. 12
      envoy/extensions/outlier_detection_monitors/common/v3/BUILD
  4. 44
      envoy/extensions/outlier_detection_monitors/common/v3/error_types.proto
  5. 12
      envoy/extensions/outlier_detection_monitors/consecutive_errors/v3/BUILD
  6. 34
      envoy/extensions/outlier_detection_monitors/consecutive_errors/v3/consecutive_errors.proto
  7. 2
      versioning/BUILD

@ -292,6 +292,8 @@ proto_library(
"//envoy/extensions/network/dns_resolver/cares/v3:pkg",
"//envoy/extensions/network/dns_resolver/getaddrinfo/v3:pkg",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/outlier_detection_monitors/common/v3:pkg",
"//envoy/extensions/outlier_detection_monitors/consecutive_errors/v3:pkg",
"//envoy/extensions/path/match/uri_template/v3:pkg",
"//envoy/extensions/path/rewrite/uri_template/v3:pkg",
"//envoy/extensions/quic/connection_id_generator/v3:pkg",

@ -2,6 +2,8 @@ syntax = "proto3";
package envoy.config.cluster.v3;
import "envoy/config/core/v3/extension.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
@ -19,7 +21,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// See the :ref:`architecture overview <arch_overview_outlier_detection>` for
// more information on outlier detection.
// [#next-free-field: 24]
// [#next-free-field: 25]
message OutlierDetection {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.cluster.OutlierDetection";
@ -167,4 +169,8 @@ message OutlierDetection {
// To change this default behavior set this config to ``false`` where active health checking will not uneject the host.
// Defaults to true.
google.protobuf.BoolValue successful_active_health_check_uneject_host = 23;
// Set of host's passive monitors.
// [#not-implemented-hide:]
repeated core.v3.TypedExtensionConfig monitors = 24;
}

@ -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 = [
"//envoy/type/v3:pkg",
"@com_github_cncf_xds//udpa/annotations:pkg",
],
)

@ -0,0 +1,44 @@
syntax = "proto3";
package envoy.extensions.outlier_detection_monitors.common.v3;
import "envoy/type/v3/range.proto";
import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.outlier_detection_monitors.common.v3";
option java_outer_classname = "ErrorTypesProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/outlier_detection_monitors/common/v3;commonv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Outlier detection error buckets]
// Error bucket for HTTP codes.
// [#not-implemented-hide:]
message HttpErrors {
type.v3.Int32Range range = 1;
}
// Error bucket for locally originated errors.
// [#not-implemented-hide:]
message LocalOriginErrors {
}
// Error bucket for database errors.
// Sub-parameters may be added later, like malformed response, error on write, etc.
// [#not-implemented-hide:]
message DatabaseErrors {
}
// Union of possible error buckets.
// [#not-implemented-hide:]
message ErrorBuckets {
// List of buckets "catching" HTTP codes.
repeated HttpErrors http_errors = 1;
// List of buckets "catching" locally originated errors.
repeated LocalOriginErrors local_origin_errors = 2;
// List of buckets "catching" database errors.
repeated DatabaseErrors database_errors = 3;
}

@ -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 = [
"//envoy/extensions/outlier_detection_monitors/common/v3:pkg",
"@com_github_cncf_xds//udpa/annotations:pkg",
],
)

@ -0,0 +1,34 @@
syntax = "proto3";
package envoy.extensions.outlier_detection_monitors.consecutive_errors.v3;
import "envoy/extensions/outlier_detection_monitors/common/v3/error_types.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.outlier_detection_monitors.consecutive_errors.v3";
option java_outer_classname = "ConsecutiveErrorsProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/outlier_detection_monitors/consecutive_errors/v3;consecutive_errorsv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// Monitor which counts consecutive errors.
// If number of consecutive errors exceeds the threshold, monitor will report that the host
// is unhealthy.
// [#not-implemented-hide:]
message ConsecutiveErrors {
// Monitor name.
string name = 1;
// The number of consecutive errors before ejection occurs.
google.protobuf.UInt32Value threshold = 2 [(validate.rules).uint32 = {lte: 100}];
// The % chance that a host is actually ejected. Defaults to 100.
google.protobuf.UInt32Value enforcing = 3 [(validate.rules).uint32 = {lte: 100}];
// Error buckets.
common.v3.ErrorBuckets error_buckets = 4;
}

@ -231,6 +231,8 @@ proto_library(
"//envoy/extensions/network/dns_resolver/cares/v3:pkg",
"//envoy/extensions/network/dns_resolver/getaddrinfo/v3:pkg",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/outlier_detection_monitors/common/v3:pkg",
"//envoy/extensions/outlier_detection_monitors/consecutive_errors/v3:pkg",
"//envoy/extensions/path/match/uri_template/v3:pkg",
"//envoy/extensions/path/rewrite/uri_template/v3:pkg",
"//envoy/extensions/quic/connection_id_generator/v3:pkg",

Loading…
Cancel
Save