linkerd2/controller
Eliza Weisman 56681015ae
Fix Destination returning no endpoints for single unnamed container port (#1420)
Fixes #1405.

According to the Kubernetes Endpoints API documentation, the `name`
field in the `EndpointPort` response object is "Optional if only one
port is defined". (see
https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#endpointport-v1-core)
However, when the Destination service an endpoints response for a
service with a named target port, it expects the ports in the endpoints
response to have the same name as the target port in the service. 

When a user creates a `NodePort` service with an unnamed port that
targets a named container port, this behaviour results in Linkerd
failing to route to that service by hostname. Without Linkerd injected,
the hostname is still reachable. 

This branch fixes this issue by changing the `endpointsToAddresses`
function in `endpoints_watcher.go` to handle the case when an endpoints
response contains only a single unnamed port.

I've manually verified that this fixes the issue described in #1405.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-08-08 13:01:53 -07:00
..
api Update prometheus to only scrape proxies in the same mesh (#1402) 2018-08-06 12:05:55 -07:00
ca Update prometheus to only scrape proxies in the same mesh (#1402) 2018-08-06 12:05:55 -07:00
cmd Send glog logs to stderr by default (#1367) 2018-07-25 12:59:24 -07:00
destination Fix Destination returning no endpoints for single unnamed container port (#1420) 2018-08-08 13:01:53 -07:00
gen Rename CLI from conduit to linkerd (#1312) 2018-07-12 17:14:07 -07:00
k8s Update prometheus labels to match k8s resource names (#1355) 2018-07-23 15:45:05 -07:00
script/destination-client add H2 protocol to destination addrs if managed by linkerd (#1380) 2018-08-03 10:14:30 -07:00
tap Update prometheus labels to match k8s resource names (#1355) 2018-07-23 15:45:05 -07:00
Dockerfile Use stable version for linkerd2-proxy-api dep (#1400) 2018-08-03 11:59:42 -07:00