-
Notifications
You must be signed in to change notification settings - Fork 104
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 global environment variable config #1406
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.
This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling, dependencies
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1406 +/- ##
==========================================
+ Coverage 47.40% 47.63% +0.22%
==========================================
Files 223 224 +1
Lines 19244 19522 +278
==========================================
+ Hits 9123 9299 +176
- Misses 9635 9723 +88
- Partials 486 500 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Left some comments, looks good overall, a few things to tweak
@@ -137,6 +137,14 @@ func applyGlobalSettings(logger logr.Logger, manager feature.PodTemplateManagers | |||
} | |||
} | |||
|
|||
// Env is a list of custom global variables that are set across all agents. | |||
if config.Env != nil { | |||
logger.V(1).Info(fmt.Sprintf("Adding custom environment variable %s", config.Env)) |
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.
Let's discuss with the team offline if we add this log in the end or not
* add global environment variable * add tests for global env * update comments * update formatting, logging, config docs * update CRD * remove global env log statement
What does this PR do?
Added configuration for global environment variables; environment variables defined in global.env of the Datadog Agent CRD will be set across all agents in Operator.
Motivation
issue 961
Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label