-
Notifications
You must be signed in to change notification settings - Fork 109
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
Fix DatadogAgent secret backend usage #454
Conversation
working on tests |
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.
👍🏻 from docs team
99ed7b0
to
79320f5
Compare
Codecov Report
@@ Coverage Diff @@
## main #454 +/- ##
=======================================
Coverage 60.60% 60.60%
=======================================
Files 3 3
Lines 132 132
=======================================
Hits 80 80
Misses 40 40
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
- name: DD_SECRET_BACKEND_COMMAND | ||
value: "/readsecret.sh" | ||
- name: DD_SECRET_BACKEND_ARGUMENTS | ||
value: "/etc/secret-volume" |
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.
For v2.DatadogAgent
we could imaging to have specific fields for configuring the secret-backend
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 have a list of a couple changes to make for v2 regarding this feature, will add this too
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.
💯
* secret backend fixes and test updates
What does this PR do?
The secret backend feature for DatadogAgent was not working properly. This fixes the feature so that any credentials can use it. In addition, the Operator no longer creates a secret if it's not needed (i.e. it will not create an empty secret).
Other changes:
Motivation
Fix
Additional Notes
Anything else we should know when reviewing?
Describe your test plan
Use the new
datadog-agent-secret-backend.yaml
example file to test the secret backend feature.For completeness, can test the following cases (make sure the keys are read properly and the Agent can connect to the Cluster Agent):
(Create a secret containing credentials with
kubectl create secret generic test-secret --from-literal=api_key='<token>' --from-literal=app_key='<token>' --from-literal=token='<token>'
)