Conversation
Signed-off-by: zhangwei <[email protected]>
| } | ||
|
|
||
| // SinkSpec describes an event source for the Kafka. | ||
| // SinkSpec describes an event source for the Kafka, priority Uri > Reference. |
There was a problem hiding this comment.
@arugal Thanks for the PR, the test part is professional.
The original comment is wrong actually, would you help to correct it?
// SinkSpec describes an event source for the Kafka, priority Uri > Reference.
=>
// SinkSpec specifies the receiver of the events an EventSource received, sinks in the Uri format have higher priority than sinks in Reference format.
|
This PR looks good to me now. |
Signed-off-by: zhangwei <[email protected]>
| } else { | ||
| var ksvc kservingv1.Service | ||
| if err := c.Get(ctx, types.NamespacedName{Namespace: sink.Ref.Namespace, Name: sink.Ref.Name}, &ksvc); err != nil { | ||
| log.Error(err, "Failed to find Knative Service", "namespace", sink.Ref.Namespace, "name", sink.Ref.Name) | ||
| return nil, err | ||
| } | ||
| url = ksvc.Status.URL.String() | ||
| namespace = sink.Ref.Namespace | ||
| } |
There was a problem hiding this comment.
I think we also need to add support for Function in this section, what do you think?
There was a problem hiding this comment.
apiVersion: core.openfunction.io/v1alpha2
kind: Function
name: function-sample
namespace: defaultlike this ?
@tpiperatgod we can add URL to function status and then update this part |
|
We already have an URL field in the function status in v0.5.0, so the reference can be an OpenFunction's own |
I will submit a new PR |
The solutions are as follows:
Referenceprovides references to Knative Service and Function resources from which to retrieve function URLsUriis used to pass the URL directlyWhen using the
Sink, you must use one of these attributes, and in priorityUri>ReferenceResolves #198
Signed-off-by: zhangwei [email protected]