-
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
Load environment variables in override with envFrom
#1429
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
override
with envFrom
override
with envFrom
envFrom
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1429 +/- ##
==========================================
- Coverage 48.95% 48.75% -0.20%
==========================================
Files 221 222 +1
Lines 19252 19342 +90
==========================================
+ Hits 9424 9431 +7
- Misses 9345 9425 +80
- Partials 483 486 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file 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.
🎉
* load variables in override w/ envFrom * fix broken reference to commonv1 * fix bug with mocking containers * add test cases for envfrom override * change assert to ElementsMatch * remove unused container objects * remove comment --------- Co-authored-by: Fanny Jiang <[email protected]>
What does this PR do?
Add ability for environment variables to be loaded in the override map of datadog-agent.yaml using
envFrom
.Example:
Motivation
#896
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
DD_CLUSTER_NAME: <not your cluster name>
datadog-agent.yaml
: spec.override.nodeAgent.EnvFrom, spec.override.clusterAgent.envFrom, and/or spec.override.clusterChecksRunner.envFrom with configMaps or secretskubectl describe pod
for agent, cluster checks runner, and cluster agent and verify that the configs or secrets that you specified are there. They should be in a separate section right above the environment variables.kubectl exec -it <datadog agent pod> bash
and thenenv
. You should be able to see the specific variables you added with their values.DD_CLUSTER_NAME
field should not be overridden to what was put in the configMap/secret.Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label