-
Notifications
You must be signed in to change notification settings - Fork 263
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
Revisit sink prefixes: Support only 'ksvc' prefix and drop 'svc', 'service' support for knative service #896
Revisit sink prefixes: Support only 'ksvc' prefix and drop 'svc', 'service' support for knative service #896
Conversation
Sounds good, but I'm generally not so happy with the duality of A suggestion would be |
Yes. Despite supporting prefix for k8s service, I agree that knative service prefix should be called How about deprecating 'svc' and 'service' prefixes in favor of 'ksvc' and 'kservice' ?
should we support prefixes for non-knative addressable resources ? Giving URI or defining sink prefix for non-knative addressable should do. It should be explicit about GVKs for non-knative addressable than hardcoding GVKs in kn and giving prefix(es) for it ? |
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.
Looks good to me once you address @dsimansk comment. Best.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maximilien, navidshaikh 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 for conclusion at #898 |
a98d22a
to
1e94cb4
Compare
/retest
|
/unhold |
Looks good but I wonder whether we should keep Also we should allow overriding Does this make sense ? |
This can be done, however I wonder if we should provide this (temporary) UX for allowing to override the default prefix via config values. Our eventing support is experimental, we may choose to put hard stop for default |
Ok, let's do it that way for now. We will learn anyway if we get some backslash, but otherwise being overcautios is not good as well. We make Eventing support as experimental, so I think that's fine. But maybe we can add to error message when a user uses SVC: that this has been moved to ksvc: ? |
1e94cb4
to
22c25e5
Compare
@@ -84,7 +88,10 @@ func (i *SinkFlags) ResolveSink(knclient clientdynamic.KnDynamicClient, namespac | |||
} | |||
typ, ok := sinkMappings[prefix] | |||
if !ok { | |||
return nil, fmt.Errorf("unsupported sink type: %s", i.sink) | |||
if prefix == "svc" || prefix == "service" { |
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 have not tested it but does this also throw an error if a user configures that prefix in its configuration file ? (that should not be the case).
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.
Nope, this check is after key lookup in sinkMapping
( typ, ok := sinkMappings[prefix]
) just a couple lines before.
- Add examples for broker, service and URI - Add note about default prefix and service alias
- 'ksvc' prefix for knative services - Remove 'svc' or 'service' prefixes mapping for knative services
3a6bd00
to
aef8b54
Compare
The following is the coverage report on the affected files.
|
Thanks ! /lgtm |
Fixes #898
help message: