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

Remove constrains of multiple TLS on certificate auto-discovery #3028

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

jerryhe1999
Copy link
Contributor

@jerryhe1999 jerryhe1999 commented Feb 6, 2023

Co-authored-by: LechG lech.gorlewicz@gmail.com

Issue

Fixes: #1598

Description

This PR removes the constraint of single TLS certificate per host during auto-discovery. The controller will now unconditionally auto-discover all matching TLS certificates for the given host. Auto-discovery can still be disabled by specifying the certificates manually via annotation.

The controller is backwards compatible since existing ingresses/groups that are treated valid have only one TLS certificate.

Manual test has been done by creating multiple certificates on the ACM for the same host: mijerryapp.fortest.com, create an ingress for this host, verify ALB gets created and all of the certs get added to the listener. The old controller did not work with the multiple certificates in place.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

Co-authored-by: LechG <lech.gorlewicz@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 6, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @jerryhe1999. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 6, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.32%. Comparing base (fb96e58) to head (1858293).
Report is 270 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3028      +/-   ##
==========================================
+ Coverage   54.31%   54.32%   +0.01%     
==========================================
  Files         145      145              
  Lines        8412     8410       -2     
==========================================
  Hits         4569     4569              
+ Misses       3513     3511       -2     
  Partials      330      330              

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

@kishorj kishorj added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Feb 6, 2023
@kishorj
Copy link
Collaborator

kishorj commented Feb 6, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 6, 2023
Copy link
Collaborator

@kishorj kishorj left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Could you also document the manual tests?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerryhe1999, kishorj

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2023
@kishorj
Copy link
Collaborator

kishorj commented Feb 8, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2023
@k8s-ci-robot k8s-ci-robot merged commit cd94fdc into kubernetes-sigs:main Feb 8, 2023
@jerryhe1999 jerryhe1999 deleted the multi_tls branch April 6, 2023 21:57
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v2] Error when there are multiple certificates for a host
4 participants