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] commented config #633

Merged
merged 7 commits into from
Oct 16, 2015
Merged

[feat/cli] commented config #633

merged 7 commits into from
Oct 16, 2015

Conversation

thibaultcha
Copy link
Member

Reopening of #596.

This finally approaches parts of #92 (now #629): 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/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release) pr/wip A work in progress PR opened to receive feedback and removed pr/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release) labels Oct 15, 2015
@thibaultcha thibaultcha force-pushed the feat/commented-config branch 2 times, most recently from 4ce01f7 to 303e235 Compare October 16, 2015 19:48
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.
Possibility to configure the replication strategy used by the created
keyspace and its options.

Implements #543 and #350
DAO properties are no nested in `properties` property anymore.
@thibaultcha thibaultcha added pr/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release) and removed pr/wip A work in progress PR opened to receive feedback labels Oct 16, 2015
thibaultcha added a commit that referenced this pull request Oct 16, 2015
@thibaultcha thibaultcha merged commit 12d8171 into next Oct 16, 2015
@thibaultcha thibaultcha deleted the feat/commented-config branch October 16, 2015 19:51
@thibaultcha
Copy link
Member Author

@Mashape/kong make clean && make dev will be required here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant