linkerd2/controller/proxy-injector
Matei David 38c6d11832
Change injector overriding logic to be more generic (#12405)
The proxy-injector package has a `ResourceConfig` type that is
responsible for parsing resources, applying overrides, and serialising a
series of configuration values to a Kubernetes patch. The functionality
is very concrete in its assumption; it always relies on a pod spec and
it mutates inner state when deciding on which overrides to apply.

This is not a flexible way to handle injection and configuration
overriding for other types of resources. We change this by turning
methods previously defined on `ResourceConfig` into free-standing
functions. These functions can be applied for any type of resources in
order to compute a set of configuration values based on annotation
overrides. Through the change, the functions can be used to compute
static configuration for non-Pod types or can be used in tests.


Signed-off-by: Matei David <matei@buoyant.io>
2024-04-10 15:51:58 +01:00
..
fake Upgrade to proxy-init:v2.3.0 and linkerd-cni:1.4.0 (#12361) 2024-04-02 11:38:53 -05:00
metrics.go Enable gocritic linting (#7906) 2022-02-17 22:45:25 +00:00
webhook.go Change injector overriding logic to be more generic (#12405) 2024-04-10 15:51:58 +01:00
webhook_test.go Change injector overriding logic to be more generic (#12405) 2024-04-10 15:51:58 +01:00