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/cli] Configuration validation and commented properties #596

Closed
wants to merge 16 commits into from

Conversation

thibaultcha
Copy link
Member

This finally approaches parts of #92 and #217: Configuration documentation, validation and proper defaults.

Commented config file

The configuration file is now fully commented out (preview). Each property is commented and can be uncommented and changed if the user does not want the default to apply. The configuration file is now closer to unix-like configuration files. Reviews of the comments (both content and layout) are much appreciated.

Enforced rules and defaults

Secondly, the configuration defaults and rules are now stored in a config_defaults.lua file, and Kong will stop the execution of a comment is the file contains invalid properties (wrong type, incorrect value, etc...)

This is what it looks like if a string is given in place of a port number for admin_api_port:

[INFO] Using configuration: kong_DEVELOPMENT.yml
[WARN] admin_api_port: must be a number
[ERR] Invalid properties in given configuration file

Again, reviews of both rules and defaults are much appreciated.

@thibaultcha thibaultcha added pr/wip A work in progress PR opened to receive feedback NEEDS REVIEW labels Oct 8, 2015
@thibaultcha thibaultcha removed the pr/wip A work in progress PR opened to receive feedback label Oct 13, 2015
subnetmarco and others added 9 commits October 14, 2015 16:28
Disabling access log for status endpoint
Customizable DNS resolver settings
If a request or response have multiple Content-Type headers, this make
sure the latest one is returned, so mimeType is guaranteed to be a
string, and not an array.

Fix for #584
[fix/alf_serializer] always ensure mimeType is a string
OAuth 2.0 tests to check for upstream headers
@thibaultcha
Copy link
Member Author

Note: to be closed re-opened again the next branch (See #622)

All options are now commented, and commented out, as the default value
now applies from the config_loader.

The unit test against the config file iw now obsolete.
@thibaultcha
Copy link
Member Author

Moved to #633 and correctly rebased on next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants