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 @ 6e71eb87e5d1c5b1853763afce64738bce13b586main
parent
1ce1c244d5
commit
b35fc98fbb
7 changed files with 113 additions and 1 deletions
@ -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; |
||||
} |
Loading…
Reference in new issue