Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information