-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: Add ability to configure multiple wilcard domains #14543
Conversation
Hi @arsenetar. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/hold release is next week - will review after |
/ok-to-test |
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 believe unit test failures are legit - I think you need to update the fixtures to set the default domain is a wildcard
internalConfig.Wildcard = true | ||
} | ||
c.Domains[k] = DomainConfig{ | ||
Selector: &LabelSelector{Selector: internalConfig.Selector}, |
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.
nit: We could simplify LabelSelector now to be a type alias to map[string]string
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.
Could there are methods on the LabelSelector type that are used right now. LabelSelector is an exported type with exported functions so not sure we would want to change those.
Hey @arsenetar just following up - next serving release is in two weeks. |
@dprotaso Been trying to find time to work on this... haven't had a chance to slot this work in. |
- Update nscert reconciler to be able to create multiple wildcard certificates for any domain that is a wildcard - Update domain config to allow marking domains as having wildcard enable. The format of the change an implementation allows for prior usage without wildcard field to continue to function as it was. - Update references to config object as necessary to use new object format
Change the boolean wildcard config to use a type field that could support other usage later. Update references and logic throughout.
1b4d377
to
7bd1abb
Compare
Since this function bypasses the configuration loading it needs to set the default domain to Type of wildcard.
@dprotaso Took care of the quick changes, looking at the tests failures there seems to be a few things going on. Found the one test fixture helper that bypassed the domain config loading function so that resolved some of the failures. The test failure with two certs instead of one is due to it creating a new cert and not removing the old one since now there can technically be more than one. So that is a bug here if we want to keep the behavior similar to before, would need to modify the logic to remove any wildcard certs no longer in the list of wildcard domains. Going to have to look at this failure more as:
This might be the same as the other cleanup one... but not 100% sure at this point. I'll try to get back soon to rewriting the logic to make updates to remove the certs that are no longer matched by wildcard domains. |
- Cleanup certs which no longer match a wildcard domains. - Return on first error instead of continuing (similar to prior behavior)
Change findNamespaceCert to use the labeled domain to find matching cert instead of the dnsNames in the cert. This seems to be the intended behavior to keep the cert associated with the entry in the domain config updated instead of potentially creating another.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #14543 +/- ##
==========================================
- Coverage 85.91% 85.90% -0.01%
==========================================
Files 197 197
Lines 14991 15018 +27
==========================================
+ Hits 12879 12901 +22
- Misses 1798 1800 +2
- Partials 314 317 +3 ☔ View full report in Codecov by Sentry. |
/retest |
Awesome thanks /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: arsenetar, dprotaso 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 |
/hold cancel |
Fixes #14364
Proposed Changes
Release Note