async-grpc-xds 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/fixtures/async/grpc/test_interface.rb +79 -0
- data/fixtures/async/grpc/test_message.rb +56 -0
- data/lib/async/grpc/xds/ads_stream.rb +70 -0
- data/lib/async/grpc/xds/client.rb +255 -0
- data/lib/async/grpc/xds/context.rb +201 -0
- data/lib/async/grpc/xds/control_plane.rb +143 -0
- data/lib/async/grpc/xds/discovery_client.rb +356 -0
- data/lib/async/grpc/xds/health_checker.rb +88 -0
- data/lib/async/grpc/xds/load_balancer.rb +196 -0
- data/lib/async/grpc/xds/resource_builder.rb +138 -0
- data/lib/async/grpc/xds/resource_cache.rb +55 -0
- data/lib/async/grpc/xds/resources.rb +270 -0
- data/lib/async/grpc/xds/server.rb +34 -0
- data/lib/async/grpc/xds/service.rb +117 -0
- data/lib/async/grpc/xds/version.rb +12 -0
- data/lib/async/grpc/xds.rb +42 -0
- data/lib/envoy/annotations/deprecation_pb.rb +19 -0
- data/lib/envoy/config/cluster/v3/circuit_breaker_pb.rb +31 -0
- data/lib/envoy/config/cluster/v3/cluster_pb.rb +80 -0
- data/lib/envoy/config/cluster/v3/filter_pb.rb +28 -0
- data/lib/envoy/config/cluster/v3/outlier_detection_pb.rb +29 -0
- data/lib/envoy/config/core/v3/address_pb.rb +38 -0
- data/lib/envoy/config/core/v3/backoff_pb.rb +27 -0
- data/lib/envoy/config/core/v3/base_pb.rb +68 -0
- data/lib/envoy/config/core/v3/cel_pb.rb +24 -0
- data/lib/envoy/config/core/v3/config_source_pb.rb +42 -0
- data/lib/envoy/config/core/v3/event_service_config_pb.rb +27 -0
- data/lib/envoy/config/core/v3/extension_pb.rb +26 -0
- data/lib/envoy/config/core/v3/grpc_method_list_pb.rb +27 -0
- data/lib/envoy/config/core/v3/grpc_service_pb.rb +45 -0
- data/lib/envoy/config/core/v3/health_check_pb.rb +47 -0
- data/lib/envoy/config/core/v3/http_service_pb.rb +27 -0
- data/lib/envoy/config/core/v3/http_uri_pb.rb +27 -0
- data/lib/envoy/config/core/v3/protocol_pb.rb +51 -0
- data/lib/envoy/config/core/v3/proxy_protocol_pb.rb +31 -0
- data/lib/envoy/config/core/v3/resolver_pb.rb +27 -0
- data/lib/envoy/config/core/v3/socket_cmsg_headers_pb.rb +25 -0
- data/lib/envoy/config/core/v3/socket_option_pb.rb +31 -0
- data/lib/envoy/config/core/v3/substitution_format_string_pb.rb +30 -0
- data/lib/envoy/config/core/v3/udp_socket_config_pb.rb +26 -0
- data/lib/envoy/config/endpoint/v3/endpoint_components_pb.rb +40 -0
- data/lib/envoy/config/endpoint/v3/endpoint_pb.rb +32 -0
- data/lib/envoy/config/endpoint/v3/load_report_pb.rb +36 -0
- data/lib/envoy/service/discovery/v3/ads_pb.rb +26 -0
- data/lib/envoy/service/discovery/v3/aggregated_discovery_service.rb +64 -0
- data/lib/envoy/service/discovery/v3/discovery_pb.rb +42 -0
- data/lib/envoy/type/matcher/v3/address_pb.rb +25 -0
- data/lib/envoy/type/matcher/v3/filter_state_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/http_inputs_pb.rb +29 -0
- data/lib/envoy/type/matcher/v3/metadata_pb.rb +28 -0
- data/lib/envoy/type/matcher/v3/node_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/number_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/path_pb.rb +27 -0
- data/lib/envoy/type/matcher/v3/regex_pb.rb +30 -0
- data/lib/envoy/type/matcher/v3/status_code_input_pb.rb +25 -0
- data/lib/envoy/type/matcher/v3/string_pb.rb +29 -0
- data/lib/envoy/type/matcher/v3/struct_pb.rb +28 -0
- data/lib/envoy/type/matcher/v3/value_pb.rb +31 -0
- data/lib/envoy/type/metadata/v3/metadata_pb.rb +32 -0
- data/lib/envoy/type/v3/hash_policy_pb.rb +26 -0
- data/lib/envoy/type/v3/http_pb.rb +22 -0
- data/lib/envoy/type/v3/http_status_pb.rb +25 -0
- data/lib/envoy/type/v3/percent_pb.rb +26 -0
- data/lib/envoy/type/v3/range_pb.rb +25 -0
- data/lib/envoy/type/v3/ratelimit_strategy_pb.rb +28 -0
- data/lib/envoy/type/v3/ratelimit_unit_pb.rb +22 -0
- data/lib/envoy/type/v3/semantic_version_pb.rb +23 -0
- data/lib/envoy/type/v3/token_bucket_pb.rb +26 -0
- data/lib/envoy.rb +83 -0
- data/lib/google/protobuf/any_pb.rb +18 -0
- data/lib/google/protobuf/duration_pb.rb +18 -0
- data/lib/google/protobuf/empty_pb.rb +18 -0
- data/lib/google/protobuf/struct_pb.rb +21 -0
- data/lib/google/protobuf/timestamp_pb.rb +18 -0
- data/lib/google/protobuf/wrappers_pb.rb +26 -0
- data/lib/google/rpc/status_pb.rb +20 -0
- data/lib/udpa/annotations/migrate_pb.rb +22 -0
- data/lib/udpa/annotations/security_pb.rb +23 -0
- data/lib/udpa/annotations/sensitive_pb.rb +19 -0
- data/lib/udpa/annotations/status_pb.rb +21 -0
- data/lib/udpa/annotations/versioning_pb.rb +20 -0
- data/lib/validate/validate_pb.rb +43 -0
- data/lib/xds/annotations/v3/status_pb.rb +26 -0
- data/lib/xds/core/v3/authority_pb.rb +23 -0
- data/lib/xds/core/v3/cidr_pb.rb +24 -0
- data/lib/xds/core/v3/collection_entry_pb.rb +26 -0
- data/lib/xds/core/v3/context_params_pb.rb +22 -0
- data/lib/xds/core/v3/extension_pb.rb +23 -0
- data/lib/xds/core/v3/resource_locator_pb.rb +26 -0
- data/lib/xds/core/v3/resource_name_pb.rb +24 -0
- data/lib/xds/core/v3/resource_pb.rb +24 -0
- data/lib/xds/type/matcher/v3/domain_pb.rb +27 -0
- data/lib/xds/type/matcher/v3/http_inputs_pb.rb +22 -0
- data/lib/xds/type/matcher/v3/ip_pb.rb +28 -0
- data/lib/xds/type/matcher/v3/matcher_pb.rb +34 -0
- data/lib/xds/type/matcher/v3/range_pb.rb +31 -0
- data/lib/xds/type/matcher/v3/regex_pb.rb +25 -0
- data/lib/xds/type/matcher/v3/string_pb.rb +27 -0
- data/license.md +21 -0
- data/plan.md +156 -0
- data/proto/envoy/annotations/deprecation.proto +34 -0
- data/proto/envoy/annotations/resource.proto +19 -0
- data/proto/envoy/config/README.md +3 -0
- data/proto/envoy/config/cluster/v3/BUILD +18 -0
- data/proto/envoy/config/cluster/v3/circuit_breaker.proto +121 -0
- data/proto/envoy/config/cluster/v3/cluster.proto +1407 -0
- data/proto/envoy/config/cluster/v3/filter.proto +40 -0
- data/proto/envoy/config/cluster/v3/outlier_detection.proto +180 -0
- data/proto/envoy/config/core/v3/BUILD +16 -0
- data/proto/envoy/config/core/v3/address.proto +214 -0
- data/proto/envoy/config/core/v3/backoff.proto +37 -0
- data/proto/envoy/config/core/v3/base.proto +662 -0
- data/proto/envoy/config/core/v3/cel.proto +63 -0
- data/proto/envoy/config/core/v3/config_source.proto +283 -0
- data/proto/envoy/config/core/v3/event_service_config.proto +29 -0
- data/proto/envoy/config/core/v3/extension.proto +32 -0
- data/proto/envoy/config/core/v3/grpc_method_list.proto +33 -0
- data/proto/envoy/config/core/v3/grpc_service.proto +355 -0
- data/proto/envoy/config/core/v3/health_check.proto +443 -0
- data/proto/envoy/config/core/v3/http_service.proto +35 -0
- data/proto/envoy/config/core/v3/http_uri.proto +58 -0
- data/proto/envoy/config/core/v3/protocol.proto +807 -0
- data/proto/envoy/config/core/v3/proxy_protocol.proto +114 -0
- data/proto/envoy/config/core/v3/resolver.proto +36 -0
- data/proto/envoy/config/core/v3/socket_cmsg_headers.proto +28 -0
- data/proto/envoy/config/core/v3/socket_option.proto +108 -0
- data/proto/envoy/config/core/v3/substitution_format_string.proto +136 -0
- data/proto/envoy/config/core/v3/udp_socket_config.proto +32 -0
- data/proto/envoy/config/endpoint/v3/BUILD +16 -0
- data/proto/envoy/config/endpoint/v3/endpoint.proto +137 -0
- data/proto/envoy/config/endpoint/v3/endpoint_components.proto +229 -0
- data/proto/envoy/config/endpoint/v3/load_report.proto +220 -0
- data/proto/envoy/config/listener/v3/BUILD +18 -0
- data/proto/envoy/config/listener/v3/api_listener.proto +34 -0
- data/proto/envoy/config/listener/v3/listener.proto +455 -0
- data/proto/envoy/config/listener/v3/listener_components.proto +353 -0
- data/proto/envoy/config/listener/v3/quic_config.proto +108 -0
- data/proto/envoy/config/listener/v3/udp_listener_config.proto +52 -0
- data/proto/envoy/config/route/v3/BUILD +19 -0
- data/proto/envoy/config/route/v3/route.proto +172 -0
- data/proto/envoy/config/route/v3/route_components.proto +2918 -0
- data/proto/envoy/config/route/v3/scoped_route.proto +133 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/BUILD +14 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/cert.proto +12 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/common.proto +597 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/secret.proto +61 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/tls.proto +366 -0
- data/proto/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto +67 -0
- data/proto/envoy/service/README.md +3 -0
- data/proto/envoy/service/discovery/v3/BUILD +13 -0
- data/proto/envoy/service/discovery/v3/ads.proto +44 -0
- data/proto/envoy/service/discovery/v3/discovery.proto +443 -0
- data/proto/envoy/type/BUILD +9 -0
- data/proto/envoy/type/hash_policy.proto +28 -0
- data/proto/envoy/type/http.proto +24 -0
- data/proto/envoy/type/http_status.proto +140 -0
- data/proto/envoy/type/matcher/v3/address.proto +22 -0
- data/proto/envoy/type/matcher/v3/filter_state.proto +33 -0
- data/proto/envoy/type/matcher/v3/http_inputs.proto +71 -0
- data/proto/envoy/type/matcher/v3/metadata.proto +110 -0
- data/proto/envoy/type/matcher/v3/node.proto +29 -0
- data/proto/envoy/type/matcher/v3/number.proto +33 -0
- data/proto/envoy/type/matcher/v3/path.proto +31 -0
- data/proto/envoy/type/matcher/v3/regex.proto +97 -0
- data/proto/envoy/type/matcher/v3/status_code_input.proto +23 -0
- data/proto/envoy/type/matcher/v3/string.proto +94 -0
- data/proto/envoy/type/matcher/v3/struct.proto +91 -0
- data/proto/envoy/type/matcher/v3/value.proto +80 -0
- data/proto/envoy/type/metadata/v3/metadata.proto +117 -0
- data/proto/envoy/type/percent.proto +52 -0
- data/proto/envoy/type/range.proto +43 -0
- data/proto/envoy/type/semantic_version.proto +24 -0
- data/proto/envoy/type/token_bucket.proto +36 -0
- data/proto/envoy/type/v3/BUILD +12 -0
- data/proto/envoy/type/v3/hash_policy.proto +43 -0
- data/proto/envoy/type/v3/http.proto +24 -0
- data/proto/envoy/type/v3/http_status.proto +199 -0
- data/proto/envoy/type/v3/percent.proto +57 -0
- data/proto/envoy/type/v3/range.proto +50 -0
- data/proto/envoy/type/v3/ratelimit_strategy.proto +79 -0
- data/proto/envoy/type/v3/ratelimit_unit.proto +37 -0
- data/proto/envoy/type/v3/semantic_version.proto +27 -0
- data/proto/envoy/type/v3/token_bucket.proto +39 -0
- data/proto/google/protobuf/any.proto +162 -0
- data/proto/google/protobuf/duration.proto +115 -0
- data/proto/google/protobuf/empty.proto +51 -0
- data/proto/google/protobuf/struct.proto +95 -0
- data/proto/google/protobuf/timestamp.proto +145 -0
- data/proto/google/protobuf/wrappers.proto +157 -0
- data/proto/google/rpc/status.proto +47 -0
- data/proto/readme.md +70 -0
- data/proto/udpa/annotations/migrate.proto +49 -0
- data/proto/udpa/annotations/security.proto +31 -0
- data/proto/udpa/annotations/sensitive.proto +14 -0
- data/proto/udpa/annotations/status.proto +34 -0
- data/proto/udpa/annotations/versioning.proto +17 -0
- data/proto/validate/validate.proto +862 -0
- data/proto/xds/annotations/v3/migrate.proto +46 -0
- data/proto/xds/annotations/v3/security.proto +30 -0
- data/proto/xds/annotations/v3/sensitive.proto +16 -0
- data/proto/xds/annotations/v3/status.proto +59 -0
- data/proto/xds/annotations/v3/versioning.proto +20 -0
- data/proto/xds/core/v3/authority.proto +22 -0
- data/proto/xds/core/v3/cidr.proto +25 -0
- data/proto/xds/core/v3/collection_entry.proto +55 -0
- data/proto/xds/core/v3/context_params.proto +23 -0
- data/proto/xds/core/v3/extension.proto +26 -0
- data/proto/xds/core/v3/resource.proto +29 -0
- data/proto/xds/core/v3/resource_locator.proto +118 -0
- data/proto/xds/core/v3/resource_name.proto +42 -0
- data/proto/xds/type/matcher/v3/cel.proto +37 -0
- data/proto/xds/type/matcher/v3/domain.proto +46 -0
- data/proto/xds/type/matcher/v3/http_inputs.proto +23 -0
- data/proto/xds/type/matcher/v3/ip.proto +53 -0
- data/proto/xds/type/matcher/v3/matcher.proto +144 -0
- data/proto/xds/type/matcher/v3/range.proto +69 -0
- data/proto/xds/type/matcher/v3/regex.proto +46 -0
- data/proto/xds/type/matcher/v3/string.proto +71 -0
- data/proto/xds/type/v3/cel.proto +77 -0
- data/proto/xds/type/v3/range.proto +40 -0
- data/proto/xds/type/v3/typed_struct.proto +44 -0
- data/readme.md +37 -0
- data/releases.md +5 -0
- data/xds/Dockerfile.backend +24 -0
- data/xds/Dockerfile.control-plane +22 -0
- data/xds/backend_server.rb +68 -0
- data/xds/docker-compose.yaml +89 -0
- data/xds/go.mod +22 -0
- data/xds/go.sum +82 -0
- data/xds/readme.md +122 -0
- data/xds/test/async/grpc/xds/client.rb +294 -0
- data/xds/test/async/grpc/xds/control_plane.rb +94 -0
- data/xds/test_server.go +355 -0
- data/xds/update_protos.sh +123 -0
- data.tar.gz.sig +0 -0
- metadata +386 -0
- metadata.gz.sig +2 -0
data/plan.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Envoy Monitor Plan
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Add support for `async-service-supervisor` to publish worker health and endpoint information to Envoy using xDS.
|
|
6
|
+
|
|
7
|
+
The implementation should keep generic xDS protocol machinery in `async-grpc-xds`, and put supervisor-specific behavior in a separate monitor gem.
|
|
8
|
+
|
|
9
|
+
## Proposed Gems
|
|
10
|
+
|
|
11
|
+
### `async-grpc-xds`
|
|
12
|
+
|
|
13
|
+
Owns generic Ruby xDS client and control-plane support.
|
|
14
|
+
|
|
15
|
+
Existing client-side xDS support remains here. New server-side support should also live here so it can be reused by integrations beyond `async-service-supervisor`.
|
|
16
|
+
|
|
17
|
+
Responsibilities:
|
|
18
|
+
|
|
19
|
+
- ADS gRPC service implementation for Envoy.
|
|
20
|
+
- Snapshot/resource state management.
|
|
21
|
+
- Resource versioning.
|
|
22
|
+
- ACK/NACK handling.
|
|
23
|
+
- Stream reconnect support.
|
|
24
|
+
- Resource builders for common Envoy xDS resources.
|
|
25
|
+
- Tests and Docker compose fixtures for xDS behavior.
|
|
26
|
+
|
|
27
|
+
Initial server-side resource coverage:
|
|
28
|
+
|
|
29
|
+
- CDS: `envoy.config.cluster.v3.Cluster`.
|
|
30
|
+
- EDS: `envoy.config.endpoint.v3.ClusterLoadAssignment`.
|
|
31
|
+
- Endpoint health via `LbEndpoint#health_status`.
|
|
32
|
+
|
|
33
|
+
Possible API shape:
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
control_plane = Async::GRPC::XDS::ControlPlane.new
|
|
37
|
+
|
|
38
|
+
control_plane.update_cluster("myservice")
|
|
39
|
+
control_plane.update_endpoints("myservice", endpoints)
|
|
40
|
+
|
|
41
|
+
server = Async::GRPC::XDS::Server.new(control_plane)
|
|
42
|
+
server.run(endpoint)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### `async-service-supervisor-envoy`
|
|
46
|
+
|
|
47
|
+
Owns the integration between `async-service-supervisor` and Envoy.
|
|
48
|
+
|
|
49
|
+
Proposed public monitor:
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
Async::Service::Supervisor::Envoy::Monitor
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Require path:
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
require "async/service/supervisor/envoy/monitor"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Responsibilities:
|
|
62
|
+
|
|
63
|
+
- Run an embedded xDS control plane for Envoy.
|
|
64
|
+
- Translate supervisor worker registration/removal into xDS endpoint updates.
|
|
65
|
+
- Publish endpoint health to Envoy.
|
|
66
|
+
- Expose monitor status through the normal supervisor monitor status API.
|
|
67
|
+
- Keep Envoy-specific dependencies out of `async-service-supervisor` core.
|
|
68
|
+
|
|
69
|
+
Example usage:
|
|
70
|
+
|
|
71
|
+
```ruby
|
|
72
|
+
Async::Service::Supervisor::Envoy::Monitor.new(
|
|
73
|
+
bind: "http://0.0.0.0:18000",
|
|
74
|
+
clusters: true
|
|
75
|
+
)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Worker state should provide the endpoint metadata:
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
state = {
|
|
82
|
+
name: "myservice",
|
|
83
|
+
endpoint: {
|
|
84
|
+
address: "127.0.0.1",
|
|
85
|
+
port: 50051
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The monitor should map that state to Envoy EDS endpoints.
|
|
91
|
+
|
|
92
|
+
Workers without `state[:endpoint]` should be ignored by the Envoy monitor. This allows non-network workers, control processes, or workers managed by other routing systems to still participate in supervisor monitoring without being published to Envoy.
|
|
93
|
+
|
|
94
|
+
The first version should support multiple clusters. By default, workers are grouped by `state[:name]`. The grouping should be configurable so applications can select, rename, or filter clusters:
|
|
95
|
+
|
|
96
|
+
```ruby
|
|
97
|
+
Async::Service::Supervisor::Envoy::Monitor.new(
|
|
98
|
+
cluster: -> controller{controller.state[:name]},
|
|
99
|
+
include: -> controller{controller.state[:endpoint]}
|
|
100
|
+
)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Health Model
|
|
104
|
+
|
|
105
|
+
Start with a conservative default:
|
|
106
|
+
|
|
107
|
+
- A registered supervisor worker is healthy.
|
|
108
|
+
- A removed/disconnected worker is dead and must disappear from EDS.
|
|
109
|
+
- A registered worker that fails an explicit health policy can remain in EDS with an unhealthy endpoint status.
|
|
110
|
+
|
|
111
|
+
Add optional health policy hooks:
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
Async::Service::Supervisor::Envoy::Monitor.new(
|
|
115
|
+
cluster: -> controller{controller.state[:name]},
|
|
116
|
+
health: -> controller{true}
|
|
117
|
+
)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The monitor should not actively probe worker HTTP/gRPC health. Health should be derived from supervisor state and optional hooks, because the supervisor is already responsible for monitoring workers.
|
|
121
|
+
|
|
122
|
+
Later health inputs can include:
|
|
123
|
+
|
|
124
|
+
- Supervisor connection liveness.
|
|
125
|
+
- Process monitor state.
|
|
126
|
+
- Memory monitor state.
|
|
127
|
+
- Utilization monitor state.
|
|
128
|
+
- Custom worker RPCs.
|
|
129
|
+
|
|
130
|
+
## Implementation Plan
|
|
131
|
+
|
|
132
|
+
1. Add reusable Ruby xDS control-plane support to `async-grpc-xds`.
|
|
133
|
+
2. Keep the current Docker compose xDS test suite, but introduce Ruby control-plane coverage alongside the Go fixture.
|
|
134
|
+
3. Implement a minimal ADS server with CDS and EDS support.
|
|
135
|
+
4. Add resource builders for clusters, cluster load assignments, and endpoints.
|
|
136
|
+
5. Add tests for snapshot versioning, endpoint updates, endpoint removal, and ADS reconnect.
|
|
137
|
+
6. Scaffold `~/Developer/socketry/async-service-supervisor-envoy`.
|
|
138
|
+
7. Implement `Async::Service::Supervisor::Envoy::Monitor`.
|
|
139
|
+
8. Add monitor unit tests using existing supervisor monitor patterns.
|
|
140
|
+
9. Add Docker compose e2e tests with Envoy, the supervisor monitor, and multiple backend workers.
|
|
141
|
+
10. Document the worker state contract and Envoy bootstrap/config examples.
|
|
142
|
+
11. Keep generic Envoy xDS bootstrap examples in `async-grpc-xds`.
|
|
143
|
+
12. Keep supervisor-specific runnable examples and Docker compose fixtures in `async-service-supervisor-envoy`.
|
|
144
|
+
|
|
145
|
+
## E2E Coverage
|
|
146
|
+
|
|
147
|
+
The Docker compose e2e suite for the monitor gem should cover:
|
|
148
|
+
|
|
149
|
+
- Worker registration adds an Envoy endpoint.
|
|
150
|
+
- Workers without `state[:endpoint]` are ignored.
|
|
151
|
+
- Multiple workers are exposed as load-balanced endpoints.
|
|
152
|
+
- Multiple service names are exposed as separate configurable clusters.
|
|
153
|
+
- Worker removal removes the endpoint from EDS.
|
|
154
|
+
- Worker recovery restores the endpoint.
|
|
155
|
+
- ADS stream reconnect receives the current snapshot.
|
|
156
|
+
- Envoy can route traffic through endpoints discovered from the monitor.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.annotations;
|
|
4
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/annotations";
|
|
5
|
+
|
|
6
|
+
import "google/protobuf/descriptor.proto";
|
|
7
|
+
|
|
8
|
+
// [#protodoc-title: Deprecation]
|
|
9
|
+
// Adds annotations for deprecated fields and enums to allow tagging proto
|
|
10
|
+
// fields as fatal by default and the minor version on which the field was
|
|
11
|
+
// deprecated. One Envoy release after deprecation, deprecated fields will be
|
|
12
|
+
// disallowed by default, a state which is reversible with
|
|
13
|
+
// :ref:`runtime overrides <config_runtime_deprecation>`.
|
|
14
|
+
|
|
15
|
+
// Magic number in this file derived from top 28bit of SHA256 digest of
|
|
16
|
+
// "envoy.annotation.disallowed_by_default" and "envoy.annotation.deprecated_at_minor_version"
|
|
17
|
+
extend google.protobuf.FieldOptions {
|
|
18
|
+
bool disallowed_by_default = 189503207;
|
|
19
|
+
|
|
20
|
+
// The API major and minor version on which the field was deprecated
|
|
21
|
+
// (e.g., "3.5" for major version 3 and minor version 5).
|
|
22
|
+
string deprecated_at_minor_version = 157299826;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Magic number in this file derived from top 28bit of SHA256 digest of
|
|
26
|
+
// "envoy.annotation.disallowed_by_default_enum" and
|
|
27
|
+
// "envoy.annotation.deprecated_at_minor_version_eum"
|
|
28
|
+
extend google.protobuf.EnumValueOptions {
|
|
29
|
+
bool disallowed_by_default_enum = 70100853;
|
|
30
|
+
|
|
31
|
+
// The API major and minor version on which the enum value was deprecated
|
|
32
|
+
// (e.g., "3.5" for major version 3 and minor version 5).
|
|
33
|
+
string deprecated_at_minor_version_enum = 181198657;
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.annotations;
|
|
4
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/annotations";
|
|
5
|
+
|
|
6
|
+
import "google/protobuf/descriptor.proto";
|
|
7
|
+
|
|
8
|
+
// [#protodoc-title: Resource]
|
|
9
|
+
|
|
10
|
+
// Magic number in this file derived from top 28bit of SHA256 digest of "envoy.annotation.resource".
|
|
11
|
+
extend google.protobuf.ServiceOptions {
|
|
12
|
+
ResourceAnnotation resource = 265073217;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message ResourceAnnotation {
|
|
16
|
+
// Annotation for xDS services that indicates the fully-qualified Protobuf type for the resource
|
|
17
|
+
// type.
|
|
18
|
+
string type = 1;
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
|
|
2
|
+
|
|
3
|
+
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
|
|
4
|
+
|
|
5
|
+
licenses(["notice"]) # Apache 2
|
|
6
|
+
|
|
7
|
+
api_proto_package(
|
|
8
|
+
deps = [
|
|
9
|
+
"//envoy/annotations:pkg",
|
|
10
|
+
"//envoy/config/core/v3:pkg",
|
|
11
|
+
"//envoy/config/endpoint/v3:pkg",
|
|
12
|
+
"//envoy/type/metadata/v3:pkg",
|
|
13
|
+
"//envoy/type/v3:pkg",
|
|
14
|
+
"@com_github_cncf_xds//udpa/annotations:pkg",
|
|
15
|
+
"@com_github_cncf_xds//xds/core/v3:pkg",
|
|
16
|
+
"@com_github_cncf_xds//xds/type/matcher/v3:pkg",
|
|
17
|
+
],
|
|
18
|
+
)
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package envoy.config.cluster.v3;
|
|
4
|
+
|
|
5
|
+
import "envoy/config/core/v3/base.proto";
|
|
6
|
+
import "envoy/type/v3/percent.proto";
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/wrappers.proto";
|
|
9
|
+
|
|
10
|
+
import "udpa/annotations/status.proto";
|
|
11
|
+
import "udpa/annotations/versioning.proto";
|
|
12
|
+
import "validate/validate.proto";
|
|
13
|
+
|
|
14
|
+
option java_package = "io.envoyproxy.envoy.config.cluster.v3";
|
|
15
|
+
option java_outer_classname = "CircuitBreakerProto";
|
|
16
|
+
option java_multiple_files = true;
|
|
17
|
+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3";
|
|
18
|
+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
|
|
19
|
+
|
|
20
|
+
// [#protodoc-title: Circuit breakers]
|
|
21
|
+
|
|
22
|
+
// :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be
|
|
23
|
+
// specified individually for each defined priority.
|
|
24
|
+
message CircuitBreakers {
|
|
25
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
26
|
+
"envoy.api.v2.cluster.CircuitBreakers";
|
|
27
|
+
|
|
28
|
+
// A Thresholds defines CircuitBreaker settings for a
|
|
29
|
+
// :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`.
|
|
30
|
+
// [#next-free-field: 9]
|
|
31
|
+
message Thresholds {
|
|
32
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
33
|
+
"envoy.api.v2.cluster.CircuitBreakers.Thresholds";
|
|
34
|
+
|
|
35
|
+
message RetryBudget {
|
|
36
|
+
option (udpa.annotations.versioning).previous_message_type =
|
|
37
|
+
"envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget";
|
|
38
|
+
|
|
39
|
+
// Specifies the limit on concurrent retries as a percentage of the sum of active requests and
|
|
40
|
+
// active pending requests. For example, if there are 100 active requests and the
|
|
41
|
+
// budget_percent is set to 25, there may be 25 active retries.
|
|
42
|
+
//
|
|
43
|
+
// This parameter is optional. Defaults to 20%.
|
|
44
|
+
type.v3.Percent budget_percent = 1;
|
|
45
|
+
|
|
46
|
+
// Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
|
|
47
|
+
// number of active retries may never go below this number.
|
|
48
|
+
//
|
|
49
|
+
// This parameter is optional. Defaults to 3.
|
|
50
|
+
google.protobuf.UInt32Value min_retry_concurrency = 2;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`
|
|
54
|
+
// the specified CircuitBreaker settings apply to.
|
|
55
|
+
core.v3.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}];
|
|
56
|
+
|
|
57
|
+
// The maximum number of connections that Envoy will make to the upstream
|
|
58
|
+
// cluster. If not specified, the default is 1024.
|
|
59
|
+
google.protobuf.UInt32Value max_connections = 2;
|
|
60
|
+
|
|
61
|
+
// The maximum number of pending requests that Envoy will allow to the
|
|
62
|
+
// upstream cluster. If not specified, the default is 1024.
|
|
63
|
+
// This limit is applied as a connection limit for non-HTTP traffic.
|
|
64
|
+
google.protobuf.UInt32Value max_pending_requests = 3;
|
|
65
|
+
|
|
66
|
+
// The maximum number of parallel requests that Envoy will make to the
|
|
67
|
+
// upstream cluster. If not specified, the default is 1024.
|
|
68
|
+
// This limit does not apply to non-HTTP traffic.
|
|
69
|
+
google.protobuf.UInt32Value max_requests = 4;
|
|
70
|
+
|
|
71
|
+
// The maximum number of parallel retries that Envoy will allow to the
|
|
72
|
+
// upstream cluster. If not specified, the default is 3.
|
|
73
|
+
google.protobuf.UInt32Value max_retries = 5;
|
|
74
|
+
|
|
75
|
+
// Specifies a limit on concurrent retries in relation to the number of active requests. This
|
|
76
|
+
// parameter is optional.
|
|
77
|
+
//
|
|
78
|
+
// .. note::
|
|
79
|
+
//
|
|
80
|
+
// If this field is set, the retry budget will override any configured retry circuit
|
|
81
|
+
// breaker.
|
|
82
|
+
RetryBudget retry_budget = 8;
|
|
83
|
+
|
|
84
|
+
// If track_remaining is true, then stats will be published that expose
|
|
85
|
+
// the number of resources remaining until the circuit breakers open. If
|
|
86
|
+
// not specified, the default is false.
|
|
87
|
+
//
|
|
88
|
+
// .. note::
|
|
89
|
+
//
|
|
90
|
+
// If a retry budget is used in lieu of the max_retries circuit breaker,
|
|
91
|
+
// the remaining retry resources remaining will not be tracked.
|
|
92
|
+
bool track_remaining = 6;
|
|
93
|
+
|
|
94
|
+
// The maximum number of connection pools per cluster that Envoy will concurrently support at
|
|
95
|
+
// once. If not specified, the default is unlimited. Set this for clusters which create a
|
|
96
|
+
// large number of connection pools. See
|
|
97
|
+
// :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
|
|
98
|
+
// more details.
|
|
99
|
+
google.protobuf.UInt32Value max_connection_pools = 7;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// If multiple :ref:`Thresholds<envoy_v3_api_msg_config.cluster.v3.CircuitBreakers.Thresholds>`
|
|
103
|
+
// are defined with the same :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
|
|
104
|
+
// the first one in the list is used. If no Thresholds is defined for a given
|
|
105
|
+
// :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`, the default values
|
|
106
|
+
// are used.
|
|
107
|
+
repeated Thresholds thresholds = 1;
|
|
108
|
+
|
|
109
|
+
// Optional per-host limits which apply to each individual host in a cluster.
|
|
110
|
+
//
|
|
111
|
+
// .. note::
|
|
112
|
+
// currently only the :ref:`max_connections
|
|
113
|
+
// <envoy_v3_api_field_config.cluster.v3.CircuitBreakers.Thresholds.max_connections>` field is supported for per-host limits.
|
|
114
|
+
//
|
|
115
|
+
// If multiple per-host :ref:`Thresholds<envoy_v3_api_msg_config.cluster.v3.CircuitBreakers.Thresholds>`
|
|
116
|
+
// are defined with the same :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
|
|
117
|
+
// the first one in the list is used. If no per-host Thresholds are defined for a given
|
|
118
|
+
// :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
|
|
119
|
+
// the cluster will not have per-host limits.
|
|
120
|
+
repeated Thresholds per_host_thresholds = 2;
|
|
121
|
+
}
|