mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Merge pull request #13778 from smarterclayton/unready_endpoints
Auto commit by PR queue bot
This commit is contained in:
@@ -463,6 +463,16 @@ func convert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out
|
||||
} else {
|
||||
out.Addresses = nil
|
||||
}
|
||||
if in.NotReadyAddresses != nil {
|
||||
out.NotReadyAddresses = make([]EndpointAddress, len(in.NotReadyAddresses))
|
||||
for i := range in.NotReadyAddresses {
|
||||
if err := convert_api_EndpointAddress_To_v1_EndpointAddress(&in.NotReadyAddresses[i], &out.NotReadyAddresses[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.NotReadyAddresses = nil
|
||||
}
|
||||
if in.Ports != nil {
|
||||
out.Ports = make([]EndpointPort, len(in.Ports))
|
||||
for i := range in.Ports {
|
||||
@@ -2888,6 +2898,16 @@ func convert_v1_EndpointSubset_To_api_EndpointSubset(in *EndpointSubset, out *ap
|
||||
} else {
|
||||
out.Addresses = nil
|
||||
}
|
||||
if in.NotReadyAddresses != nil {
|
||||
out.NotReadyAddresses = make([]api.EndpointAddress, len(in.NotReadyAddresses))
|
||||
for i := range in.NotReadyAddresses {
|
||||
if err := convert_v1_EndpointAddress_To_api_EndpointAddress(&in.NotReadyAddresses[i], &out.NotReadyAddresses[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.NotReadyAddresses = nil
|
||||
}
|
||||
if in.Ports != nil {
|
||||
out.Ports = make([]api.EndpointPort, len(in.Ports))
|
||||
for i := range in.Ports {
|
||||
|
||||
@@ -413,6 +413,16 @@ func deepCopy_v1_EndpointSubset(in EndpointSubset, out *EndpointSubset, c *conve
|
||||
} else {
|
||||
out.Addresses = nil
|
||||
}
|
||||
if in.NotReadyAddresses != nil {
|
||||
out.NotReadyAddresses = make([]EndpointAddress, len(in.NotReadyAddresses))
|
||||
for i := range in.NotReadyAddresses {
|
||||
if err := deepCopy_v1_EndpointAddress(in.NotReadyAddresses[i], &out.NotReadyAddresses[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.NotReadyAddresses = nil
|
||||
}
|
||||
if in.Ports != nil {
|
||||
out.Ports = make([]EndpointPort, len(in.Ports))
|
||||
for i := range in.Ports {
|
||||
|
||||
@@ -1643,7 +1643,12 @@ type Endpoints struct {
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// The set of all endpoints is the union of all subsets.
|
||||
// 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.
|
||||
Subsets []EndpointSubset `json:"subsets"`
|
||||
}
|
||||
@@ -1659,8 +1664,13 @@ type Endpoints struct {
|
||||
// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
|
||||
// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
|
||||
type EndpointSubset struct {
|
||||
// IP addresses which offer the related ports.
|
||||
// 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.
|
||||
Addresses []EndpointAddress `json:"addresses,omitempty"`
|
||||
// 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.
|
||||
NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty"`
|
||||
// Port numbers available on the related IP addresses.
|
||||
Ports []EndpointPort `json:"ports,omitempty"`
|
||||
}
|
||||
|
||||
@@ -292,9 +292,10 @@ func (EndpointPort) SwaggerDoc() map[string]string {
|
||||
}
|
||||
|
||||
var map_EndpointSubset = map[string]string{
|
||||
"": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]",
|
||||
"addresses": "IP addresses which offer the related ports.",
|
||||
"ports": "Port numbers available on the related IP addresses.",
|
||||
"": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]",
|
||||
"addresses": "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": "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": "Port numbers available on the related IP addresses.",
|
||||
}
|
||||
|
||||
func (EndpointSubset) SwaggerDoc() map[string]string {
|
||||
@@ -304,7 +305,7 @@ func (EndpointSubset) SwaggerDoc() map[string]string {
|
||||
var map_Endpoints = map[string]string{
|
||||
"": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]",
|
||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||
"subsets": "The set of all endpoints is the union of all subsets. Sets of addresses and ports that comprise a service.",
|
||||
"subsets": "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.",
|
||||
}
|
||||
|
||||
func (Endpoints) SwaggerDoc() map[string]string {
|
||||
|
||||
Reference in New Issue
Block a user