Repository: apache/camel-k
Pull request #1788 (2020-10-26 15:13:52)

Backport Kamelet changes to 1.2.x
<!-- Description -->

Backport Kamelet changes to 1.2.x


<!--
Enter your extended release note in the below block. If the PR requires
additional action from users switching to the new release, include the string
"action required". If no release note is required, write "NONE". 

You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
the text is added to the right section of the release notes. 
-->

**Release Note**
```release-note
NONE
```



Patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 317431444..b0d087f0d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -21,6 +21,7 @@ on:
   pull_request:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
@@ -29,6 +30,7 @@ on:
   push:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml
index bce238b76..3bcd7e906 100644
--- a/.github/workflows/builder.yml
+++ b/.github/workflows/builder.yml
@@ -21,6 +21,7 @@ on:
   pull_request:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
@@ -29,6 +30,7 @@ on:
   push:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml
index 4e01d19a9..fb93c3a5c 100644
--- a/.github/workflows/knative.yml
+++ b/.github/workflows/knative.yml
@@ -21,6 +21,7 @@ on:
   pull_request:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
@@ -29,6 +30,7 @@ on:
   push:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
diff --git a/.github/workflows/kubernetes.yml b/.github/workflows/kubernetes.yml
index 78e6885b7..b138abc9f 100644
--- a/.github/workflows/kubernetes.yml
+++ b/.github/workflows/kubernetes.yml
@@ -21,6 +21,7 @@ on:
   pull_request:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
@@ -29,6 +30,7 @@ on:
   push:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
diff --git a/.github/workflows/openshift.yml b/.github/workflows/openshift.yml
index e41a078df..7502f0a5d 100644
--- a/.github/workflows/openshift.yml
+++ b/.github/workflows/openshift.yml
@@ -21,6 +21,7 @@ on:
   pull_request:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
@@ -29,6 +30,7 @@ on:
   push:
     branches:
       - master
+      - "release-*"
     paths-ignore:
       - '**.adoc'
       - 'KEYS'
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index f8c2be797..5decec1f1 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -21,9 +21,11 @@ on:
   pull_request:
     branches: 
       - master
+      - "release-*"
   push:
     branches:
       - master
+      - "release-*"
 jobs:
   build:
     runs-on: ubuntu-latest
diff --git a/deploy/resources.go b/deploy/resources.go
index bb299aea9..aa2228585 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -161,9 +161,9 @@ var assets = func() http.FileSystem {
 		"/operator-deployment.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "operator-deployment.yaml",
 			modTime:          time.Time{},
-			uncompressedSize: 2139,
+			uncompressedSize: 2148,
 
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\x41\x6f\xe3\x36\x13\xbd\xeb\x57\x3c\x58\x97\x5d\x20\xb6\xbf\x7c\x47\xf5\xa4\x26\x0e\x56\x68\x2a\x1b\x96\xb7\xc1\x9e\x8a\x09\x35\x92\x88\x50\xa4\x4a\x52\xd1\xea\xdf\x17\x94\xed\xd8\xce\x66\xd3\x1e\x82\xf2\x24\x71\x86\x6f\xde\x9b\x37\x64\x8c\xf9\xc7\xad\x28\xc6\xbd\x14\xac\x1d\x97\xf0\x06\xbe\x61\xa4\x1d\x89\x86\x51\x98\xca\x0f\x64\x19\x77\xa6\xd7\x25\x79\x69\x34\x3e\xa5\xc5\xdd\x67\xf4\xba\x64\x0b\xa3\x19\xc6\xa2\x35\x96\xa3\x18\xc2\x68\x6f\xe5\x63\xef\x8d\x85\xda\x03\x82\x6a\xcb\xdc\xb2\xf6\x6e\x01\x14\xcc\x13\x7a\xbe\xde\x65\x37\x2b\x54\x52\x31\x4a\xe9\xf6\x87\xb8\xc4\x20\x7d\x13\xc5\xf0\x8d\x74\x18\x8c\x7d\x42\x65\x2c\xa8\x2c\x65\x28\x4c\x0a\x52\x57\xc6\xb6\x7b\x1a\x96\x6b\xb2\xa5\xd4\x35\x84\xe9\x46\x2b\xeb\xc6\xc3\x0c\x9a\xad\x6b\x64\xb7\x88\x62\xec\x82\x8c\xe2\xee\xc8\xc4\xed\x61\xa7\x9a\xde\xe0\x9b\xe9\x0f\x1a\xce\xe4\x1e\xba\x70\x85\x3f\xd8\xba\x50\xe4\xff\x8b\xff\x45\x31\x3e\x85\x94\xd9\x21\x38\xfb\xfc\x0b\x46\xd3\xa3\xa5\x11\xda\x78\xf4\x8e\xcf\x90\xf9\xbb\xe0\xce\x43\x6a\x08\xd3\x76\x4a\x92\x16\x7c\x92\xf5\x52\x61\x81\x89\x40\xc0\x30\x8f\x9e\xa4\x06\x4d\x32\x60\xaa\xf3\x34\x90\x8f\xe2\x28\xc6\xb4\x1a\xef\xbb\x64\xb9\x1c\x86\x61\x41\x13\xdd\x85\xb1\xf5\xf2\xa8\x6e\x79\x9f\xdd\xac\xf2\x62\x35\x9f\x28\x47\x31\xbe\x6a\xc5\xce\xc1\xf2\x5f\xbd\xb4\x5c\xe2\x71\x04\x75\x9d\x92\x82\x1e\x15\x43\xd1\x10\x8c\x9b\xdc\x99\x4c\x97\x1a\x83\x95\x5e\xea\xfa\x0a\xee\xe0\x7a\x14\x5f\xb8\x73\x6a\xd7\x91\x9e\x74\x17\x09\x46\x83\x34\x66\x69\x81\xac\x98\xe1\xd7\xb4\xc8\x8a\xab\x28\xc6\x43\xb6\xfb\xb2\xfe\xba\xc3\x43\xba\xdd\xa6\xf9\x2e\x5b\x15\x58\x6f\x71\xb3\xce\x6f\xb3\x5d\xb6\xce\x0b\xac\xef\x90\xe6\xdf\xf0\x5b\x96\xdf\x5e\x81\xa5\x6f\xd8\x82\xbf\x77\x36\xf0\x37\x16\x32\x34\x92\xcb\xe0\xe9\x71\x80\x8e\x04\xc2\x7c\x84\x7f\xd7\xb1\x90\x95\x14\x50\xa4\xeb\x9e\x6a\x46\x6d\x9e\xd9\xea\x30\x1e\x1d\xdb\x56\xba\x60\xa7\x03\xe9\x32\x8a\xa1\x64\x2b\xfd\x34\x45\xee\x47\x51\xa1\xcc\x47\xde\xad\x88\x3a\x79\x18\xa7\x24\x38\xe0\x96\xcf\xd7\xd1\x93\xd4\x65\x82\x5b\xee\x94\x19\xc3\xe5\x88\x5a\xf6\x54\x92\xa7\x24\x02\x34\xb5\x9c\x40\x50\xcb\x6a\xfe\x34\x37\x1d\x5b\xf2\xc6\x46\x80\xa2\x47\x56\x2e\xa4\x20\x20\x25\x98\x1d\x92\x66\xd3\xd6\xf4\x73\x3e\x1b\x61\x04\x8d\x66\xed\x13\xbc\xa0\x84\x4e\x05\x04\xcb\xd3\x2c\xb8\x04\xd7\x11\xe0\xbc\x25\xcf\xf5\xb8\xc7\xf6\x63\xc7\x09\xb6\x2c\x2c\x93\xe7\x10\x66\xc5\xc2\x1b\xbb\x0f\xb7\xe4\x45\x73\x7f\xc6\xe5\x1d\xca\x9e\xdb\x4e\x91\xe7\xc3\xc9\x33\x95\x61\xa9\x0b\x90\x77\x60\xf6\xeb\x5f\x09\x3c\x26\xbf\xd1\xa0\xa3\xf6\xe9\x9b\xed\xb3\x14\x9c\x0a\x61\x7a\xed\xf3\xf7\x0a\x87\x67\x8d\x64\x78\x59\x4e\x4c\xe7\xff\xc4\x15\x90\x2d\xd5\x9c\xa0\x34\xe2\x89\xed\x42\x9a\xe5\x9e\xf8\xf2\x70\x24\xb9\x5e\x84\xab\x7a\xca\x17\xa6\x6d\x49\x97\xc9\xd9\xd6\x1c\x4f\x21\xf9\x62\xe7\x67\x95\x36\xbd\x52\x1b\xa3\xa4\x18\x13\x64\x55\x6e\xfc\xc6\xb2\x0b\xa3\x75\xca\x63\xfd\x7c\x8e\x7e\x52\xf1\x90\xee\x6e\xbe\xfc\x99\xa7\xbf\xaf\x8a\x4d\x7a\xb3\xba\xc8\x01\x9e\x49\xf5\x7c\x67\x4d\x9b\xbc\x0a\x00\x95\x64\x55\x6e\xb9\xfa\x31\x72\x88\x6d\xc8\x37\xc9\x8b\xef\x8b\x50\xce\x75\x24\xf8\x4d\x1a\xeb\xcd\x6a\x9b\xee\xd6\xdb\x89\xc9\x5b\x24\x5e\x1b\xfa\x1a\x60\xb3\xbe\xfd\xe9\xd9\x8f\x13\x70\x91\x1a\xe3\xa5\x6d\xe1\x39\x24\x35\xd0\xe8\xa6\xf7\xe4\x68\x14\x5e\x44\x5f\x41\xea\x92\x3b\xd6\x25\x6b\xaf\x46\x54\xd6\xb4\xef\xf6\xfe\xa8\xeb\x3f\x75\xe6\xef\x00\x00\x00\xff\xff\x82\xc4\xfe\xb7\x5b\x08\x00\x00"),
+			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x6e\xe3\x36\x10\xbd\xeb\x2b\x1e\xac\xcb\x2e\x10\xdb\xcd\x1e\xd5\x93\x9a\x38\x88\xd1\x54\x32\x2c\x6f\x83\x3d\x15\x13\x6a\x24\x11\xa1\x48\x95\xa4\xa2\xd5\xdf\x17\x94\xed\xc4\xce\x66\xd3\x1e\x82\xf2\x64\x73\x66\xde\xbc\x37\x6f\xc4\x18\xf3\x8f\x3b\x51\x8c\x3b\x29\x58\x3b\x2e\xe1\x0d\x7c\xc3\x48\x3b\x12\x0d\xa3\x30\x95\x1f\xc8\x32\x6e\x4c\xaf\x4b\xf2\xd2\x68\x7c\x4a\x8b\x9b\xcf\xe8\x75\xc9\x16\x46\x33\x8c\x45\x6b\x2c\x47\x31\x84\xd1\xde\xca\x87\xde\x1b\x0b\xb5\x07\x04\xd5\x96\xb9\x65\xed\xdd\x02\x28\x98\x27\xf4\x2c\xdf\xad\xaf\x56\xa8\xa4\x62\x94\xd2\xed\x8b\xb8\xc4\x20\x7d\x13\xc5\xf0\x8d\x74\x18\x8c\x7d\x44\x65\x2c\xa8\x2c\x65\x68\x4c\x0a\x52\x57\xc6\xb6\x7b\x1a\x96\x6b\xb2\xa5\xd4\x35\x84\xe9\x46\x2b\xeb\xc6\xc3\x0c\x9a\xad\x6b\x64\xb7\x88\x62\xec\x82\x8c\xe2\xe6\xc8\xc4\xed\x61\xa7\x9e\xde\xe0\x9b\xe9\x0f\x1a\x4e\xe4\x1e\xa6\x70\x81\x3f\xd9\xba\xd0\xe4\xcb\xe2\x97\x28\xc6\xa7\x90\x32\x3b\x04\x67\x9f\x7f\xc5\x68\x7a\xb4\x34\x42\x1b\x8f\xde\xf1\x09\x32\x7f\x17\xdc\x79\x48\x0d\x61\xda\x4e\x49\xd2\x82\x5f\x64\x3d\x77\x58\x60\x22\x10\x30\xcc\x83\x27\xa9\x41\x93\x0c\x98\xea\x34\x0d\xe4\xa3\x38\x8a\x31\x9d\xc6\xfb\x2e\x59\x2e\x87\x61\x58\xd0\x44\x77\x61\x6c\xbd\x3c\xaa\x5b\xde\xad\xaf\x56\x59\xb1\x9a\x4f\x94\xa3\x18\x5f\xb5\x62\xe7\x60\xf9\xef\x5e\x5a\x2e\xf1\x30\x82\xba\x4e\x49\x41\x0f\x8a\xa1\x68\x08\xc6\x4d\xee\x4c\xa6\x4b\x8d\xc1\x4a\x2f\x75\x7d\x01\x77\x70\x3d\x8a\xcf\xdc\x79\x19\xd7\x91\x9e\x74\x67\x09\x46\x83\x34\x66\x69\x81\x75\x31\xc3\x6f\x69\xb1\x2e\x2e\xa2\x18\xf7\xeb\xdd\x6d\xfe\x75\x87\xfb\x74\xbb\x4d\xb3\xdd\x7a\x55\x20\xdf\xe2\x2a\xcf\xae\xd7\xbb\x75\x9e\x15\xc8\x6f\x90\x66\xdf\xf0\xfb\x3a\xbb\xbe\x00\x4b\xdf\xb0\x05\x7f\xef\x6c\xe0\x6f\x2c\x64\x18\x24\x97\xc1\xd3\xe3\x02\x1d\x09\x84\xfd\x08\xff\x5d\xc7\x42\x56\x52\x40\x91\xae\x7b\xaa\x19\xb5\x79\x62\xab\xc3\x7a\x74\x6c\x5b\xe9\x82\x9d\x0e\xa4\xcb\x28\x86\x92\xad\xf4\xd3\x16\xb9\x1f\x45\x85\x36\x1f\xf9\x6d\x45\xd4\xc9\xc3\x3a\x25\xc1\x01\xb7\x7c\xba\x8c\x1e\xa5\x2e\x13\x5c\x73\xa7\xcc\x18\x3e\x8e\xa8\x65\x4f\x25\x79\x4a\x22\x40\x53\xcb\x09\x04\xb5\xac\xe6\x8f\x73\xd3\xb1\x25\x6f\x6c\x04\x28\x7a\x60\xe5\x42\x0a\x02\x52\x82\xd9\x21\x69\x36\x5d\x4d\x7f\x4e\x77\x23\xac\xa0\xd1\xac\x7d\x82\x67\x94\x30\xa9\x80\x60\x79\xda\x05\x97\xe0\x32\x02\x9c\xb7\xe4\xb9\x1e\xf7\xd8\x7e\xec\x38\xc1\x96\x85\x65\xf2\x1c\xc2\xac\x58\x78\x63\xf7\xe1\x96\xbc\x68\xee\x4e\xb8\xbc\x43\xd9\x73\xdb\x29\xf2\x7c\xa8\x3c\x51\x19\x8e\x3a\x03\x79\x07\x66\x7f\xfe\x93\xc0\x63\xf2\x1b\x03\x3a\x6a\x9f\x7e\xb3\x7d\x92\x82\x53\x21\x4c\xaf\x7d\xf6\x5e\xe3\xf0\xac\x91\x0c\x2f\xcb\x0b\xd3\xf9\xbf\x71\x05\x64\x4b\x35\x27\x28\x8d\x78\x64\xbb\x90\x66\xb9\x27\xbe\x3c\x94\x24\x97\x8b\x2f\x8b\xcb\x79\x91\xa5\x9b\xe2\x36\xdf\x9d\x14\x0a\xd3\xb6\xa4\xcb\xe4\xe4\x6a\x8e\xc7\x50\x75\x76\xf3\xb3\x96\x9b\x5e\xa9\x8d\x51\x52\x8c\x09\xd6\x55\x66\xfc\xc6\xb2\x0b\x3b\xf6\x92\xc7\xfa\xe9\x14\xfd\x45\xce\x7d\xba\xbb\xba\xfd\x2b\x4b\xff\x58\x15\x9b\xf4\x6a\x75\x96\x03\x3c\x91\xea\xf9\xc6\x9a\x36\x79\x15\x00\x2a\xc9\xaa\xdc\x72\xf5\x63\xe4\x10\xdb\x90\x6f\x92\xe7\x05\x58\x84\x76\xae\x23\xc1\x6f\xd2\xc8\x37\xab\x6d\xba\xcb\xb7\x13\x93\xb7\x48\xbc\x76\xf6\x35\xc0\x26\xbf\xfe\x69\xed\xc7\x09\x38\x4b\x8d\xf1\x3c\xb6\xf0\x2e\x92\x1a\x68\x74\xd3\xc3\x72\x34\x0a\xcf\xa2\x2f\x20\x75\xc9\x1d\xeb\x92\xb5\x57\x23\x2a\x6b\xda\x77\x67\x7f\xd4\xf5\xbf\x3a\xf3\x4f\x00\x00\x00\xff\xff\xfd\x3d\xe0\x41\x64\x08\x00\x00"),
 		},
 		"/operator-role-binding-events.yaml": &vfsgen۰CompressedFileInfo{
 			name:             "operator-role-binding-events.yaml",
diff --git a/pkg/cmd/reset.go b/pkg/cmd/reset.go
index f6fa6f6cb..5831d8537 100644
--- a/pkg/cmd/reset.go
+++ b/pkg/cmd/reset.go
@@ -61,6 +61,14 @@ func (o *resetCmdOptions) reset(_ *cobra.Command, _ []string) {
 	}
 
 	var n int
+	if !o.SkipKameletBindings {
+		if n, err = o.deleteAllKameletBindings(c); err != nil {
+			fmt.Print(err)
+			return
+		}
+		fmt.Printf("%d kamelet bindings deleted from namespace %s\n", n, o.Namespace)
+	}
+
 	if !o.SkipIntegrations {
 		if n, err = o.deleteAllIntegrations(c); err != nil {
 			fmt.Print(err)
@@ -77,14 +85,6 @@ func (o *resetCmdOptions) reset(_ *cobra.Command, _ []string) {
 		fmt.Printf("%d integration kits deleted from namespace %s\n", n, o.Namespace)
 	}
 
-	if !o.SkipKameletBindings {
-		if n, err = o.deleteAllKameletBindings(c); err != nil {
-			fmt.Print(err)
-			return
-		}
-		fmt.Printf("%d kamelet bindings deleted from namespace %s\n", n, o.Namespace)
-	}
-
 	if err = o.resetIntegrationPlatform(c); err != nil {
 		fmt.Println(err)
 		return
diff --git a/pkg/controller/kameletbinding/common.go b/pkg/controller/kameletbinding/common.go
new file mode 100644
index 000000000..a50b2023f
--- /dev/null
+++ b/pkg/controller/kameletbinding/common.go
@@ -0,0 +1,139 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package kameletbinding
+
+import (
+	"context"
+	"encoding/json"
+
+	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
+	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+	"github.com/apache/camel-k/pkg/client"
+	"github.com/apache/camel-k/pkg/platform"
+	"github.com/apache/camel-k/pkg/util/bindings"
+	"github.com/apache/camel-k/pkg/util/knative"
+	"github.com/pkg/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+func createIntegrationFor(ctx context.Context, c client.Client, kameletbinding *v1alpha1.KameletBinding) (*v1.Integration, error) {
+	controller := true
+	blockOwnerDeletion := true
+	it := v1.Integration{
+		ObjectMeta: metav1.ObjectMeta{
+			Namespace: kameletbinding.Namespace,
+			Name:      kameletbinding.Name,
+			OwnerReferences: []metav1.OwnerReference{
+				{
+					APIVersion:         kameletbinding.APIVersion,
+					Kind:               kameletbinding.Kind,
+					Name:               kameletbinding.Name,
+					UID:                kameletbinding.UID,
+					Controller:         &controller,
+					BlockOwnerDeletion: &blockOwnerDeletion,
+				},
+			},
+		},
+	}
+	// start from the integration spec defined in the binding
+	if kameletbinding.Spec.Integration != nil {
+		it.Spec = *kameletbinding.Spec.Integration.DeepCopy()
+	}
+
+	profile, err := determineProfile(ctx, c, kameletbinding)
+	if err != nil {
+		return nil, err
+	}
+	it.Spec.Profile = profile
+
+	bindingContext := bindings.BindingContext{
+		Ctx:       ctx,
+		Client:    c,
+		Namespace: it.Namespace,
+		Profile:   profile,
+	}
+
+	from, err := bindings.Translate(bindingContext, v1alpha1.EndpointTypeSource, kameletbinding.Spec.Source)
+	if err != nil {
+		return nil, errors.Wrap(err, "could not determine source URI")
+	}
+	to, err := bindings.Translate(bindingContext, v1alpha1.EndpointTypeSink, kameletbinding.Spec.Sink)
+	if err != nil {
+		return nil, errors.Wrap(err, "could not determine sink URI")
+	}
+
+	if len(from.Traits) > 0 || len(to.Traits) > 0 {
+		if it.Spec.Traits == nil {
+			it.Spec.Traits = make(map[string]v1.TraitSpec)
+		}
+		for k, v := range from.Traits {
+			it.Spec.Traits[k] = v
+		}
+		for k, v := range to.Traits {
+			it.Spec.Traits[k] = v
+		}
+	}
+
+	flow := map[string]interface{}{
+		"from": map[string]interface{}{
+			"uri": from.URI,
+			"steps": []map[string]interface{}{
+				{
+					"to": to.URI,
+				},
+			},
+		},
+	}
+	encodedFlow, err := json.Marshal(flow)
+	if err != nil {
+		return nil, err
+	}
+	it.Spec.Flows = append(it.Spec.Flows, v1.Flow{RawMessage: encodedFlow})
+
+	return &it, nil
+}
+
+func determineProfile(ctx context.Context, c client.Client, binding *v1alpha1.KameletBinding) (v1.TraitProfile, error) {
+	if binding.Spec.Integration != nil && binding.Spec.Integration.Profile != "" {
+		return binding.Spec.Integration.Profile, nil
+	}
+	pl, err := platform.GetCurrentPlatform(ctx, c, binding.Namespace)
+	if err != nil && !k8serrors.IsNotFound(err) {
+		return "", errors.Wrap(err, "error while retrieving the integration platform")
+	}
+	if pl != nil {
+		if pl.Status.Profile != "" {
+			return pl.Status.Profile, nil
+		}
+		if pl.Spec.Profile != "" {
+			return pl.Spec.Profile, nil
+		}
+	}
+	if knative.IsEnabledInNamespace(ctx, c, binding.Namespace) {
+		return v1.TraitProfileKnative, nil
+	}
+	if pl != nil {
+		// Determine profile from cluster type
+		plProfile := platform.GetProfile(pl)
+		if plProfile != "" {
+			return plProfile, nil
+		}
+	}
+	return v1.DefaultTraitProfile, nil
+}
diff --git a/pkg/controller/kameletbinding/initialize.go b/pkg/controller/kameletbinding/initialize.go
index d3874d68d..cc9c38f16 100644
--- a/pkg/controller/kameletbinding/initialize.go
+++ b/pkg/controller/kameletbinding/initialize.go
@@ -19,17 +19,13 @@ package kameletbinding
 
 import (
 	"context"
-	"encoding/json"
 	"strings"
 
-	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
-	"github.com/apache/camel-k/pkg/util/bindings"
 	"github.com/apache/camel-k/pkg/util/kubernetes"
 	"github.com/apache/camel-k/pkg/util/patch"
 	"github.com/pkg/errors"
 	corev1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 )
@@ -52,73 +48,12 @@ func (action *initializeAction) CanHandle(kameletbinding *v1alpha1.KameletBindin
 }
 
 func (action *initializeAction) Handle(ctx context.Context, kameletbinding *v1alpha1.KameletBinding) (*v1alpha1.KameletBinding, error) {
-	controller := true
-	blockOwnerDeletion := true
-	it := v1.Integration{
-		ObjectMeta: metav1.ObjectMeta{
-			Namespace: kameletbinding.Namespace,
-			Name:      kameletbinding.Name,
-			OwnerReferences: []metav1.OwnerReference{
-				{
-					APIVersion:         kameletbinding.APIVersion,
-					Kind:               kameletbinding.Kind,
-					Name:               kameletbinding.Name,
-					UID:                kameletbinding.UID,
-					Controller:         &controller,
-					BlockOwnerDeletion: &blockOwnerDeletion,
-				},
-			},
-		},
-	}
-	// start from the integration spec defined in the binding
-	if kameletbinding.Spec.Integration != nil {
-		it.Spec = *kameletbinding.Spec.Integration.DeepCopy()
-	}
-
-	bindingContext := bindings.BindingContext{
-		Ctx:       ctx,
-		Client:    action.client,
-		Namespace: it.Namespace,
-	}
-
-	from, err := bindings.Translate(bindingContext, v1alpha1.EndpointTypeSource, kameletbinding.Spec.Source)
-	if err != nil {
-		return nil, errors.Wrap(err, "could not determine source URI")
-	}
-	to, err := bindings.Translate(bindingContext, v1alpha1.EndpointTypeSink, kameletbinding.Spec.Sink)
-	if err != nil {
-		return nil, errors.Wrap(err, "could not determine sink URI")
-	}
-
-	if len(from.Traits) > 0 || len(to.Traits) > 0 {
-		if it.Spec.Traits == nil {
-			it.Spec.Traits = make(map[string]v1.TraitSpec)
-		}
-		for k, v := range from.Traits {
-			it.Spec.Traits[k] = v
-		}
-		for k, v := range to.Traits {
-			it.Spec.Traits[k] = v
-		}
-	}
-
-	flow := map[string]interface{}{
-		"from": map[string]interface{}{
-			"uri": from.URI,
-			"steps": []map[string]interface{}{
-				{
-					"to": to.URI,
-				},
-			},
-		},
-	}
-	encodedFlow, err := json.Marshal(flow)
+	it, err := createIntegrationFor(ctx, action.client, kameletbinding)
 	if err != nil {
 		return nil, err
 	}
-	it.Spec.Flows = append(it.Spec.Flows, v1.Flow{RawMessage: encodedFlow})
 
-	if err := kubernetes.ReplaceResource(ctx, action.client, &it); err != nil {
+	if err := kubernetes.ReplaceResource(ctx, action.client, it); err != nil {
 		return nil, errors.Wrap(err, "could not create integration for kamelet binding")
 	}
 
diff --git a/pkg/controller/kameletbinding/kamelet_binding_controller.go b/pkg/controller/kameletbinding/kamelet_binding_controller.go
index 459c69ca6..dbebfc35a 100644
--- a/pkg/controller/kameletbinding/kamelet_binding_controller.go
+++ b/pkg/controller/kameletbinding/kamelet_binding_controller.go
@@ -21,6 +21,7 @@ import (
 	"context"
 	"time"
 
+	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
 	"github.com/apache/camel-k/pkg/client"
 	camelevent "github.com/apache/camel-k/pkg/event"
@@ -84,6 +85,15 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
 		return err
 	}
 
+	// Watch Integration to propagate changes downstream
+	err = c.Watch(&source.Kind{Type: &v1.Integration{}}, &handler.EnqueueRequestForOwner{
+		OwnerType:    &v1alpha1.KameletBinding{},
+		IsController: false,
+	})
+	if err != nil {
+		return err
+	}
+
 	return nil
 }
 
diff --git a/pkg/controller/kameletbinding/monitor.go b/pkg/controller/kameletbinding/monitor.go
index 9980dc515..9cd768ae3 100644
--- a/pkg/controller/kameletbinding/monitor.go
+++ b/pkg/controller/kameletbinding/monitor.go
@@ -19,12 +19,14 @@ package kameletbinding
 
 import (
 	"context"
+
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
+	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
 	"github.com/pkg/errors"
 	corev1 "k8s.io/api/core/v1"
+	"k8s.io/apimachinery/pkg/api/equality"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"sigs.k8s.io/controller-runtime/pkg/client"
-
-	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
 )
 
 // NewMonitorAction returns an action that monitors the kamelet binding after it's fully initialized
@@ -52,10 +54,41 @@ func (action *monitorAction) Handle(ctx context.Context, kameletbinding *v1alpha
 		Name:      kameletbinding.Name,
 	}
 	it := v1.Integration{}
-	if err := action.client.Get(ctx, key, &it); err != nil {
+	if err := action.client.Get(ctx, key, &it); err != nil && k8serrors.IsNotFound(err) {
+		target := kameletbinding.DeepCopy()
+		// Rebuild the integration
+		target.Status.Phase = v1alpha1.KameletBindingPhaseNone
+		target.Status.SetCondition(
+			v1alpha1.KameletBindingConditionReady,
+			corev1.ConditionFalse,
+			"",
+			"",
+		)
+		return target, nil
+	} else if err != nil {
 		return nil, errors.Wrapf(err, "could not load integration for KameletBinding %q", kameletbinding.Name)
 	}
 
+	// Check if the integration needs to be changed
+	expected, err := createIntegrationFor(ctx, action.client, kameletbinding)
+	if err != nil {
+		return nil, err
+	}
+
+	if !equality.Semantic.DeepDerivative(expected.Spec, it.Spec) {
+		// KameletBinding has changed and needs rebuild
+		target := kameletbinding.DeepCopy()
+		// Rebuild the integration
+		target.Status.Phase = v1alpha1.KameletBindingPhaseNone
+		target.Status.SetCondition(
+			v1alpha1.KameletBindingConditionReady,
+			corev1.ConditionFalse,
+			"",
+			"",
+		)
+		return target, nil
+	}
+
 	// Map integration phases to KameletBinding phases
 	target := kameletbinding.DeepCopy()
 	if it.Status.Phase == v1.IntegrationPhaseRunning {
diff --git a/pkg/util/bindings/api.go b/pkg/util/bindings/api.go
index f07d8cca7..05ea12328 100644
--- a/pkg/util/bindings/api.go
+++ b/pkg/util/bindings/api.go
@@ -20,6 +20,7 @@ package bindings
 
 import (
 	"context"
+
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
 	"github.com/apache/camel-k/pkg/client"
@@ -53,4 +54,5 @@ type BindingContext struct {
 	Ctx       context.Context
 	Client    client.Client
 	Namespace string
+	Profile   v1.TraitProfile
 }
diff --git a/pkg/util/bindings/knative_ref.go b/pkg/util/bindings/knative_ref.go
index e3ad420c2..07e945478 100644
--- a/pkg/util/bindings/knative_ref.go
+++ b/pkg/util/bindings/knative_ref.go
@@ -19,6 +19,7 @@ package bindings
 
 import (
 	"encoding/json"
+	"errors"
 	"fmt"
 	"net/url"
 
@@ -69,12 +70,21 @@ func (k KnativeRefBindingProvider) Translate(ctx BindingContext, endpointType v1
 
 	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 eventType, ok := props["type"]; ok {
 			// consume prop
 			delete(props, "type")
 			serviceURI = fmt.Sprintf("knative:%s/%s", *serviceType, eventType)
 		} else {
-			serviceURI = fmt.Sprintf("knative:%s", *serviceType)
+			if endpointType == v1alpha1.EndpointTypeSink {
+				// Allowing no event type, but it can fail. See https://github.com/apache/camel-k-runtime/issues/536
+				serviceURI = fmt.Sprintf("knative:%s", *serviceType)
+			} else {
+				return nil, errors.New(`property "type" must be provided when reading from the Broker`)
+			}
 		}
 	} else {
 		serviceURI = fmt.Sprintf("knative:%s/%s", *serviceType, url.PathEscape(e.Ref.Name))
diff --git a/pkg/util/bindings/knative_uri.go b/pkg/util/bindings/knative_uri.go
index 88bdd0c53..01cafa542 100644
--- a/pkg/util/bindings/knative_uri.go
+++ b/pkg/util/bindings/knative_uri.go
@@ -40,6 +40,10 @@ func (k KnativeURIBindingProvider) Translate(ctx BindingContext, endpointType v1
 		// works only on uris
 		return nil, nil
 	}
+	if ctx.Profile != v1.TraitProfileKnative {
+		// use cloudevent binding only in Knative trait profile
+		return nil, nil
+	}
 	if !strings.HasPrefix(*e.URI, "http:") && !strings.HasPrefix(*e.URI, "https:") {
 		// only translates http/https uri to Knative calls
 		return nil, nil
diff --git a/pkg/util/knative/knative.go b/pkg/util/knative/knative.go
index 2a45fb1fe..4f506ea3a 100644
--- a/pkg/util/knative/knative.go
+++ b/pkg/util/knative/knative.go
@@ -80,7 +80,7 @@ func CreateTrigger(brokerReference corev1.ObjectReference, serviceName string, e
 		},
 		ObjectMeta: metav1.ObjectMeta{
 			Namespace: brokerReference.Namespace,
-			Name:      brokerReference.Name + "-" + serviceName + "-" + eventType,
+			Name:      brokerReference.Name + "-" + serviceName + "-" + kubernetesutils.SanitizeLabel(eventType),
 		},
 		Spec: eventing.TriggerSpec{
 			Filter: &eventing.TriggerFilter{
diff --git a/pkg/util/knative/uri.go b/pkg/util/knative/uri.go
index 3df11d6e0..5dd6e6958 100644
--- a/pkg/util/knative/uri.go
+++ b/pkg/util/knative/uri.go
@@ -26,14 +26,13 @@ import (
 	v1 "k8s.io/api/core/v1"
 )
 
-var uriRegexp = regexp.MustCompile(`^knative:[/]*(channel|endpoint|event)(?:$|/([A-Za-z0-9.-]+)(?:[/?].*|$))`)
+var uriRegexp = regexp.MustCompile(`^knative:[/]*(channel|endpoint|event)(?:[?].*|$|/([A-Za-z0-9.-]+)(?:[/?].*|$))`)
 var plainNameRegexp = regexp.MustCompile(`^[A-Za-z0-9.-]+$`)
 
 const (
-	paramAPIVersion       = "apiVersion"
-	paramKind             = "kind"
-	paramBrokerName       = "brokerName"
-	paramBrokerAPIVersion = "brokerApiVersion"
+	paramAPIVersion = "apiVersion"
+	paramKind       = "kind"
+	paramBrokerName = "name"
 )
 
 // FilterURIs returns all Knative URIs of the given type from a slice
@@ -62,7 +61,7 @@ func ExtractObjectReference(uri string) (v1.ObjectReference, error) {
 		if name == "" {
 			name = "default"
 		}
-		apiVersion := uriutils.GetQueryParameter(uri, paramBrokerAPIVersion)
+		apiVersion := uriutils.GetQueryParameter(uri, paramAPIVersion)
 		return v1.ObjectReference{
 			Name:       name,
 			APIVersion: apiVersion,


Test patch:
diff --git a/addons/strimzi/strimzi_test.go b/addons/strimzi/strimzi_test.go
index 627283cca..13fd4ed2b 100644
--- a/addons/strimzi/strimzi_test.go
+++ b/addons/strimzi/strimzi_test.go
@@ -22,6 +22,7 @@ import (
 	"encoding/json"
 	"github.com/apache/camel-k/addons/strimzi/duck/v1beta1"
 	"github.com/apache/camel-k/addons/strimzi/duck/v1beta1/client/internalclientset/fake"
+	camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
 	"github.com/apache/camel-k/pkg/util/bindings"
 	"github.com/apache/camel-k/pkg/util/test"
@@ -42,6 +43,7 @@ func TestStrimziDirect(t *testing.T) {
 		Ctx:       ctx,
 		Client:    client,
 		Namespace: "test",
+		Profile:   camelv1.TraitProfileKubernetes,
 	}
 
 	endpoint := v1alpha1.Endpoint{
@@ -102,6 +104,7 @@ func TestStrimziLookup(t *testing.T) {
 	bindingContext := bindings.BindingContext{
 		Ctx:       ctx,
 		Namespace: "test",
+		Profile:   camelv1.TraitProfileKubernetes,
 	}
 
 	endpoint := v1alpha1.Endpoint{
diff --git a/e2e/knative/files/display.groovy b/e2e/knative/files/display.groovy
new file mode 100644
index 000000000..43a595f6c
--- /dev/null
+++ b/e2e/knative/files/display.groovy
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+from('knative:channel/messages')
+    .convertBodyTo(String.class)
+    .to('log:info?showAll=false')
diff --git a/e2e/knative/kamelet_test.go b/e2e/knative/kamelet_test.go
new file mode 100644
index 000000000..cfc90f369
--- /dev/null
+++ b/e2e/knative/kamelet_test.go
@@ -0,0 +1,60 @@
+// +build integration
+
+// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration"
+
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package knative
+
+import (
+	"testing"
+
+	. "github.com/apache/camel-k/e2e/support"
+	camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
+	. "github.com/onsi/gomega"
+	v1 "k8s.io/api/core/v1"
+	messaging "knative.dev/eventing/pkg/apis/messaging/v1beta1"
+)
+
+// Test that kamelet binding can be changed and changes propagated to integrations
+func TestKameletChange(t *testing.T) {
+
+	WithNewTestNamespace(t, func(ns string) {
+		RegisterTestingT(t)
+
+		Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
+		Expect(CreateTimerKamelet(ns, "timer-source")()).Should(BeNil())
+		Expect(CreateKnativeChannelv1Beta1(ns, "messages")()).Should(BeNil())
+		Expect(Kamel("run", "-n", ns, "files/display.groovy", "-w").Execute()).Should(BeNil())
+		ref := v1.ObjectReference{
+			Kind:       "InMemoryChannel",
+			Name:       "messages",
+			APIVersion: messaging.SchemeGroupVersion.String(),
+		}
+		Expect(BindKameletTo(ns, "timer-binding", "timer-source", ref, map[string]string{"message": "message is Hello"})()).Should(BeNil())
+		Eventually(IntegrationPodPhase(ns, "timer-binding"), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+		Eventually(IntegrationCondition(ns, "timer-binding", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue))
+		Eventually(IntegrationLogs(ns, "display"), TestTimeoutShort).Should(ContainSubstring("message is Hello"))
+
+		Expect(BindKameletTo(ns, "timer-binding", "timer-source", ref, map[string]string{"message": "message is Hi"})()).Should(BeNil())
+		Eventually(IntegrationPodPhase(ns, "timer-binding"), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+		Eventually(IntegrationCondition(ns, "timer-binding", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue))
+		Eventually(IntegrationLogs(ns, "display"), TestTimeoutShort).Should(ContainSubstring("message is Hi"))
+	})
+
+}
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index c070c87c5..e57260202 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -23,6 +23,7 @@ package support
 
 import (
 	"context"
+	"encoding/json"
 	"errors"
 	"fmt"
 	"io"
@@ -33,9 +34,10 @@ import (
 	"testing"
 	"time"
 
+	"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+	"github.com/apache/camel-k/pkg/util/kubernetes"
 	"github.com/google/uuid"
 	"github.com/onsi/gomega"
-
 	"github.com/spf13/cobra"
 	appsv1 "k8s.io/api/apps/v1"
 	"k8s.io/api/batch/v1beta1"
@@ -890,6 +892,92 @@ func CreateKnativeChannelv1Beta1(ns string, name string) func() error {
 	}
 }
 
+/*
+	Kamelets
+*/
+
+func CreateTimerKamelet(ns string, name string) func() error {
+	return func() error {
+		kamelet := v1alpha1.Kamelet{
+			ObjectMeta: metav1.ObjectMeta{
+				Namespace: ns,
+				Name:      name,
+			},
+			Spec: v1alpha1.KameletSpec{
+				Definition: v1alpha1.JSONSchemaProps{
+					Properties: map[string]v1alpha1.JSONSchemaProps{
+						"message": {
+							Type: "string",
+						},
+					},
+				},
+				Flow: asFlow(map[string]interface{}{
+					"from": map[string]interface{}{
+						"uri": "timer:tick",
+						"steps": []map[string]interface{}{
+							{
+								"set-body": map[string]interface{}{
+									"constant": "{{message}}",
+								},
+							},
+							{
+								"to": "kamelet:sink",
+							},
+						},
+					},
+				}),
+			},
+		}
+		return TestClient.Create(TestContext, &kamelet)
+	}
+}
+
+func BindKameletTo(ns, name, from string, to corev1.ObjectReference, properties map[string]string) func() error {
+	return func() error {
+		kb := v1alpha1.KameletBinding{
+			ObjectMeta: metav1.ObjectMeta{
+				Namespace: ns,
+				Name:      name,
+			},
+			Spec: v1alpha1.KameletBindingSpec{
+				Source: v1alpha1.Endpoint{
+					Ref: &corev1.ObjectReference{
+						Kind:       "Kamelet",
+						APIVersion: v1alpha1.SchemeGroupVersion.String(),
+						Name:       from,
+					},
+					Properties: asEndpointProperties(properties),
+				},
+				Sink: v1alpha1.Endpoint{
+					Ref:        &to,
+					Properties: asEndpointProperties(map[string]string{}),
+				},
+			},
+		}
+		return kubernetes.ReplaceResource(TestContext, TestClient, &kb)
+	}
+}
+
+func asFlow(source map[string]interface{}) *v1.Flow {
+	bytes, err := json.Marshal(source)
+	if err != nil {
+		panic(err)
+	}
+	return &v1.Flow{
+		RawMessage: bytes,
+	}
+}
+
+func asEndpointProperties(props map[string]string) v1alpha1.EndpointProperties {
+	bytes, err := json.Marshal(props)
+	if err != nil {
+		panic(err)
+	}
+	return v1alpha1.EndpointProperties{
+		RawMessage: bytes,
+	}
+}
+
 /*
 	Namespace testing functions
 */
diff --git a/e2e/yaks/common/kamelet-binding-broker/kamelet.feature b/e2e/yaks/common/kamelet-binding-broker/kamelet.feature
new file mode 100644
index 000000000..4fb1de32f
--- /dev/null
+++ b/e2e/yaks/common/kamelet-binding-broker/kamelet.feature
@@ -0,0 +1,5 @@
+Feature: Camel K can bind Kamelets to the broker
+
+  Scenario: Sending event to the broker with KameletBinding
+    Given integration logger-sink-binding is running
+    Then integration logger-sink-binding should print message: Hello Custom Event
diff --git a/e2e/yaks/common/kamelet-binding-broker/logger-sink-binding.yaml b/e2e/yaks/common/kamelet-binding-broker/logger-sink-binding.yaml
new file mode 100644
index 000000000..6b0c0a04c
--- /dev/null
+++ b/e2e/yaks/common/kamelet-binding-broker/logger-sink-binding.yaml
@@ -0,0 +1,34 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: logger-sink-binding
+spec:
+  source:
+    ref:
+      kind: Broker
+      apiVersion: eventing.knative.dev/v1beta1
+      name: default
+    properties:
+      type: custom-type
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: logger-sink
diff --git a/e2e/yaks/common/kamelet-binding-broker/logger-sink.kamelet.yaml b/e2e/yaks/common/kamelet-binding-broker/logger-sink.kamelet.yaml
new file mode 100644
index 000000000..edc710f47
--- /dev/null
+++ b/e2e/yaks/common/kamelet-binding-broker/logger-sink.kamelet.yaml
@@ -0,0 +1,43 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: logger-sink
+  label:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "Logger"
+    description: "Logs the received payload of each incoming event"
+    properties:
+      prefix:
+        title: Prefix
+        description: The prefix to prepend to the logged message
+        type: string
+        default: "message: "
+  types:
+    in:
+      mediaType: text/plain
+    out:
+      mediaType: text/plain
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+        - log: "{{prefix}}${body}"
diff --git a/e2e/yaks/common/kamelet-binding-broker/timer-source-binding.yaml b/e2e/yaks/common/kamelet-binding-broker/timer-source-binding.yaml
new file mode 100644
index 000000000..317ab02e1
--- /dev/null
+++ b/e2e/yaks/common/kamelet-binding-broker/timer-source-binding.yaml
@@ -0,0 +1,37 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: timer-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: timer-source
+    properties:
+      message: Hello Custom Event
+      period: 1000
+  sink:
+    ref:
+      kind: Broker
+      apiVersion: eventing.knative.dev/v1beta1
+      name: default
+    properties:
+      type: custom-type
diff --git a/e2e/yaks/common/kamelet-binding-broker/timer-source.kamelet.yaml b/e2e/yaks/common/kamelet-binding-broker/timer-source.kamelet.yaml
new file mode 100644
index 000000000..dc64b5723
--- /dev/null
+++ b/e2e/yaks/common/kamelet-binding-broker/timer-source.kamelet.yaml
@@ -0,0 +1,54 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: timer-source
+  label:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Timer"
+    description: "Produces periodic events with a custom payload"
+    required:
+      - message
+    properties:
+      period:
+        title: Period
+        description: The time interval between two events
+        type: integer
+        default: 1000
+      message:
+        title: Message
+        description: The message to generate
+        type: string
+  types:
+    out:
+      mediaType: application/json
+      schema:
+        id: text.camel.apache.org
+        type: string
+  flow:
+    from:
+      uri: timer:tick
+      parameters:
+        period: "{{period}}"
+      steps:
+        - set-body:
+            constant: "{{message}}"
+        - to: "kamelet:sink"
diff --git a/e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml b/e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml
new file mode 100644
index 000000000..e8414f85c
--- /dev/null
+++ b/e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml
@@ -0,0 +1,36 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+config:
+  namespace:
+    temporary: true
+pre:
+- name: installation
+  run: |
+    # One of the two labels should work
+    oc label namespace $YAKS_NAMESPACE eventing.knative.dev/injection=enabled
+    oc label namespace $YAKS_NAMESPACE knative-eventing-injection=enabled
+
+    kamel install -n $YAKS_NAMESPACE
+
+    kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE
+    kubectl apply -f logger-sink.kamelet.yaml -n $YAKS_NAMESPACE
+
+    kubectl apply -f timer-source-binding.yaml -n $YAKS_NAMESPACE
+    kubectl apply -f logger-sink-binding.yaml -n $YAKS_NAMESPACE
+    kubectl wait kameletbinding timer-source-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
+    kubectl wait kameletbinding logger-sink-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
diff --git a/pkg/util/bindings/bindings_test.go b/pkg/util/bindings/bindings_test.go
index 385febf5a..266402ab5 100644
--- a/pkg/util/bindings/bindings_test.go
+++ b/pkg/util/bindings/bindings_test.go
@@ -36,6 +36,7 @@ func TestBindings(t *testing.T) {
 	testcases := []struct {
 		endpointType v1alpha1.EndpointType
 		endpoint     v1alpha1.Endpoint
+		profile      camelv1.TraitProfile
 		uri          string
 		traits       map[string]camelv1.TraitSpec
 	}{
@@ -157,6 +158,14 @@ func TestBindings(t *testing.T) {
 				"configuration": asKnativeConfig("https://myurl/hey"),
 			}),
 		},
+		{
+			endpointType: v1alpha1.EndpointTypeSink,
+			endpoint: v1alpha1.Endpoint{
+				URI: asStringPointer("https://myurl/hey"),
+			},
+			profile: camelv1.TraitProfileKubernetes,
+			uri:     "https://myurl/hey",
+		},
 		{
 			endpointType: v1alpha1.EndpointTypeSink,
 			endpoint: v1alpha1.Endpoint{
@@ -174,10 +183,16 @@ func TestBindings(t *testing.T) {
 			client, err := test.NewFakeClient()
 			assert.NoError(t, err)
 
+			profile := tc.profile
+			if profile == "" {
+				profile = camelv1.TraitProfileKnative
+			}
+
 			bindingContext := BindingContext{
 				Ctx:       ctx,
 				Client:    client,
 				Namespace: "test",
+				Profile:   profile,
 			}
 
 			binding, err := Translate(bindingContext, tc.endpointType, tc.endpoint)
diff --git a/pkg/util/knative/apis_test.go b/pkg/util/knative/apis_test.go
index 3f1730f19..fd1331dee 100644
--- a/pkg/util/knative/apis_test.go
+++ b/pkg/util/knative/apis_test.go
@@ -134,7 +134,7 @@ func TestAPIs(t *testing.T) {
 		Name:       "default",
 	}, refs[0])
 
-	ref, err = ExtractObjectReference("knative:event/ciao?brokerApiVersion=xxx")
+	ref, err = ExtractObjectReference("knative:event/ciao?apiVersion=xxx")
 	assert.Nil(t, err)
 	refs = FillMissingReferenceData(knative.CamelServiceTypeEvent, ref)
 	checkValidRefs(t, refs)
@@ -144,7 +144,7 @@ func TestAPIs(t *testing.T) {
 		Name:       "default",
 	}, refs[0])
 
-	ref, err = ExtractObjectReference("knative:event/ciao?brokerName=aaa")
+	ref, err = ExtractObjectReference("knative:event/ciao?name=aaa")
 	assert.Nil(t, err)
 	refs = FillMissingReferenceData(knative.CamelServiceTypeEvent, ref)
 	checkValidRefs(t, refs)
diff --git a/pkg/util/knative/uri_test.go b/pkg/util/knative/uri_test.go
index ece603f88..995127889 100644
--- a/pkg/util/knative/uri_test.go
+++ b/pkg/util/knative/uri_test.go
@@ -74,7 +74,7 @@ func TestChannelUri(t *testing.T) {
 		Name:       "ciao",
 	}, ref)
 
-	ref, err = ExtractObjectReference("knative://event/chuck?&brokerApiVersion=eventing.knative.dev/v1beta1&brokerName=broker2")
+	ref, err = ExtractObjectReference("knative://event/chuck?&apiVersion=eventing.knative.dev/v1beta1&name=broker2")
 	assert.Nil(t, err)
 	assert.Equal(t, v1.ObjectReference{
 		APIVersion: "eventing.knative.dev/v1beta1",
@@ -88,6 +88,14 @@ func TestChannelUri(t *testing.T) {
 		Name: "default",
 		Kind: "Broker",
 	}, ref)
+
+	ref, err = ExtractObjectReference("knative://event?&apiVersion=eventing.knative.dev/v1beta13&brokxerName=broker2")
+	assert.Nil(t, err)
+	assert.Equal(t, v1.ObjectReference{
+		APIVersion: "eventing.knative.dev/v1beta13",
+		Name:       "default",
+		Kind:       "Broker",
+	}, ref)
 }
 
 func TestNormalizeToUri(t *testing.T) {