From 4d46994ca2336e91b98aa9d3cf14161462e6fb81 Mon Sep 17 00:00:00 2001 From: Dhi Aurrahman Date: Mon, 2 Apr 2018 05:25:16 +0700 Subject: [PATCH 1/7] Add optional alternative health check port This provides an alternative health check port, if set it allows an upstream host to have different health check address port. Signed-off-by: Dhi Aurrahman --- envoy/api/v2/endpoint/endpoint.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/envoy/api/v2/endpoint/endpoint.proto b/envoy/api/v2/endpoint/endpoint.proto index e5ca1bba0..025f521b4 100644 --- a/envoy/api/v2/endpoint/endpoint.proto +++ b/envoy/api/v2/endpoint/endpoint.proto @@ -18,7 +18,15 @@ option (gogoproto.equal_all) = true; // Upstream host identifier. message Endpoint { + // The upstream host address. core.Address address = 1; + + // [#not-implemented-hide:] Optional alternative health check port. + // + // By default the health check address port of an upstream host is the same as the host's serving + // address port. This provides an alternative health check port. If set it allows an upstream host + // to have different health check address port. The health checker should honor this. + uint32 health_check_port = 2; } // An Endpoint that Envoy can route traffic to. From 6023047a644eff0f1d50f3c49a2066ca735928da Mon Sep 17 00:00:00 2001 From: Dhi Aurrahman Date: Mon, 2 Apr 2018 23:54:56 +0700 Subject: [PATCH 2/7] Review comment https://github.com/envoyproxy/data-plane-api/pull/597/files#r178582159 Signed-off-by: Dhi Aurrahman --- envoy/api/v2/endpoint/endpoint.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envoy/api/v2/endpoint/endpoint.proto b/envoy/api/v2/endpoint/endpoint.proto index 025f521b4..a52c5c8df 100644 --- a/envoy/api/v2/endpoint/endpoint.proto +++ b/envoy/api/v2/endpoint/endpoint.proto @@ -25,7 +25,7 @@ message Endpoint { // // By default the health check address port of an upstream host is the same as the host's serving // address port. This provides an alternative health check port. If set it allows an upstream host - // to have different health check address port. The health checker should honor this. + // to have different health check address port. uint32 health_check_port = 2; } From 88c37cd452a46f238a983b7c6cef979a2aee43da Mon Sep 17 00:00:00 2001 From: Dhi Aurrahman Date: Tue, 3 Apr 2018 10:30:07 +0700 Subject: [PATCH 3/7] Add health check config Signed-off-by: Dhi Aurrahman --- envoy/api/v2/endpoint/endpoint.proto | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/envoy/api/v2/endpoint/endpoint.proto b/envoy/api/v2/endpoint/endpoint.proto index a52c5c8df..bf77afe2c 100644 --- a/envoy/api/v2/endpoint/endpoint.proto +++ b/envoy/api/v2/endpoint/endpoint.proto @@ -21,12 +21,22 @@ message Endpoint { // The upstream host address. core.Address address = 1; - // [#not-implemented-hide:] Optional alternative health check port. + // [#not-implemented-hide:] The optional health check configuration is used as + // configuration for the health checker to contact the health checked host. // - // By default the health check address port of an upstream host is the same as the host's serving - // address port. This provides an alternative health check port. If set it allows an upstream host - // to have different health check address port. - uint32 health_check_port = 2; + // .. attention:: + // + // This takes into effect only for upstream clusters with + // :ref:`active health checking ` enabled. + message HealthCheckConfig { + // Optional alternative health check port. + // + // By default the health check address port of an upstream host is the same + // as the host's serving address port. This provides an alternative health + // check port. If set it allows an upstream host to have different + // health check address port. + uint32 health_check_port = 2; + } } // An Endpoint that Envoy can route traffic to. From b64c384172d814abdd800f033e008d01142bd6c6 Mon Sep 17 00:00:00 2001 From: Dhi Aurrahman Date: Tue, 3 Apr 2018 10:31:29 +0700 Subject: [PATCH 4/7] Re-index Signed-off-by: Dhi Aurrahman --- envoy/api/v2/endpoint/endpoint.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envoy/api/v2/endpoint/endpoint.proto b/envoy/api/v2/endpoint/endpoint.proto index bf77afe2c..5fb5b9ef6 100644 --- a/envoy/api/v2/endpoint/endpoint.proto +++ b/envoy/api/v2/endpoint/endpoint.proto @@ -35,7 +35,7 @@ message Endpoint { // as the host's serving address port. This provides an alternative health // check port. If set it allows an upstream host to have different // health check address port. - uint32 health_check_port = 2; + uint32 health_check_port = 1; } } From 71c5ac5795b6bfbd8756e99e5728e64113677177 Mon Sep 17 00:00:00 2001 From: Dhi Aurrahman Date: Tue, 3 Apr 2018 10:38:42 +0700 Subject: [PATCH 5/7] Re-index Signed-off-by: Dhi Aurrahman --- envoy/api/v2/endpoint/endpoint.proto | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/envoy/api/v2/endpoint/endpoint.proto b/envoy/api/v2/endpoint/endpoint.proto index 5fb5b9ef6..e1b5b3a76 100644 --- a/envoy/api/v2/endpoint/endpoint.proto +++ b/envoy/api/v2/endpoint/endpoint.proto @@ -21,13 +21,7 @@ message Endpoint { // The upstream host address. core.Address address = 1; - // [#not-implemented-hide:] The optional health check configuration is used as - // configuration for the health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. + // [#not-implemented-hide:] The optional health check configuration. message HealthCheckConfig { // Optional alternative health check port. // @@ -37,6 +31,15 @@ message Endpoint { // health check address port. uint32 health_check_port = 1; } + + // [#not-implemented-hide:] The optional health check configuration is used as + // configuration for the health checker to contact the health checked host. + // + // .. attention:: + // + // This takes into effect only for upstream clusters with + // :ref:`active health checking ` enabled. + HealthCheckConfig health_check_config = 2; } // An Endpoint that Envoy can route traffic to. From 0da736533f1f0b1c71fc965d56ed7d8e2e6b37b2 Mon Sep 17 00:00:00 2001 From: Dhi Aurrahman Date: Tue, 3 Apr 2018 12:28:26 +0700 Subject: [PATCH 6/7] Rename Signed-off-by: Dhi Aurrahman --- envoy/api/v2/endpoint/endpoint.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envoy/api/v2/endpoint/endpoint.proto b/envoy/api/v2/endpoint/endpoint.proto index e1b5b3a76..6ccdea309 100644 --- a/envoy/api/v2/endpoint/endpoint.proto +++ b/envoy/api/v2/endpoint/endpoint.proto @@ -23,13 +23,13 @@ message Endpoint { // [#not-implemented-hide:] The optional health check configuration. message HealthCheckConfig { - // Optional alternative health check port. + // Optional alternative health check port value. // // By default the health check address port of an upstream host is the same // as the host's serving address port. This provides an alternative health // check port. If set it allows an upstream host to have different // health check address port. - uint32 health_check_port = 1; + uint32 port_value = 1; } // [#not-implemented-hide:] The optional health check configuration is used as From 75662e317dc4eb68d6e695a6f19db4ffd960cb84 Mon Sep 17 00:00:00 2001 From: Dhi Aurrahman Date: Wed, 4 Apr 2018 05:13:50 +0700 Subject: [PATCH 7/7] Document non-zero Signed-off-by: Dhi Aurrahman --- envoy/api/v2/endpoint/endpoint.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envoy/api/v2/endpoint/endpoint.proto b/envoy/api/v2/endpoint/endpoint.proto index 6ccdea309..831453419 100644 --- a/envoy/api/v2/endpoint/endpoint.proto +++ b/envoy/api/v2/endpoint/endpoint.proto @@ -27,8 +27,8 @@ message Endpoint { // // By default the health check address port of an upstream host is the same // as the host's serving address port. This provides an alternative health - // check port. If set it allows an upstream host to have different - // health check address port. + // check port. Setting this with a non-zero value allows an upstream host + // to have different health check address port. uint32 port_value = 1; }