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 'site' option support #464
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good. Could you please add spec tests for the default + overriden cases?
I will add some tests |
just a note: in |
|
78eac75
to
dec93c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken we need to address the empty dd_url
issue on older agent6 installs.
@@ -623,6 +634,7 @@ | |||
$_agent_config = { | |||
'api_key' => $api_key, | |||
'dd_url' => $dd_url, | |||
'site' => $datadog_site, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the current manifest by default will yield a valid configuration for older A6 agents, unfortunately we need to support them: the problem we have here is that if this puppet manifest is used to install an older Agent6 (pre-site
option) say 6.2.x
it will yield a configuration with an empty dd_url
and site
set. It causes no harm to have site
set, but the empty dd_url
would be a no-no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike A5, A6 has a default value for dd_url
: https://github.com/DataDog/datadog-agent/blob/60fc833599c5015c15c741649840dc6bda930275/pkg/config/config.go#L75. That's why a left this parameter empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested, with an empty dd_url
, agent 6.2.0 still reports to app.datadoghq.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is accurate. Older agents DID specify a default for dd_url
, apparently an empty string will not override this default vcalue. This was changed with the introduction of site
, but this already accounts for that. 👍
73a5cdb
to
14b2523
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Thank you! 🙇
* Add 'site' option support * Move default site to params * Ensure dd_url is empty by default for agent 6 * Add spec test for new site option
No description provided.