mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
3bf93d9796
Following #8891, which moved top-level config validation to an embedded Rego policy, this migrates the `server/metrics` and `metrics_export` configs onto Rego as well. Plugins register their recognized options via `config.RegisterConfigSpec` (derived from their struct fields) so unknown-option warnings live with each struct that brings the config. The goal is migrate more `validateAndInjectDefaults` in follow up PRs, this setups the foundation for other migrations to follow. --------- Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>