linkerd2/pkg/util
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
..
http.go Replace usage of io/ioutil package (#9613) 2022-10-13 12:10:58 -05:00
http_test.go Use go-test/deep for comparisons in tests (#8427) 2022-05-05 09:31:07 -07:00
parsing.go Change injector overriding logic to be more generic (#12405) 2024-04-10 15:51:58 +01:00
parsing_test.go Fix error for profile lookups on unmeshed pods with port in default opaque list (#11550) 2023-12-20 13:56:49 -08:00
portrange.go inject: don't expand opaque port ranges (#10827) 2023-04-27 11:27:40 -07:00
portrange_test.go go: Copy port range utilities from the proxy-init repo (#9143) 2022-08-12 10:34:02 -07:00