slackhq / nebula

A scalable overlay networking tool with a focus on performance, simplicity and security
MIT License
14.01k stars 939 forks source link

Feature Request: `nebula-service -test -config` should warn about unknown keys and stuff in config yaml #1143

Open johnmaguire opened 1 month ago

johnmaguire commented 1 month ago

Discussed in https://github.com/slackhq/nebula/discussions/1142

Originally posted by **fooryo** May 9, 2024 Idea came from a typo on a yml file. My yaml was like: ``` lighthose: [...] hosts: - stuff in here ``` but `nebula-service -test -config host.yml` just told me: `WARN[0000] No lighthouse.hosts configured, this host will only be able to initiate tunnels with static_host_map entries` I know that the message is self explanatory but could be and idea that it reports also something like `there is no lighthose on nebula config yaml schema` or `lighthose key is not an expected key`? A json/yaml schema could also help with the fact that a lighthouse config should not have any lighthouse.hosts in the yaml ( I didnt research why tho ) and helps with a manual writing of such config files. Thanks