Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensions: update straggler v2 extensions to v3. #14907

Merged
merged 7 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ proto_library(
"//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg",
"//envoy/config/resource_monitor/injected_resource/v2alpha:pkg",
"//envoy/config/retry/omit_canary_hosts/v2:pkg",
"//envoy/config/retry/omit_canary_hosts/v3:pkg",
"//envoy/config/retry/previous_hosts/v2:pkg",
"//envoy/config/retry/previous_hosts/v3:pkg",
"//envoy/config/route/v3:pkg",
"//envoy/config/tap/v3:pkg",
"//envoy/config/trace/v3:pkg",
Expand Down Expand Up @@ -241,12 +239,17 @@ proto_library(
"//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/health_checkers/redis/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",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/rate_limit_descriptors/expr/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",
"//envoy/extensions/retry/host/omit_host_metadata/v3:pkg",
"//envoy/extensions/retry/host/previous_hosts/v3:pkg",
"//envoy/extensions/retry/priority/previous_priorities/v3:pkg",
"//envoy/extensions/stat_sinks/wasm/v3:pkg",
"//envoy/extensions/transport_sockets/alts/v3:pkg",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ syntax = "proto3";

package envoy.config.retry.omit_canary_hosts.v2;

import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.config.retry.omit_canary_hosts.v2";
option java_outer_classname = "OmitCanaryHostsProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package =
"envoy.extensions.retry.host.omit_canary_hosts.v3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Omit Canary Hosts Predicate]
Expand Down
3 changes: 3 additions & 0 deletions api/envoy/config/retry/previous_hosts/v2/previous_hosts.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ syntax = "proto3";

package envoy.config.retry.previous_hosts.v2;

import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.config.retry.previous_hosts.v2";
option java_outer_classname = "PreviousHostsProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package =
"envoy.extensions.retry.host.previous_hosts.v3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Previous Hosts Predicate]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ syntax = "proto3";

package envoy.config.retry.previous_priorities;

import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.config.retry.previous_priorities";
option java_outer_classname = "PreviousPrioritiesConfigProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package =
"envoy.extensions.retry.priority.previous_priorities.v3";
option (udpa.annotations.file_status).package_version_status = FROZEN;

// [#protodoc-title: Previous priorities retry selector]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ 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"],
deps = [
"//envoy/config/health_checker/redis/v2:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)
26 changes: 26 additions & 0 deletions api/envoy/extensions/health_checkers/redis/v3/redis.proto
Original file line number Diff line number Diff line change
@@ -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;
}
12 changes: 12 additions & 0 deletions api/envoy/extensions/resource_monitors/fixed_heap/v3/BUILD
Original file line number Diff line number Diff line change
@@ -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",
],
)
Original file line number Diff line number Diff line change
@@ -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}];
}
12 changes: 12 additions & 0 deletions api/envoy/extensions/resource_monitors/injected_resource/v3/BUILD
Original file line number Diff line number Diff line change
@@ -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",
],
)
Original file line number Diff line number Diff line change
@@ -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}];
}
12 changes: 12 additions & 0 deletions api/envoy/extensions/retry/host/omit_canary_hosts/v3/BUILD
Original file line number Diff line number Diff line change
@@ -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",
],
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
syntax = "proto3";

package envoy.config.retry.omit_canary_hosts.v3;
package envoy.extensions.retry.host.omit_canary_hosts.v3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't this break wire compatibility?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged this one only a short while back and it's never been used by Envoy, so we can do this.


import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";

option java_package = "io.envoyproxy.envoy.config.retry.omit_canary_hosts.v3";
option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_canary_hosts.v3";
option java_outer_classname = "OmitCanaryHostsProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
Expand All @@ -13,4 +14,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#extension: envoy.retry_host_predicates.omit_canary_hosts]

message OmitCanaryHostsPredicate {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.retry.omit_canary_hosts.v2.OmitCanaryHostsPredicate";
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ 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"],
deps = [
"//envoy/config/retry/previous_hosts/v2:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
syntax = "proto3";

package envoy.config.retry.previous_hosts.v3;
package envoy.extensions.retry.host.previous_hosts.v3;

import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";

option java_package = "io.envoyproxy.envoy.config.retry.previous_hosts.v3";
option java_package = "io.envoyproxy.envoy.extensions.retry.host.previous_hosts.v3";
option java_outer_classname = "PreviousHostsProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
Expand All @@ -13,4 +14,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#extension: envoy.retry_host_predicates.previous_hosts]

message PreviousHostsPredicate {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.retry.previous_hosts.v2.PreviousHostsPredicate";
}
7 changes: 5 additions & 2 deletions api/versioning/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ proto_library(
"//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg",
"//envoy/config/resource_monitor/injected_resource/v2alpha:pkg",
"//envoy/config/retry/omit_canary_hosts/v2:pkg",
"//envoy/config/retry/omit_canary_hosts/v3:pkg",
"//envoy/config/retry/previous_hosts/v2:pkg",
"//envoy/config/retry/previous_hosts/v3:pkg",
"//envoy/config/route/v3:pkg",
"//envoy/config/tap/v3:pkg",
"//envoy/config/trace/v3:pkg",
Expand Down Expand Up @@ -124,12 +122,17 @@ proto_library(
"//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/health_checkers/redis/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",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/rate_limit_descriptors/expr/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",
"//envoy/extensions/retry/host/omit_host_metadata/v3:pkg",
"//envoy/extensions/retry/host/previous_hosts/v3:pkg",
"//envoy/extensions/retry/priority/previous_priorities/v3:pkg",
"//envoy/extensions/stat_sinks/wasm/v3:pkg",
"//envoy/extensions/transport_sockets/alts/v3:pkg",
Expand Down
2 changes: 1 addition & 1 deletion configs/google-vrp/envoy-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ overload_manager:
resource_monitors:
- name: "envoy.resource_monitors.fixed_heap"
typed_config:
"@type": type.googleapis.com/envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig
"@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
# TODO: Tune for your system.
max_heap_size_bytes: 1073741824 # 1 GiB
actions:
Expand Down
2 changes: 1 addition & 1 deletion configs/google-vrp/envoy-origin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ overload_manager:
resource_monitors:
- name: "envoy.resource_monitors.fixed_heap"
typed_config:
"@type": type.googleapis.com/envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig
"@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
max_heap_size_bytes: 1073741824 # 1 GiB
actions:
- name: "envoy.overload_actions.shrink_heap"
Expand Down
2 changes: 1 addition & 1 deletion docs/protodoc_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fields:
resource_monitors:
- name: "envoy.resource_monitors.fixed_heap"
typed_config:
"@type": type.googleapis.com/envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig
"@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
max_heap_size_bytes: 1073741824
actions:
- name: "envoy.overload_actions.shrink_heap"
Expand Down
3 changes: 2 additions & 1 deletion docs/root/api-v3/config/health_checker/health_checker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ Health checkers
:glob:
:maxdepth: 2

*/v2/*
*/v2/*
../../extensions/health_checkers/*/v3/*
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Resource monitors
:glob:
:maxdepth: 2

../../extensions/resource_monitors/*/v3/*
*/v2alpha/*
1 change: 0 additions & 1 deletion docs/root/api-v3/config/retry/retry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ Retry Predicates

*/empty/*
*/v2/*
*/v3/*
../../extensions/retry/**/v3/*
2 changes: 1 addition & 1 deletion docs/root/configuration/best_practices/_include/edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ overload_manager:
resource_monitors:
- name: "envoy.resource_monitors.fixed_heap"
typed_config:
"@type": type.googleapis.com/envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig
"@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
# TODO: Tune for your system.
max_heap_size_bytes: 2147483648 # 2 GiB
actions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ requests when heap memory usage reaches 99%.
resource_monitors:
- name: "envoy.resource_monitors.fixed_heap"
typed_config:
"@type": type.googleapis.com/envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig
"@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
max_heap_size_bytes: 2147483648
actions:
- name: "envoy.overload_actions.disable_http_keepalive"
Expand Down
2 changes: 1 addition & 1 deletion docs/root/configuration/upstream/health_checkers/redis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ which checks Redis upstream hosts. It sends a Redis PING command and expect a PO
Redis server can respond with anything other than PONG to cause an immediate active health check failure.
Optionally, Envoy can perform EXISTS on a user-specified key. If the key does not exist it is considered a
passing health check. This allows the user to mark a Redis instance for maintenance by setting the
specified :ref:`key <envoy_v3_api_field_config.health_checker.redis.v2.Redis.key>` to any value and waiting
specified :ref:`key <envoy_v3_api_field_extensions.health_checkers.redis.v3.Redis.key>` to any value and waiting
for traffic to drain.

An example setting for :ref:`custom_health_check <envoy_v3_api_msg_config.core.v3.HealthCheck.CustomHealthCheck>` as a
Expand Down
2 changes: 1 addition & 1 deletion docs/root/intro/arch_overview/upstream/health_checking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ unhealthy, successes required before marking a host healthy, etc.):
failure. Optionally, Envoy can perform EXISTS on a user-specified key. If the key does not exist
it is considered a passing healthcheck. 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. See
:ref:`redis_key <envoy_v3_api_msg_config.health_checker.redis.v2.Redis>`.
:ref:`redis_key <envoy_v3_api_msg_extensions.health_checkers.redis.v3.Redis>`.

Health checks occur over the transport socket specified for the cluster. This implies that if a cluster is
using a TLS-enabled transport socket, the health check will also occur over TLS. The
Expand Down
6 changes: 5 additions & 1 deletion generated_api_shadow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ proto_library(
"//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg",
"//envoy/config/resource_monitor/injected_resource/v2alpha:pkg",
"//envoy/config/retry/omit_canary_hosts/v2:pkg",
"//envoy/config/retry/omit_canary_hosts/v3:pkg",
"//envoy/config/retry/previous_hosts/v2:pkg",
"//envoy/config/retry/previous_hosts/v3:pkg",
"//envoy/config/route/v3:pkg",
Expand Down Expand Up @@ -239,12 +238,17 @@ proto_library(
"//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/health_checkers/redis/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",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/rate_limit_descriptors/expr/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",
"//envoy/extensions/retry/host/omit_host_metadata/v3:pkg",
"//envoy/extensions/retry/host/previous_hosts/v3:pkg",
"//envoy/extensions/retry/priority/previous_priorities/v3:pkg",
"//envoy/extensions/stat_sinks/wasm/v3:pkg",
"//envoy/extensions/transport_sockets/alts/v3:pkg",
Expand Down
Loading