Skip to content

Commit

Permalink
ENTESB-17843 Kameletbinding from broker source ignores broker name
Browse files Browse the repository at this point in the history
  • Loading branch information
claudio4j committed Jan 11, 2022
1 parent 57ab23d commit 19316df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/util/bindings/bindings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestBindings(t *testing.T) {
"type": "myeventtype",
}),
},
uri: "knative:event/myeventtype?apiVersion=eventing.knative.dev%2Fv1&kind=Broker",
uri: "knative:event/myeventtype?apiVersion=eventing.knative.dev%2Fv1&kind=Broker&name=default",
},
{
endpointType: v1alpha1.EndpointTypeSource,
Expand Down
7 changes: 3 additions & 4 deletions pkg/util/bindings/knative_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ func (k KnativeRefBindingProvider) Translate(ctx BindingContext, endpointCtx End

var serviceURI string
if *serviceType == knativeapis.CamelServiceTypeEvent {
// TODO enable this when the runtime will support changing the broker name (https://github.com/apache/camel-k-runtime/issues/535)
//if props["name"] == "" {
// props["name"] = e.Ref.Name
//}
if props["name"] == "" {
props["name"] = e.Ref.Name
}
if eventType, ok := props["type"]; ok {
// consume prop
delete(props, "type")
Expand Down

0 comments on commit 19316df

Please sign in to comment.