linkerd2/controller/cmd
Kevin Leimkuhler 7c0843a823
Add opaque ports to destination service updates (#5294)
## Summary

This changes the destination service to start indicating whether a profile is an
opaque protocol or not.

Currently, profiles returned by the destination service are built by chaining
together updates coming from watching Profile and Traffic Split updates.

With this change, we now also watch updates to Opaque Port annotations on pods
and namespaces; if an update occurs this is now included in building a profile
update and is sent to the client.

## Details

Watching updates to Profiles and Traffic Splits is straightforward--we watch
those resources and if an update occurs on one associated to a service we care
about then the update is passed through.

For Opaque Ports this is a little different because it is an annotation on pods
or namespaces. To account for this, we watch the endpoints that we should care
about.

### When host is a Pod IP

When getting the profile for a Pod IP, we check for the opaque ports annotation
on the pod and the pod's namespace. If one is found, we'll indicate if the
profile is an opaque protocol if the requested port is in the annotation.

We do not subscribe for updates to this pod IP. The only update we really care
about is if the pod is deleted and this is already handled by the proxy.

### When host is a Service

When getting the profile for a Service, we subscribe for updates to the
endpoints of that service. For any ports set in the opaque ports annotation on
any of the pods, we check if the requested port is present.

Since the endpoints for a service can be added and removed, we do subscribe for
updates to the endpoints of the service.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2020-12-18 12:38:59 -05:00
..
destination Add opaque ports to destination service updates (#5294) 2020-12-18 12:38:59 -05:00
heartbeat Bump k8s client-go to v0.19.2 (#5002) 2020-09-28 12:45:18 -05:00
identity Have webhooks refresh their certs automatically (#5282) 2020-12-04 16:25:59 -05:00
proxy-injector Refactor webhook framework to allow webhooks define their flags (#5256) 2020-11-23 10:40:30 -05:00
public-api Remove dependency of linkerd-config for control plane components (#4915) 2020-10-06 22:19:18 +05:30
sp-validator Refactor webhook framework to allow webhooks define their flags (#5256) 2020-11-23 10:40:30 -05:00
tap Have the tap APIServer refresh its cert automatically (#5388) 2020-12-16 17:46:14 -05:00
main.go extension: Separate multicluster chart and binary (#5293) 2020-12-04 16:36:10 -08:00