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

fix(notifications-controller): Set cert resolver to use injected "argocd-tls-certs-cm"(#15392) #15394

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

svghadi
Copy link
Contributor

@svghadi svghadi commented Sep 7, 2023

Fixes #15392

notifications-engine includes functionality to use custom certs for notification services. However, in current notifications-controller code we are missing the initialization of cert resolver function.
Previously, when notification-controller was in a separate repo, the initialization of cert resolver was happening here.

This PR adds the missing initialization of cert resolver function in notifications-controller so that controller trusts custom certs for notification services.

I could not come up with a unit/e2e test because of dependency on external notification service with custom cert, but I validated the change local following the steps from linked issue and it worked as expected.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (91bd63a) 49.43% compared to head (bacd51d) 49.43%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #15394   +/-   ##
=======================================
  Coverage   49.43%   49.43%           
=======================================
  Files         269      269           
  Lines       46790    46793    +3     
=======================================
+ Hits        23131    23134    +3     
  Misses      21385    21385           
  Partials     2274     2274           
Files Coverage Δ
notification_controller/controller/controller.go 62.93% <100.00%> (+0.79%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ishitasequeira ishitasequeira enabled auto-merge (squash) October 30, 2023 01:04
Signed-off-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
@ishitasequeira ishitasequeira requested a review from a team as a code owner October 30, 2023 01:04
@ishitasequeira ishitasequeira merged commit f7a32fd into argoproj:master Oct 30, 2023
22 checks passed
@svghadi svghadi deleted the notification-ca branch October 30, 2023 10:40
@svghadi
Copy link
Contributor Author

svghadi commented Oct 30, 2023

Thanks @ishitasequeira. Will this fix be backported to 2.9 & 2.8?

@ishitasequeira
Copy link
Member

/cherry-pick release-2.9

@ishitasequeira
Copy link
Member

/cherry-pick release-2.8

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
ishitasequeira pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Co-authored-by: Siddhesh Ghadi <61187612+svghadi@users.noreply.github.com>
ishitasequeira pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Co-authored-by: Siddhesh Ghadi <61187612+svghadi@users.noreply.github.com>
@ishitasequeira
Copy link
Member

@svghadi , the change has been cherry-picked in 2.8 and 2.9

jmilic1 pushed a commit to jmilic1/argo-cd that referenced this pull request Nov 13, 2023
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
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.

notifications-controller doesn't trust certs from argocd-tls-certs-cm configmap
3 participants