mirror of https://github.com/linkerd/linkerd2.git
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> |
||
---|---|---|
.. | ||
fake | ||
metrics.go | ||
webhook.go | ||
webhook_test.go |