Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Switch k8s namers to watch individual endpoints, rather than all endpoints in namespace #1534

@klingerf

Description

@klingerf

Right now, the io.l5d.k8s and io.l5d.k8s.ns namers setup a watch on the List endpoints API, which streams update events for all of the endpoints in a given namespace. This can potentially lead to receiving a lot of events for endpoints that Linkerd is not trying to actually route to. It can also lead to a memory leak, in the case that Linkerd is watching a namespace with very frequent updates (e.g. kube-system / #1361).

As of PR #1527, we now have the ability to watch individual objects in the Kubernetes API. We should considering the Kubernetes namers to only watch the endpoint objects to which they're trying to route, instead of watching all endpoints in a particular namespace. This can also potentially clean up a bunch of the caching code that exists in EndpointsNamer. This change will need to be rigorously tested to make sure it doesn't introduce any regressions in the namer.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions