extensions: update straggler v2 extensions to v3. (#14907)
* Add v3 equivalents of v2 configs that were included in v3 due to no transitive deprecation. This increases consistency and reduces user confusion. We will continue to support these straggler v2 configs beyond the v2 turndown due to the late addition of v3 counterparts, special case code is added to utility.cc to handle this. * There were two extensions, //envoy/config/cluster/redis and //envoy/config/retry/previous_priorities, that for some reason were not upgraded to use v3 config. This is now fixed and I've grepped for other v2 in //source, none remain. Risk level: Medium (changes to extension config types and deprecated config handling). Testing: Additional unit test added for utility.cc handling, upgraded configs to v3 for other tests. Fixes #14735 Fixes #12841 Signed-off-by: Harvey Tuch <htuch@google.com> Co-authored-by: Abhay Narayan Katare <abhay.katare@india.nec.com> Mirrored from https://github.com/envoyproxy/envoy @ c04a75efe9d601ebcb9650f274b5adde60181f1cpull/624/head
parent
a9663b37c4
commit
dd58ca6a1c
15 changed files with 150 additions and 10 deletions
@ -0,0 +1,26 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.health_checkers.redis.v3; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "udpa/annotations/versioning.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.health_checkers.redis.v3"; |
||||
option java_outer_classname = "RedisProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: Redis] |
||||
// Redis health checker :ref:`configuration overview <config_health_checkers_redis>`. |
||||
// [#extension: envoy.health_checkers.redis] |
||||
|
||||
message Redis { |
||||
option (udpa.annotations.versioning).previous_message_type = |
||||
"envoy.config.health_checker.redis.v2.Redis"; |
||||
|
||||
// If set, optionally perform ``EXISTS <key>`` instead of ``PING``. A return value |
||||
// from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other |
||||
// than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance |
||||
// by setting the specified key to any value and waiting for traffic to drain. |
||||
string key = 1; |
||||
} |
@ -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/config/resource_monitor/fixed_heap/v2alpha:pkg", |
||||
"@com_github_cncf_udpa//udpa/annotations:pkg", |
||||
], |
||||
) |
@ -0,0 +1,25 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.resource_monitors.fixed_heap.v3; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "udpa/annotations/versioning.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.fixed_heap.v3"; |
||||
option java_outer_classname = "FixedHeapProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: Fixed heap] |
||||
// [#extension: envoy.resource_monitors.fixed_heap] |
||||
|
||||
// The fixed heap resource monitor reports the Envoy process memory pressure, computed as a |
||||
// fraction of currently reserved heap memory divided by a statically configured maximum |
||||
// specified in the FixedHeapConfig. |
||||
message FixedHeapConfig { |
||||
option (udpa.annotations.versioning).previous_message_type = |
||||
"envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig"; |
||||
|
||||
uint64 max_heap_size_bytes = 1 [(validate.rules).uint64 = {gt: 0}]; |
||||
} |
@ -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/config/resource_monitor/injected_resource/v2alpha:pkg", |
||||
"@com_github_cncf_udpa//udpa/annotations:pkg", |
||||
], |
||||
) |
@ -0,0 +1,26 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.resource_monitors.injected_resource.v3; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "udpa/annotations/versioning.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.injected_resource.v3"; |
||||
option java_outer_classname = "InjectedResourceProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: Injected resource] |
||||
// [#extension: envoy.resource_monitors.injected_resource] |
||||
|
||||
// The injected resource monitor allows injecting a synthetic resource pressure into Envoy |
||||
// via a text file, which must contain a floating-point number in the range [0..1] representing |
||||
// the resource pressure and be updated atomically by a symbolic link swap. |
||||
// This is intended primarily for integration tests to force Envoy into an overloaded state. |
||||
message InjectedResourceConfig { |
||||
option (udpa.annotations.versioning).previous_message_type = |
||||
"envoy.config.resource_monitor.injected_resource.v2alpha.InjectedResourceConfig"; |
||||
|
||||
string filename = 1 [(validate.rules).string = {min_len: 1}]; |
||||
} |
@ -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/config/retry/omit_canary_hosts/v2:pkg", |
||||
"@com_github_cncf_udpa//udpa/annotations:pkg", |
||||
], |
||||
) |
Loading…
Reference in new issue