Repository navigation
Properly resolve DomainMapping references - #10167
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10167 +/- ##
==========================================
- Coverage 88.07% 88.04% -0.04%
==========================================
Files 184 184
Lines 8603 8621 +18
==========================================
+ Hits 7577 7590 +13
- Misses 785 789 +4
- Partials 241 242 +1
Continue to review full report at Codecov.
|
|
/test pull-knative-serving-istio-stable-no-mesh-tls |
When you do, we should be able to write an e2e test that simply uses a K8s service. |
Yeps, willdo |
| // Resolve the spec.Ref to a URI following the Addressable contract. | ||
| target, err := r.resolveRef(ctx, dm) | ||
| if err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
We should error out if the target has a Path (e.g. the MT Broker)
mattmoor
left a comment
There was a problem hiding this comment.
I think the only comments I have are erroring out on edge cases that are possible, but we don't support today:
- Addressables that return a Path (e.g. MT Broker)
- Addressables that return a Service that isn't
name.namespace(e.g. IMC IIRC)
| var ( | ||
| targetServiceName = dm.Spec.Ref.Name | ||
| targetServiceNamespace = dm.Spec.Ref.Namespace | ||
| ) |
There was a problem hiding this comment.
I think in the short term we should change this to parse the URL and error out if it doesn't end with network.GetClusterDomainSuffix() (or w/e we called that).
In the longer term, I think we may need to create an ExternalName service when that doesn't match, but it will be hard to test...
There was a problem hiding this comment.
yeah, I think for this PR we still require ksvc so this is ok, when we relax the validation we need to worry about stuff that doesn't already have a matching service etc
There was a problem hiding this comment.
.. either way, added some validation for now
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: julz, mattmoor 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 |
|
/test pull-knative-serving-istio-stable-no-mesh-tls |
* Properly resolve DomainMapping references * lint * error if resolved address contains a path * check resolved URI is in .svc.cluster.local
* Properly resolve DomainMapping references * lint * error if resolved address contains a path * check resolved URI is in .svc.cluster.local
Moar of #9713 .
Correctly uses
pkg/resolverto resolve spec.Ref to URL, which also means we now get nice condition failures if the target ksvc doesn't exist rather than the ingress just failing to probe. I think this should also let us relax the must-be-ksvc validation requirement in a follow-on PR./assign @mattmoor @vagababov