From 4a5e7c589a6933c6207dff94bc71513e115e0736 Mon Sep 17 00:00:00 2001 From: "Drew S. Ortega" Date: Fri, 17 Jul 2020 00:43:35 +0000 Subject: [PATCH 1/5] add backwards-compatible hds protos to better group endpoint health info Signed-off-by: Drew S. Ortega --- api/envoy/service/health/v3/hds.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/api/envoy/service/health/v3/hds.proto b/api/envoy/service/health/v3/hds.proto index 0b09134709c8..d7395149e430 100644 --- a/api/envoy/service/health/v3/hds.proto +++ b/api/envoy/service/health/v3/hds.proto @@ -108,11 +108,30 @@ message EndpointHealth { config.core.v3.HealthStatus health_status = 2; } +// Group endpoint health by locality under each cluster. +message LocalityEndpointsHealth { + api.v3.core.Locality locality = 1; + + repeated EndpointHealth endpoints_health = 2; +} + +// The health status of endpoints in a cluster. The cluster name and locality +// should match the corresponding fields in ClusterHealthCheck message. +message ClusterEndpointsHealth { + string cluster_name = 1; + + repeated LocalityEndpointsHealth locality_endpoints_health = 2; +} + message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.discovery.v2.EndpointHealthResponse"; + // Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + + // Organize Endpoint health information by cluster. + repeated ClusterEndpointsHealth cluster_endpoints_health = 2; } message HealthCheckRequestOrEndpointHealthResponse { From 39ffd06cbaec3625e1ebe76b05df6f0059f344fc Mon Sep 17 00:00:00 2001 From: "Drew S. Ortega" Date: Fri, 17 Jul 2020 00:46:13 +0000 Subject: [PATCH 2/5] formatting fixes for hds protos Signed-off-by: Drew S. Ortega --- api/envoy/service/health/v3/hds.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/envoy/service/health/v3/hds.proto b/api/envoy/service/health/v3/hds.proto index d7395149e430..9b66fd1d56b8 100644 --- a/api/envoy/service/health/v3/hds.proto +++ b/api/envoy/service/health/v3/hds.proto @@ -115,7 +115,7 @@ message LocalityEndpointsHealth { repeated EndpointHealth endpoints_health = 2; } -// The health status of endpoints in a cluster. The cluster name and locality +// The health status of endpoints in a cluster. The cluster name and locality // should match the corresponding fields in ClusterHealthCheck message. message ClusterEndpointsHealth { string cluster_name = 1; From 0275293e9cdd8f7a998d976a138265e29aa482bf Mon Sep 17 00:00:00 2001 From: "Drew S. Ortega" Date: Sat, 18 Jul 2020 03:25:15 +0000 Subject: [PATCH 3/5] get correct Locality field location Signed-off-by: Drew S. Ortega --- api/envoy/service/health/v3/hds.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/envoy/service/health/v3/hds.proto b/api/envoy/service/health/v3/hds.proto index 9b66fd1d56b8..8efdd7652e83 100644 --- a/api/envoy/service/health/v3/hds.proto +++ b/api/envoy/service/health/v3/hds.proto @@ -110,7 +110,7 @@ message EndpointHealth { // Group endpoint health by locality under each cluster. message LocalityEndpointsHealth { - api.v3.core.Locality locality = 1; + config.core.v3.Locality locality = 1; repeated EndpointHealth endpoints_health = 2; } From 980a8e5ad2780e30d4ce054d81cbe1c249c47db7 Mon Sep 17 00:00:00 2001 From: "Drew S. Ortega" Date: Sat, 18 Jul 2020 23:53:02 +0000 Subject: [PATCH 4/5] regenerate api shadow and v4alpha protos Signed-off-by: Drew S. Ortega --- api/envoy/service/health/v4alpha/hds.proto | 25 +++++++++++++++++++ .../envoy/service/health/v3/hds.proto | 19 ++++++++++++++ .../envoy/service/health/v4alpha/hds.proto | 25 +++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/api/envoy/service/health/v4alpha/hds.proto b/api/envoy/service/health/v4alpha/hds.proto index 826d5eeb0301..bb9687257d5c 100644 --- a/api/envoy/service/health/v4alpha/hds.proto +++ b/api/envoy/service/health/v4alpha/hds.proto @@ -107,11 +107,36 @@ message EndpointHealth { config.core.v4alpha.HealthStatus health_status = 2; } +// Group endpoint health by locality under each cluster. +message LocalityEndpointsHealth { + option (udpa.annotations.versioning).previous_message_type = + "envoy.service.health.v3.LocalityEndpointsHealth"; + + config.core.v4alpha.Locality locality = 1; + + repeated EndpointHealth endpoints_health = 2; +} + +// The health status of endpoints in a cluster. The cluster name and locality +// should match the corresponding fields in ClusterHealthCheck message. +message ClusterEndpointsHealth { + option (udpa.annotations.versioning).previous_message_type = + "envoy.service.health.v3.ClusterEndpointsHealth"; + + string cluster_name = 1; + + repeated LocalityEndpointsHealth locality_endpoints_health = 2; +} + message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealthResponse"; + // Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + + // Organize Endpoint health information by cluster. + repeated ClusterEndpointsHealth cluster_endpoints_health = 2; } message HealthCheckRequestOrEndpointHealthResponse { diff --git a/generated_api_shadow/envoy/service/health/v3/hds.proto b/generated_api_shadow/envoy/service/health/v3/hds.proto index 0b09134709c8..8efdd7652e83 100644 --- a/generated_api_shadow/envoy/service/health/v3/hds.proto +++ b/generated_api_shadow/envoy/service/health/v3/hds.proto @@ -108,11 +108,30 @@ message EndpointHealth { config.core.v3.HealthStatus health_status = 2; } +// Group endpoint health by locality under each cluster. +message LocalityEndpointsHealth { + config.core.v3.Locality locality = 1; + + repeated EndpointHealth endpoints_health = 2; +} + +// The health status of endpoints in a cluster. The cluster name and locality +// should match the corresponding fields in ClusterHealthCheck message. +message ClusterEndpointsHealth { + string cluster_name = 1; + + repeated LocalityEndpointsHealth locality_endpoints_health = 2; +} + message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.discovery.v2.EndpointHealthResponse"; + // Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + + // Organize Endpoint health information by cluster. + repeated ClusterEndpointsHealth cluster_endpoints_health = 2; } message HealthCheckRequestOrEndpointHealthResponse { diff --git a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto index 826d5eeb0301..bb9687257d5c 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto +++ b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto @@ -107,11 +107,36 @@ message EndpointHealth { config.core.v4alpha.HealthStatus health_status = 2; } +// Group endpoint health by locality under each cluster. +message LocalityEndpointsHealth { + option (udpa.annotations.versioning).previous_message_type = + "envoy.service.health.v3.LocalityEndpointsHealth"; + + config.core.v4alpha.Locality locality = 1; + + repeated EndpointHealth endpoints_health = 2; +} + +// The health status of endpoints in a cluster. The cluster name and locality +// should match the corresponding fields in ClusterHealthCheck message. +message ClusterEndpointsHealth { + option (udpa.annotations.versioning).previous_message_type = + "envoy.service.health.v3.ClusterEndpointsHealth"; + + string cluster_name = 1; + + repeated LocalityEndpointsHealth locality_endpoints_health = 2; +} + message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealthResponse"; + // Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + + // Organize Endpoint health information by cluster. + repeated ClusterEndpointsHealth cluster_endpoints_health = 2; } message HealthCheckRequestOrEndpointHealthResponse { From 834f84b020ef99a36085f6667fb918707119ad81 Mon Sep 17 00:00:00 2001 From: "Drew S. Ortega" Date: Tue, 21 Jul 2020 20:56:38 +0000 Subject: [PATCH 5/5] update comments to hide unimplemented, mark future deprecation Signed-off-by: Drew S. Ortega --- api/envoy/service/health/v3/hds.proto | 5 ++++- api/envoy/service/health/v4alpha/hds.proto | 4 +++- generated_api_shadow/envoy/service/health/v3/hds.proto | 5 ++++- generated_api_shadow/envoy/service/health/v4alpha/hds.proto | 4 +++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/api/envoy/service/health/v3/hds.proto b/api/envoy/service/health/v3/hds.proto index 8efdd7652e83..484c0477ae46 100644 --- a/api/envoy/service/health/v3/hds.proto +++ b/api/envoy/service/health/v3/hds.proto @@ -9,6 +9,7 @@ import "envoy/config/endpoint/v3/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -127,9 +128,11 @@ message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.discovery.v2.EndpointHealthResponse"; - // Flat list of endpoint health information. + // [#comment:TODO(drewsortega): add deprecate annotation once cluster_endpoints_health is implemented] + // Deprecated - Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + // [#not-implemented-hide:] // Organize Endpoint health information by cluster. repeated ClusterEndpointsHealth cluster_endpoints_health = 2; } diff --git a/api/envoy/service/health/v4alpha/hds.proto b/api/envoy/service/health/v4alpha/hds.proto index bb9687257d5c..957f058b9c57 100644 --- a/api/envoy/service/health/v4alpha/hds.proto +++ b/api/envoy/service/health/v4alpha/hds.proto @@ -132,9 +132,11 @@ message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealthResponse"; - // Flat list of endpoint health information. + // [#comment:TODO(drewsortega): add deprecate annotation once cluster_endpoints_health is implemented] + // Deprecated - Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + // [#not-implemented-hide:] // Organize Endpoint health information by cluster. repeated ClusterEndpointsHealth cluster_endpoints_health = 2; } diff --git a/generated_api_shadow/envoy/service/health/v3/hds.proto b/generated_api_shadow/envoy/service/health/v3/hds.proto index 8efdd7652e83..484c0477ae46 100644 --- a/generated_api_shadow/envoy/service/health/v3/hds.proto +++ b/generated_api_shadow/envoy/service/health/v3/hds.proto @@ -9,6 +9,7 @@ import "envoy/config/endpoint/v3/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; +import "udpa/annotations/migrate.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -127,9 +128,11 @@ message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.discovery.v2.EndpointHealthResponse"; - // Flat list of endpoint health information. + // [#comment:TODO(drewsortega): add deprecate annotation once cluster_endpoints_health is implemented] + // Deprecated - Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + // [#not-implemented-hide:] // Organize Endpoint health information by cluster. repeated ClusterEndpointsHealth cluster_endpoints_health = 2; } diff --git a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto index bb9687257d5c..957f058b9c57 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto +++ b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto @@ -132,9 +132,11 @@ message EndpointHealthResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealthResponse"; - // Flat list of endpoint health information. + // [#comment:TODO(drewsortega): add deprecate annotation once cluster_endpoints_health is implemented] + // Deprecated - Flat list of endpoint health information. repeated EndpointHealth endpoints_health = 1; + // [#not-implemented-hide:] // Organize Endpoint health information by cluster. repeated ClusterEndpointsHealth cluster_endpoints_health = 2; }