envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.79k stars 4.76k forks source link

Add an `envoyconf` linting/validation tool #13233

Open phlax opened 4 years ago

phlax commented 4 years ago

description

If we create jsonschema for validating envoy yaml/json config files (see #13078) we can potentially re-use the schema for a cli linter (and/or libs for python/js etc).

This could eg be used to:

refs

mattklein123 commented 4 years ago

@phlax see prior art here in our various config tooling: https://github.com/envoyproxy/envoy/tree/master/test/tools and https://www.envoyproxy.io/docs/envoy/latest/install/tools/tools. See also related tickets here: https://github.com/envoyproxy/envoy/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Froute_check_tool.

It would be great to unify all of these efforts where possible.

phlax commented 4 years ago

It would be great to unify all of these efforts where possible.

yep, thanks for refs

the config load tool does a bit more than static analysis so i think we would want to at least retain that functionality (edit: ...in terms of config linting. Ill try and spend some time to see what other tooling is there)

phlax commented 4 years ago

after a little more dev/research on this im wondering whether its possible/better to do this directly from protobuf - ie without the jsonschema step.

either way it would be good to publish the jsonschema to https://www.schemastore.org/json/ so existing jsonschema tooling beyond vscode can make use of it (touch #13254 #13078)

phlax commented 3 years ago

see https://envoylint.com/ and https://github.com/ysawa0/envoylint

ysawa0 commented 3 years ago

Hey @phlax, didn't realize you posted it here. I updated the site to now run against Envoy binaries with three different versions supported (1.16, 1.14, 1.12).

phlax commented 3 years ago

Hey @phlax, didn't realize you posted it here.

yep, i still think a static analysis tool could be useful, and was collating related info here

I updated the site to now run against Envoy binaries with three different versions supported (1.16, 1.14, 1.12).

cool, ive pointed a couple people towards it already