Add NotReadyAddresses to Endpoints

In many cases clients may wish to view not ready addresses for endpoints
in order to do set membership prior to a pod being ready. For instance,
a pod that uses the service endpoints to connect to other pods under
the same service, but does not want to signal ready before it has
contacted at least a minimal number of other pods.

This is backwards compatible with old servers and clients. There is
an additional cost in size of endpoints before services ramp up, which
will add minor CPU and memory use for services that have a significant
number of pods which have not become ready.
This commit is contained in:
Clayton Coleman
2015-09-09 21:28:53 -04:00
parent 81d3bd9a36
commit bf2decce81
17 changed files with 445 additions and 98 deletions

View File

@@ -11213,7 +11213,7 @@
"items": {
"$ref": "v1.EndpointSubset"
},
"description": "The set of all endpoints is the union of all subsets. Sets of addresses and ports that comprise a service."
"description": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service."
}
}
},
@@ -11226,7 +11226,14 @@
"items": {
"$ref": "v1.EndpointAddress"
},
"description": "IP addresses which offer the related ports."
"description": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize."
},
"notReadyAddresses": {
"type": "array",
"items": {
"$ref": "v1.EndpointAddress"
},
"description": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check."
},
"ports": {
"type": "array",