linkerd2/cni-plugin
Matei David 35cecb50e1
Add static and dynamic port overrides for CNI ebpf (#9841)
When CNI plugins run in ebpf mode, they may rewrite the packet
destination when doing socket-level load balancing (i.e in the
`connect()` call). In these cases, skipping `443` on the outbound side
for control plane components becomes redundant; the packet is re-written
to target the actual Kubernetes API Server backend (which typically
listens on port `6443`, but may be overridden when the cluster is
created).

This change adds port `6443` to the list of skipped ports for control
plane components. On the linkerd-cni plugin side, the ports are
non-configurable. Whenever a pod with the control plane component label
is handled by the plugin, we look-up the `kubernetes` service in the
default namespace and append the port values (of both ClusterIP and
backend) to the list.

On the initContainer side, we make this value configurable in Helm and
provide a sensible default (`443,6443`). Users may override this value
if the ports do not correspond to what they have in their cluster. In
the CLI, if no override is given, we look-up the service in the same way
that we do for linkerd-cni; if failures are encountered we fallback to
the default list of ports from the values file.

Closes #9817

Signed-off-by: Matei David <matei@buoyant.io>
2022-11-30 09:45:25 +00:00
..
deployment Remove old .conf file from CNI directory when we convert .conf file to .conflist (#9555) 2022-10-06 15:06:23 -05:00
test Replace usage of io/ioutil package (#9613) 2022-10-13 12:10:58 -05:00
Dockerfile Update Go to 1.18 (#9019) 2022-07-27 16:10:39 -07:00
main.go Add static and dynamic port overrides for CNI ebpf (#9841) 2022-11-30 09:45:25 +00:00