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

feat: Add the ability to overlay configuration #698

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Commits on Sep 5, 2024

  1. Rename testwith -> testdata

    "testdata" is the well-known directory name for files and fixtures
    related to a package's test. The toolchain recognizes specifically this
    name and ignores it, so it is the proper one to use.
    timraymond committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    930094e View commit details
    Browse the repository at this point in the history
  2. Add the ability to overlay configuration

    In order to support multiple configuration sources (some managed, some
    unmanaged), Retina needs to be able to consider N configuration files
    and apply them in an ordered fashion. This makes the GetConfig function
    variadic, and uses Viper's MergeInConfig functionality to overlay the
    configuration from each subsequent file from the first one.
    timraymond committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    594d81a View commit details
    Browse the repository at this point in the history
  3. Slight refactor to handle 0 files

    Trying to figure out a better way to structure this, but since this is a
    variadic list, there is now a possibility for zero files (which would be
    equivalent to the previous behavior of "" for the file name).
    timraymond committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    45c057b View commit details
    Browse the repository at this point in the history
  4. Add a FilteredYAML type to restrict YAML fields

    We need to restrict the overlay configuration to a subset of fields, so
    that certain configuration may only configure certain fields. This
    introduces a FilteredYAML that removes any other fields that it finds so
    that *only* those fields that should be allowed to be modified will be.
    timraymond committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    be7b718 View commit details
    Browse the repository at this point in the history
  5. Add ability to overlay config to GetConfig

    In order to make it possible for specific fields to be overridden by
    user-controllable config files, the GetConfig function must be modified
    to support an additional configuration file that can be filtered to
    specific fields. This modifies GetConfig in a backwards-compatible way
    to support a FilteredConfig type, specifiying additional overlays with
    allowable fields from those config overlays.
    timraymond committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    1ee3368 View commit details
    Browse the repository at this point in the history
  6. Move FilteredYAML type out of internal

    It turns out that this type is useful outside of this package, which
    makes it a good candidate for graduating out of `internal`.
    timraymond committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    fcd8bdf View commit details
    Browse the repository at this point in the history
  7. Silence spurious lints

    Both of these lints aren't particularly useful, so this just silences
    both of them.
    timraymond committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    a1f7f43 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Add the ability to write config as YAML

    In order to merge configurations, we need to be able to write out the
    resultant configuration as YAML.
    timraymond committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    35c9c0d View commit details
    Browse the repository at this point in the history
  2. Add a TLSManagement config option

    This can be used by variant implementations to decide whether or not TLS
    management will be handled by retina or not.
    timraymond committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    ef6cffe View commit details
    Browse the repository at this point in the history