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.
Files changed (239) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/fixtures/async/grpc/test_interface.rb +79 -0
  4. data/fixtures/async/grpc/test_message.rb +56 -0
  5. data/lib/async/grpc/xds/ads_stream.rb +70 -0
  6. data/lib/async/grpc/xds/client.rb +255 -0
  7. data/lib/async/grpc/xds/context.rb +201 -0
  8. data/lib/async/grpc/xds/control_plane.rb +143 -0
  9. data/lib/async/grpc/xds/discovery_client.rb +356 -0
  10. data/lib/async/grpc/xds/health_checker.rb +88 -0
  11. data/lib/async/grpc/xds/load_balancer.rb +196 -0
  12. data/lib/async/grpc/xds/resource_builder.rb +138 -0
  13. data/lib/async/grpc/xds/resource_cache.rb +55 -0
  14. data/lib/async/grpc/xds/resources.rb +270 -0
  15. data/lib/async/grpc/xds/server.rb +34 -0
  16. data/lib/async/grpc/xds/service.rb +117 -0
  17. data/lib/async/grpc/xds/version.rb +12 -0
  18. data/lib/async/grpc/xds.rb +42 -0
  19. data/lib/envoy/annotations/deprecation_pb.rb +19 -0
  20. data/lib/envoy/config/cluster/v3/circuit_breaker_pb.rb +31 -0
  21. data/lib/envoy/config/cluster/v3/cluster_pb.rb +80 -0
  22. data/lib/envoy/config/cluster/v3/filter_pb.rb +28 -0
  23. data/lib/envoy/config/cluster/v3/outlier_detection_pb.rb +29 -0
  24. data/lib/envoy/config/core/v3/address_pb.rb +38 -0
  25. data/lib/envoy/config/core/v3/backoff_pb.rb +27 -0
  26. data/lib/envoy/config/core/v3/base_pb.rb +68 -0
  27. data/lib/envoy/config/core/v3/cel_pb.rb +24 -0
  28. data/lib/envoy/config/core/v3/config_source_pb.rb +42 -0
  29. data/lib/envoy/config/core/v3/event_service_config_pb.rb +27 -0
  30. data/lib/envoy/config/core/v3/extension_pb.rb +26 -0
  31. data/lib/envoy/config/core/v3/grpc_method_list_pb.rb +27 -0
  32. data/lib/envoy/config/core/v3/grpc_service_pb.rb +45 -0
  33. data/lib/envoy/config/core/v3/health_check_pb.rb +47 -0
  34. data/lib/envoy/config/core/v3/http_service_pb.rb +27 -0
  35. data/lib/envoy/config/core/v3/http_uri_pb.rb +27 -0
  36. data/lib/envoy/config/core/v3/protocol_pb.rb +51 -0
  37. data/lib/envoy/config/core/v3/proxy_protocol_pb.rb +31 -0
  38. data/lib/envoy/config/core/v3/resolver_pb.rb +27 -0
  39. data/lib/envoy/config/core/v3/socket_cmsg_headers_pb.rb +25 -0
  40. data/lib/envoy/config/core/v3/socket_option_pb.rb +31 -0
  41. data/lib/envoy/config/core/v3/substitution_format_string_pb.rb +30 -0
  42. data/lib/envoy/config/core/v3/udp_socket_config_pb.rb +26 -0
  43. data/lib/envoy/config/endpoint/v3/endpoint_components_pb.rb +40 -0
  44. data/lib/envoy/config/endpoint/v3/endpoint_pb.rb +32 -0
  45. data/lib/envoy/config/endpoint/v3/load_report_pb.rb +36 -0
  46. data/lib/envoy/service/discovery/v3/ads_pb.rb +26 -0
  47. data/lib/envoy/service/discovery/v3/aggregated_discovery_service.rb +64 -0
  48. data/lib/envoy/service/discovery/v3/discovery_pb.rb +42 -0
  49. data/lib/envoy/type/matcher/v3/address_pb.rb +25 -0
  50. data/lib/envoy/type/matcher/v3/filter_state_pb.rb +27 -0
  51. data/lib/envoy/type/matcher/v3/http_inputs_pb.rb +29 -0
  52. data/lib/envoy/type/matcher/v3/metadata_pb.rb +28 -0
  53. data/lib/envoy/type/matcher/v3/node_pb.rb +27 -0
  54. data/lib/envoy/type/matcher/v3/number_pb.rb +27 -0
  55. data/lib/envoy/type/matcher/v3/path_pb.rb +27 -0
  56. data/lib/envoy/type/matcher/v3/regex_pb.rb +30 -0
  57. data/lib/envoy/type/matcher/v3/status_code_input_pb.rb +25 -0
  58. data/lib/envoy/type/matcher/v3/string_pb.rb +29 -0
  59. data/lib/envoy/type/matcher/v3/struct_pb.rb +28 -0
  60. data/lib/envoy/type/matcher/v3/value_pb.rb +31 -0
  61. data/lib/envoy/type/metadata/v3/metadata_pb.rb +32 -0
  62. data/lib/envoy/type/v3/hash_policy_pb.rb +26 -0
  63. data/lib/envoy/type/v3/http_pb.rb +22 -0
  64. data/lib/envoy/type/v3/http_status_pb.rb +25 -0
  65. data/lib/envoy/type/v3/percent_pb.rb +26 -0
  66. data/lib/envoy/type/v3/range_pb.rb +25 -0
  67. data/lib/envoy/type/v3/ratelimit_strategy_pb.rb +28 -0
  68. data/lib/envoy/type/v3/ratelimit_unit_pb.rb +22 -0
  69. data/lib/envoy/type/v3/semantic_version_pb.rb +23 -0
  70. data/lib/envoy/type/v3/token_bucket_pb.rb +26 -0
  71. data/lib/envoy.rb +83 -0
  72. data/lib/google/protobuf/any_pb.rb +18 -0
  73. data/lib/google/protobuf/duration_pb.rb +18 -0
  74. data/lib/google/protobuf/empty_pb.rb +18 -0
  75. data/lib/google/protobuf/struct_pb.rb +21 -0
  76. data/lib/google/protobuf/timestamp_pb.rb +18 -0
  77. data/lib/google/protobuf/wrappers_pb.rb +26 -0
  78. data/lib/google/rpc/status_pb.rb +20 -0
  79. data/lib/udpa/annotations/migrate_pb.rb +22 -0
  80. data/lib/udpa/annotations/security_pb.rb +23 -0
  81. data/lib/udpa/annotations/sensitive_pb.rb +19 -0
  82. data/lib/udpa/annotations/status_pb.rb +21 -0
  83. data/lib/udpa/annotations/versioning_pb.rb +20 -0
  84. data/lib/validate/validate_pb.rb +43 -0
  85. data/lib/xds/annotations/v3/status_pb.rb +26 -0
  86. data/lib/xds/core/v3/authority_pb.rb +23 -0
  87. data/lib/xds/core/v3/cidr_pb.rb +24 -0
  88. data/lib/xds/core/v3/collection_entry_pb.rb +26 -0
  89. data/lib/xds/core/v3/context_params_pb.rb +22 -0
  90. data/lib/xds/core/v3/extension_pb.rb +23 -0
  91. data/lib/xds/core/v3/resource_locator_pb.rb +26 -0
  92. data/lib/xds/core/v3/resource_name_pb.rb +24 -0
  93. data/lib/xds/core/v3/resource_pb.rb +24 -0
  94. data/lib/xds/type/matcher/v3/domain_pb.rb +27 -0
  95. data/lib/xds/type/matcher/v3/http_inputs_pb.rb +22 -0
  96. data/lib/xds/type/matcher/v3/ip_pb.rb +28 -0
  97. data/lib/xds/type/matcher/v3/matcher_pb.rb +34 -0
  98. data/lib/xds/type/matcher/v3/range_pb.rb +31 -0
  99. data/lib/xds/type/matcher/v3/regex_pb.rb +25 -0
  100. data/lib/xds/type/matcher/v3/string_pb.rb +27 -0
  101. data/license.md +21 -0
  102. data/plan.md +156 -0
  103. data/proto/envoy/annotations/deprecation.proto +34 -0
  104. data/proto/envoy/annotations/resource.proto +19 -0
  105. data/proto/envoy/config/README.md +3 -0
  106. data/proto/envoy/config/cluster/v3/BUILD +18 -0
  107. data/proto/envoy/config/cluster/v3/circuit_breaker.proto +121 -0
  108. data/proto/envoy/config/cluster/v3/cluster.proto +1407 -0
  109. data/proto/envoy/config/cluster/v3/filter.proto +40 -0
  110. data/proto/envoy/config/cluster/v3/outlier_detection.proto +180 -0
  111. data/proto/envoy/config/core/v3/BUILD +16 -0
  112. data/proto/envoy/config/core/v3/address.proto +214 -0
  113. data/proto/envoy/config/core/v3/backoff.proto +37 -0
  114. data/proto/envoy/config/core/v3/base.proto +662 -0
  115. data/proto/envoy/config/core/v3/cel.proto +63 -0
  116. data/proto/envoy/config/core/v3/config_source.proto +283 -0
  117. data/proto/envoy/config/core/v3/event_service_config.proto +29 -0
  118. data/proto/envoy/config/core/v3/extension.proto +32 -0
  119. data/proto/envoy/config/core/v3/grpc_method_list.proto +33 -0
  120. data/proto/envoy/config/core/v3/grpc_service.proto +355 -0
  121. data/proto/envoy/config/core/v3/health_check.proto +443 -0
  122. data/proto/envoy/config/core/v3/http_service.proto +35 -0
  123. data/proto/envoy/config/core/v3/http_uri.proto +58 -0
  124. data/proto/envoy/config/core/v3/protocol.proto +807 -0
  125. data/proto/envoy/config/core/v3/proxy_protocol.proto +114 -0
  126. data/proto/envoy/config/core/v3/resolver.proto +36 -0
  127. data/proto/envoy/config/core/v3/socket_cmsg_headers.proto +28 -0
  128. data/proto/envoy/config/core/v3/socket_option.proto +108 -0
  129. data/proto/envoy/config/core/v3/substitution_format_string.proto +136 -0
  130. data/proto/envoy/config/core/v3/udp_socket_config.proto +32 -0
  131. data/proto/envoy/config/endpoint/v3/BUILD +16 -0
  132. data/proto/envoy/config/endpoint/v3/endpoint.proto +137 -0
  133. data/proto/envoy/config/endpoint/v3/endpoint_components.proto +229 -0
  134. data/proto/envoy/config/endpoint/v3/load_report.proto +220 -0
  135. data/proto/envoy/config/listener/v3/BUILD +18 -0
  136. data/proto/envoy/config/listener/v3/api_listener.proto +34 -0
  137. data/proto/envoy/config/listener/v3/listener.proto +455 -0
  138. data/proto/envoy/config/listener/v3/listener_components.proto +353 -0
  139. data/proto/envoy/config/listener/v3/quic_config.proto +108 -0
  140. data/proto/envoy/config/listener/v3/udp_listener_config.proto +52 -0
  141. data/proto/envoy/config/route/v3/BUILD +19 -0
  142. data/proto/envoy/config/route/v3/route.proto +172 -0
  143. data/proto/envoy/config/route/v3/route_components.proto +2918 -0
  144. data/proto/envoy/config/route/v3/scoped_route.proto +133 -0
  145. data/proto/envoy/extensions/transport_sockets/tls/v3/BUILD +14 -0
  146. data/proto/envoy/extensions/transport_sockets/tls/v3/cert.proto +12 -0
  147. data/proto/envoy/extensions/transport_sockets/tls/v3/common.proto +597 -0
  148. data/proto/envoy/extensions/transport_sockets/tls/v3/secret.proto +61 -0
  149. data/proto/envoy/extensions/transport_sockets/tls/v3/tls.proto +366 -0
  150. data/proto/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto +67 -0
  151. data/proto/envoy/service/README.md +3 -0
  152. data/proto/envoy/service/discovery/v3/BUILD +13 -0
  153. data/proto/envoy/service/discovery/v3/ads.proto +44 -0
  154. data/proto/envoy/service/discovery/v3/discovery.proto +443 -0
  155. data/proto/envoy/type/BUILD +9 -0
  156. data/proto/envoy/type/hash_policy.proto +28 -0
  157. data/proto/envoy/type/http.proto +24 -0
  158. data/proto/envoy/type/http_status.proto +140 -0
  159. data/proto/envoy/type/matcher/v3/address.proto +22 -0
  160. data/proto/envoy/type/matcher/v3/filter_state.proto +33 -0
  161. data/proto/envoy/type/matcher/v3/http_inputs.proto +71 -0
  162. data/proto/envoy/type/matcher/v3/metadata.proto +110 -0
  163. data/proto/envoy/type/matcher/v3/node.proto +29 -0
  164. data/proto/envoy/type/matcher/v3/number.proto +33 -0
  165. data/proto/envoy/type/matcher/v3/path.proto +31 -0
  166. data/proto/envoy/type/matcher/v3/regex.proto +97 -0
  167. data/proto/envoy/type/matcher/v3/status_code_input.proto +23 -0
  168. data/proto/envoy/type/matcher/v3/string.proto +94 -0
  169. data/proto/envoy/type/matcher/v3/struct.proto +91 -0
  170. data/proto/envoy/type/matcher/v3/value.proto +80 -0
  171. data/proto/envoy/type/metadata/v3/metadata.proto +117 -0
  172. data/proto/envoy/type/percent.proto +52 -0
  173. data/proto/envoy/type/range.proto +43 -0
  174. data/proto/envoy/type/semantic_version.proto +24 -0
  175. data/proto/envoy/type/token_bucket.proto +36 -0
  176. data/proto/envoy/type/v3/BUILD +12 -0
  177. data/proto/envoy/type/v3/hash_policy.proto +43 -0
  178. data/proto/envoy/type/v3/http.proto +24 -0
  179. data/proto/envoy/type/v3/http_status.proto +199 -0
  180. data/proto/envoy/type/v3/percent.proto +57 -0
  181. data/proto/envoy/type/v3/range.proto +50 -0
  182. data/proto/envoy/type/v3/ratelimit_strategy.proto +79 -0
  183. data/proto/envoy/type/v3/ratelimit_unit.proto +37 -0
  184. data/proto/envoy/type/v3/semantic_version.proto +27 -0
  185. data/proto/envoy/type/v3/token_bucket.proto +39 -0
  186. data/proto/google/protobuf/any.proto +162 -0
  187. data/proto/google/protobuf/duration.proto +115 -0
  188. data/proto/google/protobuf/empty.proto +51 -0
  189. data/proto/google/protobuf/struct.proto +95 -0
  190. data/proto/google/protobuf/timestamp.proto +145 -0
  191. data/proto/google/protobuf/wrappers.proto +157 -0
  192. data/proto/google/rpc/status.proto +47 -0
  193. data/proto/readme.md +70 -0
  194. data/proto/udpa/annotations/migrate.proto +49 -0
  195. data/proto/udpa/annotations/security.proto +31 -0
  196. data/proto/udpa/annotations/sensitive.proto +14 -0
  197. data/proto/udpa/annotations/status.proto +34 -0
  198. data/proto/udpa/annotations/versioning.proto +17 -0
  199. data/proto/validate/validate.proto +862 -0
  200. data/proto/xds/annotations/v3/migrate.proto +46 -0
  201. data/proto/xds/annotations/v3/security.proto +30 -0
  202. data/proto/xds/annotations/v3/sensitive.proto +16 -0
  203. data/proto/xds/annotations/v3/status.proto +59 -0
  204. data/proto/xds/annotations/v3/versioning.proto +20 -0
  205. data/proto/xds/core/v3/authority.proto +22 -0
  206. data/proto/xds/core/v3/cidr.proto +25 -0
  207. data/proto/xds/core/v3/collection_entry.proto +55 -0
  208. data/proto/xds/core/v3/context_params.proto +23 -0
  209. data/proto/xds/core/v3/extension.proto +26 -0
  210. data/proto/xds/core/v3/resource.proto +29 -0
  211. data/proto/xds/core/v3/resource_locator.proto +118 -0
  212. data/proto/xds/core/v3/resource_name.proto +42 -0
  213. data/proto/xds/type/matcher/v3/cel.proto +37 -0
  214. data/proto/xds/type/matcher/v3/domain.proto +46 -0
  215. data/proto/xds/type/matcher/v3/http_inputs.proto +23 -0
  216. data/proto/xds/type/matcher/v3/ip.proto +53 -0
  217. data/proto/xds/type/matcher/v3/matcher.proto +144 -0
  218. data/proto/xds/type/matcher/v3/range.proto +69 -0
  219. data/proto/xds/type/matcher/v3/regex.proto +46 -0
  220. data/proto/xds/type/matcher/v3/string.proto +71 -0
  221. data/proto/xds/type/v3/cel.proto +77 -0
  222. data/proto/xds/type/v3/range.proto +40 -0
  223. data/proto/xds/type/v3/typed_struct.proto +44 -0
  224. data/readme.md +37 -0
  225. data/releases.md +5 -0
  226. data/xds/Dockerfile.backend +24 -0
  227. data/xds/Dockerfile.control-plane +22 -0
  228. data/xds/backend_server.rb +68 -0
  229. data/xds/docker-compose.yaml +89 -0
  230. data/xds/go.mod +22 -0
  231. data/xds/go.sum +82 -0
  232. data/xds/readme.md +122 -0
  233. data/xds/test/async/grpc/xds/client.rb +294 -0
  234. data/xds/test/async/grpc/xds/control_plane.rb +94 -0
  235. data/xds/test_server.go +355 -0
  236. data/xds/update_protos.sh +123 -0
  237. data.tar.gz.sig +0 -0
  238. metadata +386 -0
  239. metadata.gz.sig +2 -0
@@ -0,0 +1,443 @@
1
+ syntax = "proto3";
2
+
3
+ package envoy.config.core.v3;
4
+
5
+ import "envoy/config/core/v3/base.proto";
6
+ import "envoy/config/core/v3/event_service_config.proto";
7
+ import "envoy/config/core/v3/extension.proto";
8
+ import "envoy/config/core/v3/proxy_protocol.proto";
9
+ import "envoy/type/matcher/v3/string.proto";
10
+ import "envoy/type/v3/http.proto";
11
+ import "envoy/type/v3/range.proto";
12
+
13
+ import "google/protobuf/any.proto";
14
+ import "google/protobuf/duration.proto";
15
+ import "google/protobuf/struct.proto";
16
+ import "google/protobuf/wrappers.proto";
17
+
18
+ import "envoy/annotations/deprecation.proto";
19
+ import "udpa/annotations/status.proto";
20
+ import "udpa/annotations/versioning.proto";
21
+ import "validate/validate.proto";
22
+
23
+ option java_package = "io.envoyproxy.envoy.config.core.v3";
24
+ option java_outer_classname = "HealthCheckProto";
25
+ option java_multiple_files = true;
26
+ option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3";
27
+ option (udpa.annotations.file_status).package_version_status = ACTIVE;
28
+
29
+ // [#protodoc-title: Health check]
30
+ // * Health checking :ref:`architecture overview <arch_overview_health_checking>`.
31
+ // * If health checking is configured for a cluster, additional statistics are emitted. They are
32
+ // documented :ref:`here <config_cluster_manager_cluster_stats>`.
33
+
34
+ // Endpoint health status.
35
+ enum HealthStatus {
36
+ // The health status is not known. This is interpreted by Envoy as ``HEALTHY``.
37
+ UNKNOWN = 0;
38
+
39
+ // Healthy.
40
+ HEALTHY = 1;
41
+
42
+ // Unhealthy.
43
+ UNHEALTHY = 2;
44
+
45
+ // Connection draining in progress. E.g.,
46
+ // `<https://aws.amazon.com/blogs/aws/elb-connection-draining-remove-instances-from-service-with-care/>`_
47
+ // or
48
+ // `<https://cloud.google.com/compute/docs/load-balancing/enabling-connection-draining>`_.
49
+ // This is interpreted by Envoy as ``UNHEALTHY``.
50
+ DRAINING = 3;
51
+
52
+ // Health check timed out. This is part of HDS and is interpreted by Envoy as
53
+ // ``UNHEALTHY``.
54
+ TIMEOUT = 4;
55
+
56
+ // Degraded.
57
+ DEGRADED = 5;
58
+ }
59
+
60
+ message HealthStatusSet {
61
+ // An order-independent set of health status.
62
+ repeated HealthStatus statuses = 1
63
+ [(validate.rules).repeated = {items {enum {defined_only: true}}}];
64
+ }
65
+
66
+ // [#next-free-field: 27]
67
+ message HealthCheck {
68
+ option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HealthCheck";
69
+
70
+ // Describes the encoding of the payload bytes in the payload.
71
+ message Payload {
72
+ option (udpa.annotations.versioning).previous_message_type =
73
+ "envoy.api.v2.core.HealthCheck.Payload";
74
+
75
+ oneof payload {
76
+ option (validate.required) = true;
77
+
78
+ // Hex encoded payload. E.g., "000000FF".
79
+ string text = 1 [(validate.rules).string = {min_len: 1}];
80
+
81
+ // Binary payload.
82
+ bytes binary = 2;
83
+ }
84
+ }
85
+
86
+ // [#next-free-field: 15]
87
+ message HttpHealthCheck {
88
+ option (udpa.annotations.versioning).previous_message_type =
89
+ "envoy.api.v2.core.HealthCheck.HttpHealthCheck";
90
+
91
+ reserved 5, 7;
92
+
93
+ reserved "service_name", "use_http2";
94
+
95
+ // The value of the host header in the HTTP health check request. If
96
+ // left empty (default value), the name of the cluster this health check is associated
97
+ // with will be used. The host header can be customized for a specific endpoint by setting the
98
+ // :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.HealthCheckConfig.hostname>` field.
99
+ string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE}];
100
+
101
+ // Specifies the HTTP path that will be requested during health checking. For example
102
+ // ``/healthcheck``.
103
+ string path = 2 [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE}];
104
+
105
+ // HTTP specific payload to be sent as the request body during health checking.
106
+ // If specified, the method should support a request body (POST, PUT, PATCH, etc.).
107
+ Payload send = 3;
108
+
109
+ // Specifies a list of HTTP expected responses to match in the first ``response_buffer_size`` bytes of the response body.
110
+ // If it is set, both the expected response check and status code determine the health check.
111
+ // When checking the response, “fuzzy” matching is performed such that each payload block must be found,
112
+ // and in the order specified, but not necessarily contiguous.
113
+ //
114
+ // .. note::
115
+ //
116
+ // It is recommended to set ``response_buffer_size`` based on the total Payload size for efficiency.
117
+ // The default buffer size is 1024 bytes when it is not set.
118
+ repeated Payload receive = 4;
119
+
120
+ // Specifies the size of response buffer in bytes that is used to Payload match.
121
+ // The default value is 1024. Setting to 0 implies that the Payload will be matched against the entire response.
122
+ google.protobuf.UInt64Value response_buffer_size = 14 [(validate.rules).uint64 = {gte: 0}];
123
+
124
+ // Specifies a list of HTTP headers that should be added to each request that is sent to the
125
+ // health checked cluster. For more information, including details on header value syntax, see
126
+ // the documentation on :ref:`custom request headers
127
+ // <config_http_conn_man_headers_custom_request_headers>`.
128
+ repeated HeaderValueOption request_headers_to_add = 6
129
+ [(validate.rules).repeated = {max_items: 1000}];
130
+
131
+ // Specifies a list of HTTP headers that should be removed from each request that is sent to the
132
+ // health checked cluster.
133
+ repeated string request_headers_to_remove = 8 [(validate.rules).repeated = {
134
+ items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}
135
+ }];
136
+
137
+ // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default
138
+ // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open
139
+ // semantics of :ref:`Int64Range <envoy_v3_api_msg_type.v3.Int64Range>`. The start and end of each
140
+ // range are required. Only statuses in the range [100, 600) are allowed.
141
+ repeated type.v3.Int64Range expected_statuses = 9;
142
+
143
+ // Specifies a list of HTTP response statuses considered retriable. If provided, responses in this range
144
+ // will count towards the configured :ref:`unhealthy_threshold <envoy_v3_api_field_config.core.v3.HealthCheck.unhealthy_threshold>`,
145
+ // but will not result in the host being considered immediately unhealthy. Ranges follow half-open semantics of
146
+ // :ref:`Int64Range <envoy_v3_api_msg_type.v3.Int64Range>`. The start and end of each range are required.
147
+ // Only statuses in the range [100, 600) are allowed. The :ref:`expected_statuses <envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses>`
148
+ // field takes precedence for any range overlaps with this field i.e. if status code 200 is both retriable and expected, a 200 response will
149
+ // be considered a successful health check. By default all responses not in
150
+ // :ref:`expected_statuses <envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses>` will result in
151
+ // the host being considered immediately unhealthy i.e. if status code 200 is expected and there are no configured retriable statuses, any
152
+ // non-200 response will result in the host being marked unhealthy.
153
+ repeated type.v3.Int64Range retriable_statuses = 12;
154
+
155
+ // Use specified application protocol for health checks.
156
+ type.v3.CodecClientType codec_client_type = 10 [(validate.rules).enum = {defined_only: true}];
157
+
158
+ // An optional service name parameter which is used to validate the identity of
159
+ // the health checked cluster using a :ref:`StringMatcher
160
+ // <envoy_v3_api_msg_type.matcher.v3.StringMatcher>`. See the :ref:`architecture overview
161
+ // <arch_overview_health_checking_identity>` for more information.
162
+ type.matcher.v3.StringMatcher service_name_matcher = 11;
163
+
164
+ // HTTP Method that will be used for health checking, default is "GET".
165
+ // GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, PATCH methods are supported.
166
+ // Request body payloads are supported for POST, PUT, PATCH, and OPTIONS methods only.
167
+ // CONNECT method is disallowed because it is not appropriate for health check request.
168
+ // If a non-200 response is expected by the method, it needs to be set in :ref:`expected_statuses <envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses>`.
169
+ RequestMethod method = 13 [(validate.rules).enum = {defined_only: true not_in: 6}];
170
+ }
171
+
172
+ message TcpHealthCheck {
173
+ option (udpa.annotations.versioning).previous_message_type =
174
+ "envoy.api.v2.core.HealthCheck.TcpHealthCheck";
175
+
176
+ // Empty payloads imply a connect-only health check.
177
+ Payload send = 1;
178
+
179
+ // When checking the response, “fuzzy” matching is performed such that each
180
+ // payload block must be found, and in the order specified, but not
181
+ // necessarily contiguous.
182
+ repeated Payload receive = 2;
183
+
184
+ // When setting this value, it tries to attempt health check request with ProxyProtocol.
185
+ // When ``send`` is presented, they are sent after preceding ProxyProtocol header.
186
+ // Only ProxyProtocol header is sent when ``send`` is not presented.
187
+ // It allows to use both ProxyProtocol V1 and V2. In V1, it presents L3/L4. In V2, it includes
188
+ // LOCAL command and doesn't include L3/L4.
189
+ ProxyProtocolConfig proxy_protocol_config = 3;
190
+ }
191
+
192
+ message RedisHealthCheck {
193
+ option (udpa.annotations.versioning).previous_message_type =
194
+ "envoy.api.v2.core.HealthCheck.RedisHealthCheck";
195
+
196
+ // If set, optionally perform ``EXISTS <key>`` instead of ``PING``. A return value
197
+ // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other
198
+ // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance
199
+ // by setting the specified key to any value and waiting for traffic to drain.
200
+ string key = 1;
201
+ }
202
+
203
+ // `grpc.health.v1.Health
204
+ // <https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto>`_-based
205
+ // healthcheck. See `gRPC doc <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_
206
+ // for details.
207
+ message GrpcHealthCheck {
208
+ option (udpa.annotations.versioning).previous_message_type =
209
+ "envoy.api.v2.core.HealthCheck.GrpcHealthCheck";
210
+
211
+ // An optional service name parameter which will be sent to gRPC service in
212
+ // `grpc.health.v1.HealthCheckRequest
213
+ // <https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto#L20>`_.
214
+ // message. See `gRPC health-checking overview
215
+ // <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_ for more information.
216
+ string service_name = 1;
217
+
218
+ // The value of the :authority header in the gRPC health check request. If
219
+ // left empty (default value), the name of the cluster this health check is associated
220
+ // with will be used. The authority header can be customized for a specific endpoint by setting
221
+ // the :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.HealthCheckConfig.hostname>` field.
222
+ string authority = 2
223
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
224
+
225
+ // Specifies a list of key-value pairs that should be added to the metadata of each GRPC call
226
+ // that is sent to the health checked cluster. For more information, including details on header value syntax,
227
+ // see the documentation on :ref:`custom request headers
228
+ // <config_http_conn_man_headers_custom_request_headers>`.
229
+ repeated HeaderValueOption initial_metadata = 3 [(validate.rules).repeated = {max_items: 1000}];
230
+ }
231
+
232
+ // Custom health check.
233
+ message CustomHealthCheck {
234
+ option (udpa.annotations.versioning).previous_message_type =
235
+ "envoy.api.v2.core.HealthCheck.CustomHealthCheck";
236
+
237
+ reserved 2;
238
+
239
+ reserved "config";
240
+
241
+ // The registered name of the custom health checker.
242
+ string name = 1 [(validate.rules).string = {min_len: 1}];
243
+
244
+ // A custom health checker specific configuration which depends on the custom health checker
245
+ // being instantiated. See :api:`envoy/config/health_checker` for reference.
246
+ // [#extension-category: envoy.health_checkers]
247
+ oneof config_type {
248
+ google.protobuf.Any typed_config = 3;
249
+ }
250
+ }
251
+
252
+ // Health checks occur over the transport socket specified for the cluster. This implies that if a
253
+ // cluster is using a TLS-enabled transport socket, the health check will also occur over TLS.
254
+ //
255
+ // This allows overriding the cluster TLS settings, just for health check connections.
256
+ message TlsOptions {
257
+ option (udpa.annotations.versioning).previous_message_type =
258
+ "envoy.api.v2.core.HealthCheck.TlsOptions";
259
+
260
+ // Specifies the ALPN protocols for health check connections. This is useful if the
261
+ // corresponding upstream is using ALPN-based :ref:`FilterChainMatch
262
+ // <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>` along with different protocols for health checks
263
+ // versus data connections. If empty, no ALPN protocols will be set on health check connections.
264
+ repeated string alpn_protocols = 1;
265
+ }
266
+
267
+ reserved 10;
268
+
269
+ // The time to wait for a health check response. If the timeout is reached the
270
+ // health check attempt will be considered a failure.
271
+ google.protobuf.Duration timeout = 1 [(validate.rules).duration = {
272
+ required: true
273
+ gt {}
274
+ }];
275
+
276
+ // The interval between health checks.
277
+ google.protobuf.Duration interval = 2 [(validate.rules).duration = {
278
+ required: true
279
+ gt {}
280
+ }];
281
+
282
+ // An optional jitter amount in milliseconds. If specified, Envoy will start health
283
+ // checking after for a random time in ms between 0 and initial_jitter. This only
284
+ // applies to the first health check.
285
+ google.protobuf.Duration initial_jitter = 20;
286
+
287
+ // An optional jitter amount in milliseconds. If specified, during every
288
+ // interval Envoy will add interval_jitter to the wait time.
289
+ google.protobuf.Duration interval_jitter = 3;
290
+
291
+ // An optional jitter amount as a percentage of interval_ms. If specified,
292
+ // during every interval Envoy will add ``interval_ms`` *
293
+ // ``interval_jitter_percent`` / 100 to the wait time.
294
+ //
295
+ // If interval_jitter_ms and interval_jitter_percent are both set, both of
296
+ // them will be used to increase the wait time.
297
+ uint32 interval_jitter_percent = 18;
298
+
299
+ // The number of unhealthy health checks required before a host is marked
300
+ // unhealthy. Note that for ``http`` health checking if a host responds with a code not in
301
+ // :ref:`expected_statuses <envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses>`
302
+ // or :ref:`retriable_statuses <envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.retriable_statuses>`,
303
+ // this threshold is ignored and the host is considered immediately unhealthy.
304
+ google.protobuf.UInt32Value unhealthy_threshold = 4 [(validate.rules).message = {required: true}];
305
+
306
+ // The number of healthy health checks required before a host is marked
307
+ // healthy. Note that during startup, only a single successful health check is
308
+ // required to mark a host healthy.
309
+ google.protobuf.UInt32Value healthy_threshold = 5 [(validate.rules).message = {required: true}];
310
+
311
+ // [#not-implemented-hide:] Non-serving port for health checking.
312
+ google.protobuf.UInt32Value alt_port = 6;
313
+
314
+ // Reuse health check connection between health checks. Default is true.
315
+ google.protobuf.BoolValue reuse_connection = 7;
316
+
317
+ oneof health_checker {
318
+ option (validate.required) = true;
319
+
320
+ // HTTP health check.
321
+ HttpHealthCheck http_health_check = 8;
322
+
323
+ // TCP health check.
324
+ TcpHealthCheck tcp_health_check = 9;
325
+
326
+ // gRPC health check.
327
+ GrpcHealthCheck grpc_health_check = 11;
328
+
329
+ // Custom health check.
330
+ CustomHealthCheck custom_health_check = 13;
331
+ }
332
+
333
+ // The "no traffic interval" is a special health check interval that is used when a cluster has
334
+ // never had traffic routed to it. This lower interval allows cluster information to be kept up to
335
+ // date, without sending a potentially large amount of active health checking traffic for no
336
+ // reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the
337
+ // standard health check interval that is defined. Note that this interval takes precedence over
338
+ // any other.
339
+ //
340
+ // The default value for "no traffic interval" is 60 seconds.
341
+ google.protobuf.Duration no_traffic_interval = 12 [(validate.rules).duration = {gt {}}];
342
+
343
+ // The "no traffic healthy interval" is a special health check interval that
344
+ // is used for hosts that are currently passing active health checking
345
+ // (including new hosts) when the cluster has received no traffic.
346
+ //
347
+ // This is useful for when we want to send frequent health checks with
348
+ // ``no_traffic_interval`` but then revert to lower frequency ``no_traffic_healthy_interval`` once
349
+ // a host in the cluster is marked as healthy.
350
+ //
351
+ // Once a cluster has been used for traffic routing, Envoy will shift back to using the
352
+ // standard health check interval that is defined.
353
+ //
354
+ // If no_traffic_healthy_interval is not set, it will default to the
355
+ // no traffic interval and send that interval regardless of health state.
356
+ google.protobuf.Duration no_traffic_healthy_interval = 24 [(validate.rules).duration = {gt {}}];
357
+
358
+ // The "unhealthy interval" is a health check interval that is used for hosts that are marked as
359
+ // unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the
360
+ // standard health check interval that is defined.
361
+ //
362
+ // The default value for "unhealthy interval" is the same as "interval".
363
+ google.protobuf.Duration unhealthy_interval = 14 [(validate.rules).duration = {gt {}}];
364
+
365
+ // The "unhealthy edge interval" is a special health check interval that is used for the first
366
+ // health check right after a host is marked as unhealthy. For subsequent health checks
367
+ // Envoy will shift back to using either "unhealthy interval" if present or the standard health
368
+ // check interval that is defined.
369
+ //
370
+ // The default value for "unhealthy edge interval" is the same as "unhealthy interval".
371
+ google.protobuf.Duration unhealthy_edge_interval = 15 [(validate.rules).duration = {gt {}}];
372
+
373
+ // The "healthy edge interval" is a special health check interval that is used for the first
374
+ // health check right after a host is marked as healthy. For subsequent health checks
375
+ // Envoy will shift back to using the standard health check interval that is defined.
376
+ //
377
+ // The default value for "healthy edge interval" is the same as the default interval.
378
+ google.protobuf.Duration healthy_edge_interval = 16 [(validate.rules).duration = {gt {}}];
379
+
380
+ // Specifies the path to the :ref:`health check event log <arch_overview_health_check_logging>`.
381
+ //
382
+ // .. attention::
383
+ // This field is deprecated in favor of the extension
384
+ // :ref:`event_logger <envoy_v3_api_field_config.core.v3.HealthCheck.event_logger>` and
385
+ // :ref:`event_log_path <envoy_v3_api_field_extensions.health_check.event_sinks.file.v3.HealthCheckEventFileSink.event_log_path>`
386
+ // in the file sink extension.
387
+ string event_log_path = 17
388
+ [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];
389
+
390
+ // A list of event log sinks to process the health check event.
391
+ // [#extension-category: envoy.health_check.event_sinks]
392
+ repeated TypedExtensionConfig event_logger = 25;
393
+
394
+ // [#not-implemented-hide:]
395
+ // The gRPC service for the health check event service.
396
+ // If empty, health check events won't be sent to a remote endpoint.
397
+ EventServiceConfig event_service = 22;
398
+
399
+ // If set to true, health check failure events will always be logged. If set to false, only the
400
+ // initial health check failure event will be logged.
401
+ // The default value is false.
402
+ bool always_log_health_check_failures = 19;
403
+
404
+ // If set to true, health check success events will always be logged. If set to false, only host addition event will be logged
405
+ // if it is the first successful health check, or if the healthy threshold is reached.
406
+ // The default value is false.
407
+ bool always_log_health_check_success = 26;
408
+
409
+ // This allows overriding the cluster TLS settings, just for health check connections.
410
+ TlsOptions tls_options = 21;
411
+
412
+ // Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's
413
+ // :ref:`tranport socket matches <envoy_v3_api_field_config.cluster.v3.Cluster.transport_socket_matches>`.
414
+ // For example, the following match criteria
415
+ //
416
+ // .. code-block:: yaml
417
+ //
418
+ // transport_socket_match_criteria:
419
+ // useMTLS: true
420
+ //
421
+ // Will match the following :ref:`cluster socket match <envoy_v3_api_msg_config.cluster.v3.Cluster.TransportSocketMatch>`
422
+ //
423
+ // .. code-block:: yaml
424
+ //
425
+ // transport_socket_matches:
426
+ // - name: "useMTLS"
427
+ // match:
428
+ // useMTLS: true
429
+ // transport_socket:
430
+ // name: envoy.transport_sockets.tls
431
+ // config: { ... } # tls socket configuration
432
+ //
433
+ // If this field is set, then for health checks it will supersede an entry of ``envoy.transport_socket`` in the
434
+ // :ref:`LbEndpoint.Metadata <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata>`.
435
+ // This allows using different transport socket capabilities for health checking versus proxying to the
436
+ // endpoint.
437
+ //
438
+ // If the key/values pairs specified do not match any
439
+ // :ref:`transport socket matches <envoy_v3_api_field_config.cluster.v3.Cluster.transport_socket_matches>`,
440
+ // the cluster's :ref:`transport socket <envoy_v3_api_field_config.cluster.v3.Cluster.transport_socket>`
441
+ // will be used for health check socket configuration.
442
+ google.protobuf.Struct transport_socket_match_criteria = 23;
443
+ }
@@ -0,0 +1,35 @@
1
+ syntax = "proto3";
2
+
3
+ package envoy.config.core.v3;
4
+
5
+ import "envoy/config/core/v3/base.proto";
6
+ import "envoy/config/core/v3/http_uri.proto";
7
+
8
+ import "udpa/annotations/status.proto";
9
+ import "validate/validate.proto";
10
+
11
+ option java_package = "io.envoyproxy.envoy.config.core.v3";
12
+ option java_outer_classname = "HttpServiceProto";
13
+ option java_multiple_files = true;
14
+ option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3";
15
+ option (udpa.annotations.file_status).package_version_status = ACTIVE;
16
+
17
+ // [#protodoc-title: HTTP services]
18
+
19
+ // HTTP service configuration.
20
+ message HttpService {
21
+ // The service's HTTP URI. For example:
22
+ //
23
+ // .. code-block:: yaml
24
+ //
25
+ // http_uri:
26
+ // uri: https://www.myserviceapi.com/v1/data
27
+ // cluster: www.myserviceapi.com|443
28
+ //
29
+ HttpUri http_uri = 1;
30
+
31
+ // Specifies a list of HTTP headers that should be added to each request
32
+ // handled by this virtual host.
33
+ repeated HeaderValueOption request_headers_to_add = 2
34
+ [(validate.rules).repeated = {max_items: 1000}];
35
+ }
@@ -0,0 +1,58 @@
1
+ syntax = "proto3";
2
+
3
+ package envoy.config.core.v3;
4
+
5
+ import "google/protobuf/duration.proto";
6
+
7
+ import "udpa/annotations/status.proto";
8
+ import "udpa/annotations/versioning.proto";
9
+ import "validate/validate.proto";
10
+
11
+ option java_package = "io.envoyproxy.envoy.config.core.v3";
12
+ option java_outer_classname = "HttpUriProto";
13
+ option java_multiple_files = true;
14
+ option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3";
15
+ option (udpa.annotations.file_status).package_version_status = ACTIVE;
16
+
17
+ // [#protodoc-title: HTTP service URI ]
18
+
19
+ // Envoy external URI descriptor
20
+ message HttpUri {
21
+ option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HttpUri";
22
+
23
+ // The HTTP server URI. It should be a full FQDN with protocol, host and path.
24
+ //
25
+ // Example:
26
+ //
27
+ // .. code-block:: yaml
28
+ //
29
+ // uri: https://www.googleapis.com/oauth2/v1/certs
30
+ //
31
+ string uri = 1 [(validate.rules).string = {min_len: 1}];
32
+
33
+ // Specify how ``uri`` is to be fetched. Today, this requires an explicit
34
+ // cluster, but in the future we may support dynamic cluster creation or
35
+ // inline DNS resolution. See `issue
36
+ // <https://github.com/envoyproxy/envoy/issues/1606>`_.
37
+ oneof http_upstream_type {
38
+ option (validate.required) = true;
39
+
40
+ // A cluster is created in the Envoy "cluster_manager" config
41
+ // section. This field specifies the cluster name.
42
+ //
43
+ // Example:
44
+ //
45
+ // .. code-block:: yaml
46
+ //
47
+ // cluster: jwks_cluster
48
+ //
49
+ string cluster = 2 [(validate.rules).string = {min_len: 1}];
50
+ }
51
+
52
+ // Sets the maximum duration in milliseconds that a response can take to arrive upon request.
53
+ google.protobuf.Duration timeout = 3 [(validate.rules).duration = {
54
+ required: true
55
+ lt {seconds: 4294967296}
56
+ gte {}
57
+ }];
58
+ }