Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change injector overriding logic to be more generic #12405

Merged
merged 2 commits into from
Apr 10, 2024

Commits on Apr 5, 2024

  1. Change injector overriding logic to be more generic

    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.
    
    Some of the functionality relies on concrete types, e.g. ContainerPorts.
    To allow the free-standing functions to be generic, we introduce an
    interface to abstract away the details of how the configuration value is
    produced.
    
    Signed-off-by: Matei David <matei@buoyant.io>
    mateiidavid committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    6312651 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. @adleong's feedback

    Signed-off-by: Matei David <matei@buoyant.io>
    mateiidavid committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    7a82a79 View commit details
    Browse the repository at this point in the history