-
Notifications
You must be signed in to change notification settings - Fork 110
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
[CECO-743] Secrets backend feature #1333
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1333 +/- ##
==========================================
+ Coverage 47.14% 47.55% +0.40%
==========================================
Files 217 219 +2
Lines 18768 18977 +209
==========================================
+ Hits 8849 9025 +176
- Misses 9457 9482 +25
- Partials 462 470 +8
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.
Looks great! I only have one comment about the config naming
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.
Also, can we move secretBackend
from features
to global
?
Closing in favor of #1395 : moving from a feature to |
What does this PR do?
Implements the Secrets Backend feature to directly configure Secrets management from the
DatadogAgent
custom resource, providing helpers to handle RBAC similar to the Helm chartMotivation
Describe your test plan
The scenarios below are covered by the unit tests and replicate them in e2e manner, verifying functionality. Ensure the new version of the CRD is installed with
make install
and install the built-operator withmake IMG=tbdatadog/operator:1.9.0 deploy
(pre-loading your built image in your cluster withkind load docker-image tbdatadog/operator:1.9.0 --name <KIND CLUSTER NAME>
Testing env variables
Exec into your Agent pod and assert:
agent config | grep secret_backend -A 2
matches the parameters defined in the CRTesting global RBAC and secrets resolution
args
andtimeout
. AddenableGlobalPermissions
set totrue
. Re-deploy your CRkubectl apply -f "https://github.com/rabbitmq/cluster-operator/releases/download/v2.9.0/cluster-operator.yml"
Assert the following :
k auth can-i get -n rabbitmq-system secrets/rabbitmqcluster-sample-default-user --as=system:serviceaccount:system:datadog-agent
agent secret
inside the node AgentTesting specific RBAC (roles), its priority over
enableGlobalPermissions
and bindingrabbitmq-system
is withinWATCH_NAMESPACE
variable if not using global watch scope :Assert the following :
k auth can-i get -n rabbitmq-system secrets/rabbitmqcluster-sample-default-user --as=system:serviceaccount:system:datadog-agent
k auth can-i get -n rabbitmq-system secrets/rabbitmqcluster-sample-erlang-cookie --as=system:serviceaccount:system:datadog-agent
Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label