Implement multi-port Endpoints
This is a part of multi-port services.
This commit is contained in:
@@ -750,9 +750,6 @@ type Endpoints struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Optional: The IP protocol for these endpoints. Supports "TCP" and
|
||||
// "UDP". Defaults to "TCP".
|
||||
Protocol Protocol `json:"protocol,omitempty"`
|
||||
Endpoints []Endpoint `json:"endpoints,omitempty"`
|
||||
}
|
||||
|
||||
@@ -762,8 +759,21 @@ type Endpoint struct {
|
||||
// TODO: This should allow hostname or IP, see #4447.
|
||||
IP string `json:"ip"`
|
||||
|
||||
// Required: The destination port to access.
|
||||
Port int `json:"port"`
|
||||
// The ports exposed on this IP.
|
||||
Ports []EndpointPort
|
||||
}
|
||||
|
||||
type EndpointPort struct {
|
||||
// Optional if only one port is defined in this Endpoint.
|
||||
// The name of this port within the larger service/endpoint structure.
|
||||
// This must be a DNS_LABEL.
|
||||
Name string
|
||||
|
||||
// The IP protocol for this port. Supports "TCP" and "UDP".
|
||||
Protocol Protocol
|
||||
|
||||
// The destination port to access.
|
||||
Port int
|
||||
}
|
||||
|
||||
// EndpointsList is a list of endpoints.
|
||||
|
Reference in New Issue
Block a user