-
Notifications
You must be signed in to change notification settings - Fork 211
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
Commits on Sep 5, 2024
-
"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.
Configuration menu - View commit details
-
Copy full SHA for 930094e - Browse repository at this point
Copy the full SHA 930094eView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 594d81a - Browse repository at this point
Copy the full SHA 594d81aView commit details -
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).
Configuration menu - View commit details
-
Copy full SHA for 45c057b - Browse repository at this point
Copy the full SHA 45c057bView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for be7b718 - Browse repository at this point
Copy the full SHA be7b718View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 1ee3368 - Browse repository at this point
Copy the full SHA 1ee3368View commit details -
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`.
Configuration menu - View commit details
-
Copy full SHA for fcd8bdf - Browse repository at this point
Copy the full SHA fcd8bdfView commit details -
Both of these lints aren't particularly useful, so this just silences both of them.
Configuration menu - View commit details
-
Copy full SHA for a1f7f43 - Browse repository at this point
Copy the full SHA a1f7f43View commit details
Commits on Sep 11, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for 35c9c0d - Browse repository at this point
Copy the full SHA 35c9c0dView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for ef6cffe - Browse repository at this point
Copy the full SHA ef6cffeView commit details