Skip to content
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 namespaced Datadog credentials #1

Merged
merged 12 commits into from
Aug 13, 2024

Conversation

ariadnarouco
Copy link
Collaborator

@ariadnarouco ariadnarouco commented Aug 7, 2024

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 the AnalysisTemplate: 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:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

Copy link

github-actions bot commented Aug 7, 2024

Published E2E Test Results

  4 files    4 suites   3h 25m 34s ⏱️
111 tests 102 ✅  6 💤 3 ❌
450 runs  420 ✅ 24 💤 6 ❌

For more details on these failures, see this check.

Results for commit 4da856b.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 7, 2024

Published Unit Test Results

2 174 tests   2 174 ✅  2m 54s ⏱️
  119 suites      0 💤
    1 files        0 ❌

Results for commit 4da856b.

♻️ This comment has been updated with latest results.

@ariadnarouco ariadnarouco changed the title feat: Datadog multi account feat: support namespaced Datadog credentials Aug 9, 2024
.github/workflows/argo-rollouts-fork-ci.yaml Outdated Show resolved Hide resolved
analysis/controller_test.go Outdated Show resolved Hide resolved
cmd/rollouts-controller/main.go Outdated Show resolved Hide resolved
docs/analysis/datadog.md Show resolved Hide resolved
docs/analysis/datadog.md Outdated Show resolved Hide resolved
@ariadnarouco ariadnarouco merged commit ff807af into master Aug 13, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants