mirror of https://github.com/linkerd/linkerd2.git
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> |
||
---|---|---|
.. | ||
api | ||
ca | ||
cmd | ||
destination | ||
gen | ||
k8s | ||
script/destination-client | ||
tap | ||
Dockerfile |