Repository navigation
Set 'Domain' in kcert - #13569
Set 'Domain' in kcert#13569
Conversation
|
Skipping CI for Draft Pull Request. |
919f5ab to
056a85d
Compare
|
/assign @evankanderson |
evankanderson
left a comment
There was a problem hiding this comment.
One comment, but this looks reasonable for now.
(I'm wondering about creating multiple Certificate resources on L82 of route/resources/certificate.go, but do not fix that in this PR.)
| certName := kmeta.ChildName(dm.GetName(), "") | ||
| return routeresources.MakeCertificate( | ||
| dm, serving.DomainMappingUIDLabelKey, dm.Name, certName, certClass) | ||
| dm, serving.DomainMappingUIDLabelKey, dm.Name, certName, certClass, "domain.mapping") |
There was a problem hiding this comment.
I think this needs to be a valid domain that can answer a challenge, so it should probably be dm.Name here.
056a85d to
d08bbab
Compare
d08bbab to
7d656aa
Compare
* for domain mappings, use the name as the domain
7d656aa to
71cc5e9
Compare
* since the tests specify a domain in the config, the certs created will use the domain
Codecov ReportBase: 86.44% // Head: 86.45% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #13569 +/- ##
==========================================
+ Coverage 86.44% 86.45% +0.01%
==========================================
Files 196 196
Lines 14600 14606 +6
==========================================
+ Hits 12621 12628 +7
Misses 1678 1678
+ Partials 301 300 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
/retest |
|
/test istio-latest-no-mesh-tls |
|
I think the |
evankanderson
left a comment
There was a problem hiding this comment.
Agree that the Istio error flagged looks legitimate.
| // annotations from the owner, as well as the namespaces. If owner | ||
| // does not have a certClass, use the provided `certClass` parameter. | ||
| func MakeCertificate(owner kmeta.OwnerRefableAccessor, ownerLabelKey string, dnsName string, certName string, certClass string) *networkingv1alpha1.Certificate { | ||
| func MakeCertificate(owner kmeta.OwnerRefableAccessor, ownerLabelKey string, dnsName string, certName string, certClass string, domain string) *networkingv1alpha1.Certificate { |
There was a problem hiding this comment.
I'll admit I'm slightly concerned with this collection of string arguments -- it would be nice if there was a way to use the type system to avoid (for example) confusing dnsName and certName.
However, that's a problem with the existing interface, and I'd avoid trying to fix it in this PR.
There was a problem hiding this comment.
hmmm okay. This would a separate PR that could come after this one?
And are you imagining like a custom type for each string entry? Or that the MakeCertificate function would accept an object (perhaps even a CertificateSpec) instead of all those strings?
| @@ -58,7 +59,7 @@ func MakeCertificate(owner kmeta.OwnerRefableAccessor, ownerLabelKey string, dns | |||
| // domainTagMap is an one-to-one mapping between domain and tag, for major domain (tag-less), | |||
| // the value is an empty string | |||
There was a problem hiding this comment.
Add documentation for domain here, since it's not clear how it relates to domainTagMap?
| @@ -34,7 +34,7 @@ import ( | |||
| // MakeCertificate creates a Certificate, inheriting the certClass | |||
| // annotations from the owner, as well as the namespaces. If owner | |||
| // does not have a certClass, use the provided `certClass` parameter. | |||
There was a problem hiding this comment.
Add a docstring about the domain parameter, particularly since it differs from the dnsName parameter in a possibly-subtle way?
There was a problem hiding this comment.
(you might want to call this baseDomain?)
| certName := kmeta.ChildName(dm.GetName(), "") | ||
| return routeresources.MakeCertificate( | ||
| dm, serving.DomainMappingUIDLabelKey, dm.Name, certName, certClass) | ||
| dm, serving.DomainMappingUIDLabelKey, dm.Name, certName, certClass, dm.Name) |
There was a problem hiding this comment.
Hmm -- maybe this should be empty-string for the domain-mapping use case (indicating that there isn't a base domain, and we should be using this exact name)?
fa49ff2 to
ae1a85b
Compare
ae1a85b to
3375f37
Compare
|
@evankanderson would you mind expanding more on what you're thinking regarding this when you get the chance?
I'm happy to start up followup PRs from this one |
|
@evankanderson @dprotaso I was looking into why the istio tls tests were failing when you use On my dev cluster, I see this error in the domain mapping controller logs: which is because of this validation that I added in the previous MR: I think it is okay to not include a domain for a domainmapping, but I'm curious what you think. Should the validation change instead? |
|
Let's update |
|
Okay, I've made a change for the validation: knative/networking#754 |
|
The networking change has merged into serving HEAD /retest |
|
Going to merge this but we can do a follow up where DomainMapping includes the domain just to be complete. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, KauzClay The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold need to check something |
|
/hold cancel All good - wanted to confirm that the But it's manipulated in the implementations here: https://github.com/knative-sandbox/net-certmanager/pull/472/files#diff-6fcd5c4b2c560dac89c88b31c34e9a25b3edd76f02b94cf53ddcfe483ea4d416R40 |
This is a follow up on knative#13569 since we've relaxed the validation for certificates knative/networking#754
This is a follow up on #13569 since we've relaxed the validation for certificates knative/networking#754
Part of Fix for knative-extensions/net-certmanager#214
Proposed Changes
TODO: What should be done about the domains for a domain mapping?Use the domainmapping nameRelease Note