-
Notifications
You must be signed in to change notification settings - Fork 894
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
feat: support multi account Datadog metrics provider #3787
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3787 +/- ##
==========================================
+ Coverage 83.87% 83.89% +0.02%
==========================================
Files 162 163 +1
Lines 18524 18548 +24
==========================================
+ Hits 15537 15561 +24
+ Misses 2119 2117 -2
- Partials 868 870 +2 ☔ View full report in Codecov by Sentry. |
Published E2E Test Results 4 files 4 suites 3h 13m 39s ⏱️ For more details on these failures, see this check. Results for commit 52dc2e6. ♻️ This comment has been updated with latest results. |
Published Unit Test Results2 270 tests 2 270 ✅ 2m 58s ⏱️ Results for commit 52dc2e6. ♻️ This comment has been updated with latest results. |
interval: 5m | ||
secretRef: | ||
name: "mysecret" | ||
namespaced: true |
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 knid of think we just drop this field namespaced
, i think the presence of a secretRef just means look up secret in the namespace of the AnalysisTemplate. At a later date we can then add a namespace
field to secretRef if we want to support cross namespace lookups. Thoughts?
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.
Hi @zachaller
Thanks for the review and the input.
When implementing this feature we discussed the different use-cases and we thought about the following ones:
- As an argo rollout owner, you also own the integration with a single DataDog account.
- As an argo rollout owner, you also own the integration with several DataDog accounts
- As an argo rollout owner, you only own argo rollout and your users own the DataDog ones.
The first case is the currently supported case.
The second case corresponds to namespaced: false
, and let the "rollouts administrator" to manage different DataDog integrations by providing well-known secret names to the namespace users.
The third one corresponds to namespaced: true
, where namespace users were completely autonomous to manage the DataDog account integration.
We did consciously exclude the option to have a configurable namespace
string to maximise security.
Indeed, we want the owners of, say, namespace-a
AnalysisTemplate
s and DataDog integrations to have confidence that they will control who can access their metrics.
Having a configurable free text namespace
would allow users of any other namespace to indirectly access DataDog metrics, which would then break the namespace principles.
WDYT?
dd3fc56
to
c1ade6a
Compare
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
…sis template. Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
Co-authored-by: Thibault Jamet <tjamet@users.noreply.github.com> Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com> (cherry picked from commit 36a9c06) Signed-off-by: Ariadna Rouco <ariadna.rouco@adevinta.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@gmail.com> (cherry picked from commit 7703ff9) Signed-off-by: Ariadna Rouco <ariadna.rouco@adevinta.com>
(cherry picked from commit eab99be) Signed-off-by: Ariadna Rouco <ariadna.rouco@adevinta.com>
Signed-off-by: Ariadna Rouco <ariadna.rouco@adevinta.com>
4a8e86c
to
52dc2e6
Compare
Quality Gate passedIssues Measures |
Summary
This pull adds ability to use namespaced credentials for Datadog metrics provider.
Background
Our use case involves an Argo Rollout that operates across multiple namespaces, each managed by tenants with distinct Datadog accounts. As a result, multiple credentials are needed to integrate seamlessly with Datadog.
Implementation
This setup will allow users to use different credentials than the one setup as default, which is a secret named "datadog" deployed in the same namespaces as the rollouts controller [refer to doc].
This way the users can manage their datadog credentials with the name they want and in their own namespace.
The process suggested within this PR for retrieving Datadog credentials is as follows:
1. If a
secretRef
is defined in theAnalysisTemplate
: Argo Rollouts will search for the secret with the specified name in the namespace where the template resides.2. If the secret is not found in the specified namespace: Argo Rollouts will then check the environment variables.
3. If the credentials are not found in environment variables: Argo Rollouts will look for a secret named "Datadog" in the namespace where Argo Rollouts itself is deployed.
Notes:
Based on the code, to have more than one set of credentials is not possible. I also created a question for this which remains unanswered
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.