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

Add support for any config options #375

Merged
merged 1 commit into from
Oct 24, 2016
Merged

Conversation

degemer
Copy link
Member

@degemer degemer commented Oct 20, 2016

It is annoying to have to wait for a new cookbook release when an agent
is released with a new config option.
This commit aims to fix it by allowing any config options to be added.

Fix #336

@degemer degemer added this to the 2.7.0 milestone Oct 20, 2016
@degemer degemer force-pushed the quentin/support-any-config-key branch 2 times, most recently from ed56583 to cec18ac Compare October 20, 2016 22:33
Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had one "important" comment, everything else looks 👌

@@ -221,6 +221,11 @@
# extra_packages to install
default['datadog']['extra_packages'] = {}

# extra config options
# If an agent is released with a new config option which is not yet supported by this cookbook
# you can use this attribute to set it. Will be ignored if falsy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should ignore the value only if it's nil. We have agent configuration options that are true by default so setting them to false is meaningful. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also, if you agree, a test on that would be perfect :) )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I didn't think of false, only of '', which is useless since ini requires key: value.

@@ -221,6 +221,11 @@
# extra_packages to install
default['datadog']['extra_packages'] = {}

# extra config options
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could you put this right under default['datadog']['histogram_percentiles'] in this file, so that it's visually regrouped with the other agent config attribute defaults?

@degemer degemer force-pushed the quentin/support-any-config-key branch from cec18ac to 42c058f Compare October 21, 2016 15:18
It is annoying to have to wait for a new cookbook release when an agent
is released with a new config option.
This commit aims to fix it by allowing any config options to be added.
@degemer degemer force-pushed the quentin/support-any-config-key branch from 42c058f to f712ee6 Compare October 21, 2016 18:50
@degemer
Copy link
Member Author

degemer commented Oct 21, 2016

Updated @olivielpeau, ready for round 2!

Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌
🙇

@degemer degemer merged commit 32bef19 into master Oct 24, 2016
@degemer degemer deleted the quentin/support-any-config-key branch October 24, 2016 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow custom configuration in datadog.conf
2 participants