You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/10/16 08:33:16 UTC
[camel-k] branch master updated: fix #1008: implement knative
broker/trigger model and explicit targets
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push:
new 1879bce fix #1008: implement knative broker/trigger model and explicit targets
1879bce is described below
commit 1879bcef4e3891ab22f3e17c27c2c9fb456d8221
Author: nferraro <ni...@gmail.com>
AuthorDate: Mon Oct 14 01:27:34 2019 +0200
fix #1008: implement knative broker/trigger model and explicit targets
---
build/maven/pom-runtime.xml | 21 +-
...=> camel-catalog-3.0.0-RC1-1.0.5-SNAPSHOT.yaml} | 1498 +------------
deploy/resources.go | 2285 ++++++++++++++++++++
docs/modules/ROOT/pages/traits.adoc | 14 +-
e2e/build_test.go | 2 +-
e2e/files/knativeevt1.groovy | 24 +
e2e/files/knativeevt2.groovy | 22 +
e2e/knative_test.go | 15 +
e2e/test_support.go | 64 +-
pkg/apis/camel/v1alpha1/knative/types.go | 44 +-
pkg/apis/camel/v1alpha1/knative/types_support.go | 37 +-
pkg/client/fastmapper.go | 7 +-
pkg/trait/knative.go | 406 ++--
pkg/trait/knative_test.go | 31 +-
pkg/util/defaults/defaults.go | 4 +-
pkg/util/knative/apis.go | 155 ++
pkg/util/knative/apis_test.go | 165 ++
pkg/util/knative/knative.go | 71 +-
pkg/util/knative/uri.go | 84 +-
pkg/util/knative/uri_test.go | 88 +-
pkg/util/kubernetes/collection.go | 22 +
script/Makefile | 4 +-
22 files changed, 3208 insertions(+), 1855 deletions(-)
diff --git a/build/maven/pom-runtime.xml b/build/maven/pom-runtime.xml
index 2768b43..2c99d21 100644
--- a/build/maven/pom-runtime.xml
+++ b/build/maven/pom-runtime.xml
@@ -102,33 +102,18 @@
<artifactId>camel-k-loader-yaml</artifactId>
<version>${runtime.version}</version>
</dependency>
-
- <!-- legacy -->
<dependency>
<groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-groovy</artifactId>
+ <artifactId>camel-k-loader-knative</artifactId>
<version>${runtime.version}</version>
</dependency>
+
+ <!-- legacy -->
<dependency>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-runtime-health</artifactId>
<version>${runtime.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-jvm</artifactId>
- <version>${runtime.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-kotlin</artifactId>
- <version>${runtime.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-runtime-yaml</artifactId>
- <version>${runtime.version}</version>
- </dependency>
</dependencies>
<repositories>
diff --git a/deploy/resources.go b/deploy/camel-catalog-3.0.0-RC1-1.0.5-SNAPSHOT.yaml
similarity index 56%
copy from deploy/resources.go
copy to deploy/camel-catalog-3.0.0-RC1-1.0.5-SNAPSHOT.yaml
index 5b7c171..af5b939 100644
--- a/deploy/resources.go
+++ b/deploy/camel-catalog-3.0.0-RC1-1.0.5-SNAPSHOT.yaml
@@ -1,180 +1,3 @@
-/*
-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.
-*/
-
-// Code generated by script/embed_resources.sh. DO NOT EDIT.
-
-package deploy
-
-var Resources map[string]string
-
-func init() {
- Resources = make(map[string]string)
-
- Resources["builder-role-binding.yaml"] =
- `
-kind: RoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-builder
- labels:
- app: "camel-k"
-subjects:
-- kind: ServiceAccount
- name: camel-k-builder
-roleRef:
- kind: Role
- name: camel-k-builder
- apiGroup: rbac.authorization.k8s.io
-
-`
- Resources["builder-role-kubernetes.yaml"] =
- `
-kind: Role
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-builder
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - camel.apache.org
- resources:
- - "*"
- verbs:
- - "*"
-- apiGroups:
- - ""
- resources:
- - pods
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- resources:
- - events
- - configmaps
- verbs:
- - get
- - list
- - watch
-
-`
- Resources["builder-role-openshift.yaml"] =
- `
-kind: Role
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-builder
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - camel.apache.org
- resources:
- - "*"
- verbs:
- - "*"
-- apiGroups:
- - ""
- resources:
- - pods
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- resources:
- - events
- - configmaps
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - ""
- - "build.openshift.io"
- resources:
- - buildconfigs
- - buildconfigs/webhooks
- - builds
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - "image.openshift.io"
- resources:
- - imagestreamimages
- - imagestreammappings
- - imagestreams
- - imagestreams/secrets
- - imagestreamtags
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - build.openshift.io
- attributeRestrictions: null
- resources:
- - buildconfigs/instantiate
- - buildconfigs/instantiatebinary
- - builds/clone
- verbs:
- - create
-
-`
- Resources["builder-service-account.yaml"] =
- `
-apiVersion: v1
-kind: ServiceAccount
-metadata:
- name: camel-k-builder
- labels:
- app: "camel-k"
-
-`
- Resources["camel-catalog-3.0.0-RC1-1.0.4.yaml"] =
- `
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -195,15 +18,15 @@ metadata:
apiVersion: camel.apache.org/v1alpha1
kind: CamelCatalog
metadata:
- name: camel-catalog-3.0.0-rc1-1.0.4
+ name: camel-catalog-3.0.0-rc1-1.0.5-snapshot
labels:
app: camel-k
camel.apache.org/catalog.version: 3.0.0-RC1
camel.apache.org/catalog.loader.version: 3.0.0-RC1
- camel.apache.org/runtime.version: 1.0.4
+ camel.apache.org/runtime.version: 1.0.5-SNAPSHOT
spec:
version: 3.0.0-RC1
- runtimeVersion: 1.0.4
+ runtimeVersion: 1.0.5-SNAPSHOT
artifacts:
camel-activemq:
groupId: org.apache.camel
@@ -1419,6 +1242,8 @@ spec:
- groupId: org.apache.camel.k
artifactId: camel-k-loader-knative
- groupId: org.apache.camel.k
+ artifactId: camel-knative-api
+ - groupId: org.apache.camel.k
artifactId: camel-knative
- groupId: org.apache.camel.k
artifactId: camel-knative-http
@@ -1471,6 +1296,10 @@ spec:
dependencies:
- groupId: org.apache.camel
artifactId: camel-cloud
+ - groupId: org.apache.camel.k
+ artifactId: camel-knative-api
+ - groupId: org.apache.camel.k
+ artifactId: camel-knative-http
camel-kubernetes:
groupId: org.apache.camel
artifactId: camel-kubernetes
@@ -2432,1312 +2261,3 @@ spec:
- id: zookeeper-master
http: false
passive: false
-
-`
- Resources["crd-build.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- name: builds.camel.apache.org
- labels:
- app: "camel-k"
-spec:
- group: camel.apache.org
- scope: Namespaced
- version: v1alpha1
- names:
- kind: Build
- listKind: BuildList
- plural: builds
- singular: build
- subresources:
- status: {}
- additionalPrinterColumns:
- - name: Phase
- type: string
- description: The build phase
- JSONPath: .status.phase
- - name: Age
- type: date
- description: The time at which the build was last (re-)started
- JSONPath: .status.startedAt
- - name: Duration
- type: string
- # Change when CRD uses OpenAPI spec v3
- # https://github.com/OAI/OpenAPI-Specification/issues/845
- # format: duration
- description: The build last execution duration
- JSONPath: .status.duration
- - name: Attempts
- type: integer
- description: The number of execution attempts
- JSONPath: .status.failure.recovery.attempt
-
-`
- Resources["crd-camel-catalog.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- name: camelcatalogs.camel.apache.org
- labels:
- app: "camel-k"
-spec:
- group: camel.apache.org
- names:
- kind: CamelCatalog
- listKind: CamelCatalogList
- plural: camelcatalogs
- singular: camelcatalog
- shortNames:
- - cc
- scope: Namespaced
- version: v1alpha1
- subresources:
- status: {}
- additionalPrinterColumns:
- - name: Camel Version
- type: string
- description: The Camel version
- JSONPath: .spec.version
- - name: Runtime Version
- type: string
- description: The Camel K Runtime version
- JSONPath: .spec.runtimeVersion
-
-
-`
- Resources["crd-integration-kit.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- name: integrationkits.camel.apache.org
- labels:
- app: "camel-k"
-spec:
- group: camel.apache.org
- scope: Namespaced
- version: v1alpha1
- subresources:
- status: {}
- names:
- kind: IntegrationKit
- listKind: IntegrationKitList
- plural: integrationkits
- singular: integrationkit
- shortNames:
- - ik
- additionalPrinterColumns:
- - name: Phase
- type: string
- description: The IntegrationKit phase
- JSONPath: .status.phase
- - name: Type
- type: string
- description: The IntegrationKit type
- JSONPath: .metadata.labels.camel\.apache\.org\/kit\.type
- - name: Image
- type: string
- description: The IntegrationKit image
- JSONPath: .status.image
-
-`
- Resources["crd-integration-platform.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- name: integrationplatforms.camel.apache.org
- labels:
- app: "camel-k"
-spec:
- group: camel.apache.org
- scope: Namespaced
- version: v1alpha1
- subresources:
- status: {}
- names:
- kind: IntegrationPlatform
- listKind: IntegrationPlatformList
- plural: integrationplatforms
- singular: integrationplatform
- shortNames:
- - ip
- additionalPrinterColumns:
- - name: Phase
- type: string
- description: The IntegrationPlatform phase
- JSONPath: .status.phase
-
-`
- Resources["crd-integration.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- name: integrations.camel.apache.org
- labels:
- app: "camel-k"
-spec:
- group: camel.apache.org
- scope: Namespaced
- version: v1alpha1
- subresources:
- status: {}
- scale:
- specReplicasPath: .spec.replicas
- statusReplicasPath: .status.replicas
- names:
- kind: Integration
- listKind: IntegrationList
- plural: integrations
- singular: integration
- shortNames:
- - it
- additionalPrinterColumns:
- - name: Phase
- type: string
- description: The integration phase
- JSONPath: .status.phase
- - name: Kit
- type: string
- description: The integration kit
- JSONPath: .status.kit
- - name: Replicas
- type: integer
- description: The number of pods
- JSONPath: .status.replicas
-
-`
- Resources["cr-example.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: Integration
-metadata:
- name: example
-spec:
- sources:
- - content: |-
- // This is Camel K Groovy example route
-
- rnd = new Random()
-
- from('timer:groovy?period=1s')
- .routeId('groovy')
- .setBody()
- .constant('Hello Camel K!')
- .process {
- it.in.headers['RandomValue'] = rnd.nextInt()
- }
- .to('log:info?showHeaders=true')
- name: routes.groovy
-`
- Resources["operator-deployment.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: apps/v1
-kind: Deployment
-metadata:
- name: camel-k-operator
- labels:
- app: "camel-k"
- camel.apache.org/component: operator
-spec:
- replicas: 1
- strategy:
- type: Recreate
- selector:
- matchLabels:
- name: camel-k-operator
- template:
- metadata:
- labels:
- name: camel-k-operator
- camel.apache.org/component: operator
- app: "camel-k"
- spec:
- serviceAccountName: camel-k-operator
- containers:
- - name: camel-k-operator
- image: docker.io/apache/camel-k:1.0.0-M3-SNAPSHOT
- command:
- - kamel
- - operator
- imagePullPolicy: IfNotPresent
- env:
- - name: WATCH_NAMESPACE
- valueFrom:
- fieldRef:
- fieldPath: metadata.namespace
- - name: OPERATOR_NAME
- value: "camel-k"
- - name: POD_NAME
- valueFrom:
- fieldRef:
- fieldPath: metadata.name
- # NAMESPACE is always the operator namespace, independently from WATCH_NAMESPACE
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- fieldPath: metadata.namespace
-
-`
- Resources["operator-role-binding-knative.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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.
-# ---------------------------------------------------------------------------
-
-kind: RoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-operator-knative
- labels:
- app: "camel-k"
-subjects:
-- kind: ServiceAccount
- name: camel-k-operator
-roleRef:
- kind: Role
- name: camel-k-operator-knative
- apiGroup: rbac.authorization.k8s.io
-
-`
- Resources["operator-role-binding.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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.
-# ---------------------------------------------------------------------------
-
-kind: RoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-operator
- labels:
- app: "camel-k"
-subjects:
-- kind: ServiceAccount
- name: camel-k-operator
-roleRef:
- kind: Role
- name: camel-k-operator
- apiGroup: rbac.authorization.k8s.io
-
-`
- Resources["operator-role-knative.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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.
-# ---------------------------------------------------------------------------
-
-kind: Role
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-operator-knative
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - serving.knative.dev
- resources:
- - "*"
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - eventing.knative.dev
- - messaging.knative.dev
- resources:
- - "*"
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-
-`
- Resources["operator-role-kubernetes.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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.
-# ---------------------------------------------------------------------------
-
-kind: Role
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-operator
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - camel.apache.org
- resources:
- - "*"
- verbs:
- - "*"
-- apiGroups:
- - ""
- resources:
- - pods
- - services
- - endpoints
- - persistentvolumeclaims
- - configmaps
- - secrets
- - serviceaccounts
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - rbac.authorization.k8s.io
- resources:
- - roles
- - rolebindings
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- resources:
- - events
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - apps
- resources:
- - deployments
- - replicasets
- - statefulsets
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - apps
- attributeRestrictions: null
- resources:
- - daemonsets
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - extensions
- resources:
- - ingresses
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-
-`
- Resources["operator-role-olm.yaml"] =
- `
-kind: Role
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-operator
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - camel.apache.org
- resources:
- - "*"
- verbs:
- - "*"
-- apiGroups:
- - ""
- resources:
- - pods
- - services
- - endpoints
- - persistentvolumeclaims
- - configmaps
- - secrets
- - serviceaccounts
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - rbac.authorization.k8s.io
- resources:
- - roles
- - rolebindings
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- resources:
- - events
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - apps
- resources:
- - deployments
- - replicasets
- - statefulsets
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - apps
- attributeRestrictions: null
- resources:
- - daemonsets
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - extensions
- resources:
- - ingresses
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - "build.openshift.io"
- resources:
- - buildconfigs
- - buildconfigs/webhooks
- - builds
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - "image.openshift.io"
- resources:
- - imagestreamimages
- - imagestreammappings
- - imagestreams
- - imagestreams/secrets
- - imagestreamtags
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - build.openshift.io
- attributeRestrictions: null
- resources:
- - buildconfigs/instantiate
- - buildconfigs/instantiatebinary
- - builds/clone
- verbs:
- - create
-- apiGroups:
- - ""
- - "route.openshift.io"
- resources:
- - routes
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - route.openshift.io
- resources:
- - routes/custom-host
- verbs:
- - create
-- apiGroups:
- - serving.knative.dev
- resources:
- - "*"
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - eventing.knative.dev
- resources:
- - "*"
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-
-`
- Resources["operator-role-openshift.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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.
-# ---------------------------------------------------------------------------
-
-kind: Role
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
- name: camel-k-operator
- labels:
- app: "camel-k"
-rules:
-- apiGroups:
- - camel.apache.org
- resources:
- - "*"
- verbs:
- - "*"
-- apiGroups:
- - ""
- resources:
- - pods
- - services
- - endpoints
- - persistentvolumeclaims
- - configmaps
- - secrets
- - serviceaccounts
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - rbac.authorization.k8s.io
- resources:
- - roles
- - rolebindings
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- resources:
- - events
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - apps
- resources:
- - deployments
- - replicasets
- - statefulsets
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - apps
- attributeRestrictions: null
- resources:
- - daemonsets
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - ""
- - "build.openshift.io"
- resources:
- - buildconfigs
- - buildconfigs/webhooks
- - builds
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - "image.openshift.io"
- resources:
- - imagestreamimages
- - imagestreammappings
- - imagestreams
- - imagestreams/secrets
- - imagestreamtags
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - build.openshift.io
- attributeRestrictions: null
- resources:
- - buildconfigs/instantiate
- - buildconfigs/instantiatebinary
- - builds/clone
- verbs:
- - create
-- apiGroups:
- - ""
- - "route.openshift.io"
- resources:
- - routes
- verbs:
- - create
- - delete
- - deletecollection
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - ""
- - route.openshift.io
- resources:
- - routes/custom-host
- verbs:
- - create
-
-
-`
- Resources["operator-service-account.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: v1
-kind: ServiceAccount
-metadata:
- name: camel-k-operator
- labels:
- app: "camel-k"
-
-`
- Resources["platform-cr.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationPlatform
-metadata:
- name: camel-k
- labels:
- app: "camel-k"
-
-`
- Resources["platform-integration-kit-groovy.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: groovy
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
- - mvn:org.apache.camel.k/camel-k-loader-groovy
-`
- Resources["platform-integration-kit-java.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: java
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
- - mvn:org.apache.camel.k/camel-k-loader-java
-`
- Resources["platform-integration-kit-js.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: js
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
- - mvn:org.apache.camel.k/camel-k-loader-js
-`
- Resources["platform-integration-kit-knative.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: knative
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
- - mvn:org.apache.camel.k/camel-k-runtime-knative
-`
- Resources["platform-integration-kit-kotlin.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: kotlin
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
- - mvn:org.apache.camel.k/camel-k-loader-kotlin
-`
- Resources["platform-integration-kit-main.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: main
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
-`
- Resources["platform-integration-kit-xml.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: xml
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
- - mvn:org.apache.camel.k/camel-k-loader-js
-`
- Resources["platform-integration-kit-yaml.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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: IntegrationKit
-metadata:
- name: yaml
- labels:
- app: "camel-k"
- camel.apache.org/kit.created.by.kind: Operator
- camel.apache.org/kit.created.by.name: camel-k-operator
- camel.apache.org/kit.type: platform
-spec:
- dependencies:
- - mvn:org.apache.camel.k/camel-k-runtime-main
- - mvn:org.apache.camel.k/camel-k-loader-yaml
-`
- Resources["user-cluster-role.yaml"] =
- `
-# ---------------------------------------------------------------------------
-# 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.
-# ---------------------------------------------------------------------------
-
-kind: ClusterRole
-apiVersion: rbac.authorization.k8s.io/v1
-metadata:
- name: camel-k:edit
- labels:
- app: "camel-k"
- # Add these permissions to the "admin" and "edit" default roles.
- rbac.authorization.k8s.io/aggregate-to-admin: "true"
- rbac.authorization.k8s.io/aggregate-to-edit: "true"
-rules:
-- apiGroups: ["camel.apache.org"]
- resources: ["*"]
- verbs: ["*"]
-
-`
-
-}
diff --git a/deploy/resources.go b/deploy/resources.go
index 5b7c171..c320d81 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -2434,6 +2434,2273 @@ spec:
passive: false
`
+ Resources["camel-catalog-3.0.0-RC1-1.0.5-SNAPSHOT.yaml"] =
+ `
+# ---------------------------------------------------------------------------
+# 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: CamelCatalog
+metadata:
+ name: camel-catalog-3.0.0-rc1-1.0.5-snapshot
+ labels:
+ app: camel-k
+ camel.apache.org/catalog.version: 3.0.0-RC1
+ camel.apache.org/catalog.loader.version: 3.0.0-RC1
+ camel.apache.org/runtime.version: 1.0.5-SNAPSHOT
+spec:
+ version: 3.0.0-RC1
+ runtimeVersion: 1.0.5-SNAPSHOT
+ artifacts:
+ camel-activemq:
+ groupId: org.apache.camel
+ artifactId: camel-activemq
+ schemes:
+ - id: activemq
+ http: false
+ passive: false
+ camel-ahc:
+ groupId: org.apache.camel
+ artifactId: camel-ahc
+ schemes:
+ - id: ahc
+ http: true
+ passive: false
+ camel-ahc-ws:
+ groupId: org.apache.camel
+ artifactId: camel-ahc-ws
+ schemes:
+ - id: ahc-ws
+ http: true
+ passive: false
+ - id: ahc-wss
+ http: false
+ passive: false
+ camel-amqp:
+ groupId: org.apache.camel
+ artifactId: camel-amqp
+ schemes:
+ - id: amqp
+ http: false
+ passive: false
+ camel-any23:
+ groupId: org.apache.camel
+ artifactId: camel-any23
+ dataformats:
+ - any23
+ camel-apns:
+ groupId: org.apache.camel
+ artifactId: camel-apns
+ schemes:
+ - id: apns
+ http: false
+ passive: false
+ camel-as2:
+ groupId: org.apache.camel
+ artifactId: camel-as2
+ schemes:
+ - id: as2
+ http: false
+ passive: false
+ camel-asn1:
+ groupId: org.apache.camel
+ artifactId: camel-asn1
+ dataformats:
+ - asn1
+ camel-asterisk:
+ groupId: org.apache.camel
+ artifactId: camel-asterisk
+ schemes:
+ - id: asterisk
+ http: false
+ passive: false
+ camel-atmos:
+ groupId: org.apache.camel
+ artifactId: camel-atmos
+ schemes:
+ - id: atmos
+ http: false
+ passive: false
+ camel-atmosphere-websocket:
+ groupId: org.apache.camel
+ artifactId: camel-atmosphere-websocket
+ schemes:
+ - id: atmosphere-websocket
+ http: true
+ passive: false
+ camel-atom:
+ groupId: org.apache.camel
+ artifactId: camel-atom
+ schemes:
+ - id: atom
+ http: false
+ passive: false
+ camel-atomix:
+ groupId: org.apache.camel
+ artifactId: camel-atomix
+ schemes:
+ - id: atomix-map
+ http: false
+ passive: false
+ - id: atomix-messaging
+ http: false
+ passive: false
+ - id: atomix-multimap
+ http: false
+ passive: false
+ - id: atomix-queue
+ http: false
+ passive: false
+ - id: atomix-set
+ http: false
+ passive: false
+ - id: atomix-value
+ http: false
+ passive: false
+ camel-avro:
+ groupId: org.apache.camel
+ artifactId: camel-avro
+ schemes:
+ - id: avro
+ http: false
+ passive: false
+ dataformats:
+ - avro
+ camel-aws-cw:
+ groupId: org.apache.camel
+ artifactId: camel-aws-cw
+ schemes:
+ - id: aws-cw
+ http: false
+ passive: false
+ camel-aws-ddb:
+ groupId: org.apache.camel
+ artifactId: camel-aws-ddb
+ schemes:
+ - id: aws-ddb
+ http: false
+ passive: false
+ - id: aws-ddbstream
+ http: false
+ passive: false
+ camel-aws-ec2:
+ groupId: org.apache.camel
+ artifactId: camel-aws-ec2
+ schemes:
+ - id: aws-ec2
+ http: false
+ passive: false
+ camel-aws-ecs:
+ groupId: org.apache.camel
+ artifactId: camel-aws-ecs
+ schemes:
+ - id: aws-ecs
+ http: false
+ passive: false
+ camel-aws-eks:
+ groupId: org.apache.camel
+ artifactId: camel-aws-eks
+ schemes:
+ - id: aws-eks
+ http: false
+ passive: false
+ camel-aws-iam:
+ groupId: org.apache.camel
+ artifactId: camel-aws-iam
+ schemes:
+ - id: aws-iam
+ http: false
+ passive: false
+ camel-aws-kinesis:
+ groupId: org.apache.camel
+ artifactId: camel-aws-kinesis
+ schemes:
+ - id: aws-kinesis
+ http: false
+ passive: false
+ - id: aws-kinesis-firehose
+ http: false
+ passive: false
+ camel-aws-kms:
+ groupId: org.apache.camel
+ artifactId: camel-aws-kms
+ schemes:
+ - id: aws-kms
+ http: false
+ passive: false
+ camel-aws-lambda:
+ groupId: org.apache.camel
+ artifactId: camel-aws-lambda
+ schemes:
+ - id: aws-lambda
+ http: false
+ passive: false
+ camel-aws-mq:
+ groupId: org.apache.camel
+ artifactId: camel-aws-mq
+ schemes:
+ - id: aws-mq
+ http: false
+ passive: false
+ camel-aws-msk:
+ groupId: org.apache.camel
+ artifactId: camel-aws-msk
+ schemes:
+ - id: aws-msk
+ http: false
+ passive: false
+ camel-aws-s3:
+ groupId: org.apache.camel
+ artifactId: camel-aws-s3
+ schemes:
+ - id: aws-s3
+ http: false
+ passive: false
+ camel-aws-sdb:
+ groupId: org.apache.camel
+ artifactId: camel-aws-sdb
+ schemes:
+ - id: aws-sdb
+ http: false
+ passive: false
+ camel-aws-ses:
+ groupId: org.apache.camel
+ artifactId: camel-aws-ses
+ schemes:
+ - id: aws-ses
+ http: false
+ passive: false
+ camel-aws-sns:
+ groupId: org.apache.camel
+ artifactId: camel-aws-sns
+ schemes:
+ - id: aws-sns
+ http: false
+ passive: false
+ camel-aws-sqs:
+ groupId: org.apache.camel
+ artifactId: camel-aws-sqs
+ schemes:
+ - id: aws-sqs
+ http: false
+ passive: false
+ camel-aws-swf:
+ groupId: org.apache.camel
+ artifactId: camel-aws-swf
+ schemes:
+ - id: aws-swf
+ http: false
+ passive: false
+ camel-azure:
+ groupId: org.apache.camel
+ artifactId: camel-azure
+ schemes:
+ - id: azure-blob
+ http: false
+ passive: false
+ - id: azure-queue
+ http: false
+ passive: false
+ camel-barcode:
+ groupId: org.apache.camel
+ artifactId: camel-barcode
+ dataformats:
+ - barcode
+ camel-base:
+ groupId: org.apache.camel
+ artifactId: camel-base
+ languages:
+ - constant
+ - exchangeProperty
+ - file
+ - header
+ - ref
+ - simple
+ - tokenize
+ camel-base64:
+ groupId: org.apache.camel
+ artifactId: camel-base64
+ dataformats:
+ - base64
+ camel-bean:
+ groupId: org.apache.camel
+ artifactId: camel-bean
+ schemes:
+ - id: bean
+ http: false
+ passive: true
+ - id: class
+ http: false
+ passive: true
+ languages:
+ - bean
+ camel-bean-validator:
+ groupId: org.apache.camel
+ artifactId: camel-bean-validator
+ schemes:
+ - id: bean-validator
+ http: false
+ passive: false
+ camel-beanio:
+ groupId: org.apache.camel
+ artifactId: camel-beanio
+ dataformats:
+ - beanio
+ camel-beanstalk:
+ groupId: org.apache.camel
+ artifactId: camel-beanstalk
+ schemes:
+ - id: beanstalk
+ http: false
+ passive: false
+ camel-bindy:
+ groupId: org.apache.camel
+ artifactId: camel-bindy
+ dataformats:
+ - bindy-csv
+ - bindy-fixed
+ - bindy-kvp
+ camel-bonita:
+ groupId: org.apache.camel
+ artifactId: camel-bonita
+ schemes:
+ - id: bonita
+ http: false
+ passive: false
+ camel-box:
+ groupId: org.apache.camel
+ artifactId: camel-box
+ schemes:
+ - id: box
+ http: false
+ passive: false
+ camel-braintree:
+ groupId: org.apache.camel
+ artifactId: camel-braintree
+ schemes:
+ - id: braintree
+ http: false
+ passive: false
+ camel-browse:
+ groupId: org.apache.camel
+ artifactId: camel-browse
+ schemes:
+ - id: browse
+ http: false
+ passive: true
+ camel-caffeine:
+ groupId: org.apache.camel
+ artifactId: camel-caffeine
+ schemes:
+ - id: caffeine-cache
+ http: false
+ passive: false
+ - id: caffeine-loadcache
+ http: false
+ passive: false
+ camel-cassandraql:
+ groupId: org.apache.camel
+ artifactId: camel-cassandraql
+ schemes:
+ - id: cql
+ http: false
+ passive: false
+ camel-cbor:
+ groupId: org.apache.camel
+ artifactId: camel-cbor
+ dataformats:
+ - cbor
+ camel-chatscript:
+ groupId: org.apache.camel
+ artifactId: camel-chatscript
+ schemes:
+ - id: chatscript
+ http: false
+ passive: false
+ camel-chunk:
+ groupId: org.apache.camel
+ artifactId: camel-chunk
+ schemes:
+ - id: chunk
+ http: false
+ passive: false
+ camel-cm-sms:
+ groupId: org.apache.camel
+ artifactId: camel-cm-sms
+ schemes:
+ - id: cm-sms
+ http: false
+ passive: false
+ camel-cmis:
+ groupId: org.apache.camel
+ artifactId: camel-cmis
+ schemes:
+ - id: cmis
+ http: false
+ passive: false
+ camel-coap:
+ groupId: org.apache.camel
+ artifactId: camel-coap
+ schemes:
+ - id: coap
+ http: false
+ passive: false
+ - id: coaps
+ http: false
+ passive: false
+ - id: coap+tcp
+ http: false
+ passive: false
+ - id: coaps+tcp
+ http: false
+ passive: false
+ camel-cometd:
+ groupId: org.apache.camel
+ artifactId: camel-cometd
+ schemes:
+ - id: cometd
+ http: false
+ passive: false
+ - id: cometds
+ http: false
+ passive: false
+ camel-consul:
+ groupId: org.apache.camel
+ artifactId: camel-consul
+ schemes:
+ - id: consul
+ http: false
+ passive: false
+ camel-controlbus:
+ groupId: org.apache.camel
+ artifactId: camel-controlbus
+ schemes:
+ - id: controlbus
+ http: false
+ passive: true
+ camel-corda:
+ groupId: org.apache.camel
+ artifactId: camel-corda
+ schemes:
+ - id: corda
+ http: false
+ passive: false
+ camel-couchbase:
+ groupId: org.apache.camel
+ artifactId: camel-couchbase
+ schemes:
+ - id: couchbase
+ http: false
+ passive: false
+ camel-couchdb:
+ groupId: org.apache.camel
+ artifactId: camel-couchdb
+ schemes:
+ - id: couchdb
+ http: false
+ passive: false
+ camel-crypto:
+ groupId: org.apache.camel
+ artifactId: camel-crypto
+ schemes:
+ - id: crypto
+ http: false
+ passive: false
+ dataformats:
+ - crypto
+ - pgp
+ camel-crypto-cms:
+ groupId: org.apache.camel
+ artifactId: camel-crypto-cms
+ schemes:
+ - id: crypto-cms
+ http: false
+ passive: false
+ camel-csv:
+ groupId: org.apache.camel
+ artifactId: camel-csv
+ dataformats:
+ - csv
+ camel-cxf:
+ groupId: org.apache.camel
+ artifactId: camel-cxf
+ schemes:
+ - id: cxf
+ http: true
+ passive: false
+ - id: cxfrs
+ http: true
+ passive: false
+ camel-dataformat:
+ groupId: org.apache.camel
+ artifactId: camel-dataformat
+ schemes:
+ - id: dataformat
+ http: false
+ passive: true
+ camel-dataset:
+ groupId: org.apache.camel
+ artifactId: camel-dataset
+ schemes:
+ - id: dataset
+ http: false
+ passive: true
+ - id: dataset-test
+ http: false
+ passive: false
+ camel-digitalocean:
+ groupId: org.apache.camel
+ artifactId: camel-digitalocean
+ schemes:
+ - id: digitalocean
+ http: false
+ passive: false
+ camel-direct:
+ groupId: org.apache.camel
+ artifactId: camel-direct
+ schemes:
+ - id: direct
+ http: false
+ passive: true
+ camel-directvm:
+ groupId: org.apache.camel
+ artifactId: camel-directvm
+ schemes:
+ - id: direct-vm
+ http: false
+ passive: true
+ camel-disruptor:
+ groupId: org.apache.camel
+ artifactId: camel-disruptor
+ schemes:
+ - id: disruptor
+ http: false
+ passive: false
+ - id: disruptor-vm
+ http: false
+ passive: false
+ camel-dns:
+ groupId: org.apache.camel
+ artifactId: camel-dns
+ schemes:
+ - id: dns
+ http: false
+ passive: false
+ camel-docker:
+ groupId: org.apache.camel
+ artifactId: camel-docker
+ schemes:
+ - id: docker
+ http: false
+ passive: false
+ camel-dozer:
+ groupId: org.apache.camel
+ artifactId: camel-dozer
+ schemes:
+ - id: dozer
+ http: false
+ passive: false
+ camel-drill:
+ groupId: org.apache.camel
+ artifactId: camel-drill
+ schemes:
+ - id: drill
+ http: false
+ passive: false
+ camel-dropbox:
+ groupId: org.apache.camel
+ artifactId: camel-dropbox
+ schemes:
+ - id: dropbox
+ http: false
+ passive: false
+ camel-ehcache:
+ groupId: org.apache.camel
+ artifactId: camel-ehcache
+ schemes:
+ - id: ehcache
+ http: false
+ passive: false
+ camel-elasticsearch-rest:
+ groupId: org.apache.camel
+ artifactId: camel-elasticsearch-rest
+ schemes:
+ - id: elasticsearch-rest
+ http: false
+ passive: false
+ camel-elsql:
+ groupId: org.apache.camel
+ artifactId: camel-elsql
+ schemes:
+ - id: elsql
+ http: false
+ passive: false
+ camel-etcd:
+ groupId: org.apache.camel
+ artifactId: camel-etcd
+ schemes:
+ - id: etcd
+ http: false
+ passive: false
+ camel-eventadmin:
+ groupId: org.apache.camel
+ artifactId: camel-eventadmin
+ schemes:
+ - id: eventadmin
+ http: false
+ passive: false
+ camel-exec:
+ groupId: org.apache.camel
+ artifactId: camel-exec
+ schemes:
+ - id: exec
+ http: false
+ passive: false
+ camel-facebook:
+ groupId: org.apache.camel
+ artifactId: camel-facebook
+ schemes:
+ - id: facebook
+ http: false
+ passive: false
+ camel-fastjson:
+ groupId: org.apache.camel
+ artifactId: camel-fastjson
+ dataformats:
+ - json-fastjson
+ camel-fhir:
+ groupId: org.apache.camel
+ artifactId: camel-fhir
+ schemes:
+ - id: fhir
+ http: false
+ passive: false
+ dataformats:
+ - fhirJson
+ - fhirXml
+ camel-file:
+ groupId: org.apache.camel
+ artifactId: camel-file
+ schemes:
+ - id: file
+ http: false
+ passive: false
+ camel-file-watch:
+ groupId: org.apache.camel
+ artifactId: camel-file-watch
+ schemes:
+ - id: file-watch
+ http: false
+ passive: false
+ camel-flatpack:
+ groupId: org.apache.camel
+ artifactId: camel-flatpack
+ schemes:
+ - id: flatpack
+ http: false
+ passive: false
+ dataformats:
+ - flatpack
+ camel-flink:
+ groupId: org.apache.camel
+ artifactId: camel-flink
+ schemes:
+ - id: flink
+ http: false
+ passive: false
+ camel-fop:
+ groupId: org.apache.camel
+ artifactId: camel-fop
+ schemes:
+ - id: fop
+ http: false
+ passive: false
+ camel-freemarker:
+ groupId: org.apache.camel
+ artifactId: camel-freemarker
+ schemes:
+ - id: freemarker
+ http: false
+ passive: false
+ camel-ftp:
+ groupId: org.apache.camel
+ artifactId: camel-ftp
+ schemes:
+ - id: ftp
+ http: false
+ passive: false
+ - id: ftps
+ http: false
+ passive: false
+ - id: sftp
+ http: false
+ passive: false
+ camel-ganglia:
+ groupId: org.apache.camel
+ artifactId: camel-ganglia
+ schemes:
+ - id: ganglia
+ http: false
+ passive: false
+ camel-geocoder:
+ groupId: org.apache.camel
+ artifactId: camel-geocoder
+ schemes:
+ - id: geocoder
+ http: false
+ passive: false
+ camel-git:
+ groupId: org.apache.camel
+ artifactId: camel-git
+ schemes:
+ - id: git
+ http: false
+ passive: false
+ camel-github:
+ groupId: org.apache.camel
+ artifactId: camel-github
+ schemes:
+ - id: github
+ http: false
+ passive: false
+ camel-google-bigquery:
+ groupId: org.apache.camel
+ artifactId: camel-google-bigquery
+ schemes:
+ - id: google-bigquery
+ http: false
+ passive: false
+ - id: google-bigquery-sql
+ http: false
+ passive: false
+ camel-google-calendar:
+ groupId: org.apache.camel
+ artifactId: camel-google-calendar
+ schemes:
+ - id: google-calendar
+ http: false
+ passive: false
+ - id: google-calendar-stream
+ http: false
+ passive: false
+ camel-google-drive:
+ groupId: org.apache.camel
+ artifactId: camel-google-drive
+ schemes:
+ - id: google-drive
+ http: false
+ passive: false
+ camel-google-mail:
+ groupId: org.apache.camel
+ artifactId: camel-google-mail
+ schemes:
+ - id: google-mail
+ http: false
+ passive: false
+ - id: google-mail-stream
+ http: false
+ passive: false
+ camel-google-pubsub:
+ groupId: org.apache.camel
+ artifactId: camel-google-pubsub
+ schemes:
+ - id: google-pubsub
+ http: false
+ passive: false
+ camel-google-sheets:
+ groupId: org.apache.camel
+ artifactId: camel-google-sheets
+ schemes:
+ - id: google-sheets
+ http: false
+ passive: false
+ - id: google-sheets-stream
+ http: false
+ passive: false
+ camel-gora:
+ groupId: org.apache.camel
+ artifactId: camel-gora
+ schemes:
+ - id: gora
+ http: false
+ passive: false
+ camel-grape:
+ groupId: org.apache.camel
+ artifactId: camel-grape
+ schemes:
+ - id: grape
+ http: false
+ passive: false
+ camel-grok:
+ groupId: org.apache.camel
+ artifactId: camel-grok
+ dataformats:
+ - grok
+ camel-groovy:
+ groupId: org.apache.camel
+ artifactId: camel-groovy
+ languages:
+ - groovy
+ camel-grpc:
+ groupId: org.apache.camel
+ artifactId: camel-grpc
+ schemes:
+ - id: grpc
+ http: true
+ passive: false
+ camel-gson:
+ groupId: org.apache.camel
+ artifactId: camel-gson
+ dataformats:
+ - json-gson
+ camel-guava-eventbus:
+ groupId: org.apache.camel
+ artifactId: camel-guava-eventbus
+ schemes:
+ - id: guava-eventbus
+ http: false
+ passive: false
+ camel-hazelcast:
+ groupId: org.apache.camel
+ artifactId: camel-hazelcast
+ schemes:
+ - id: hazelcast-atomicvalue
+ http: false
+ passive: false
+ - id: hazelcast-instance
+ http: false
+ passive: false
+ - id: hazelcast-list
+ http: false
+ passive: false
+ - id: hazelcast-map
+ http: false
+ passive: false
+ - id: hazelcast-multimap
+ http: false
+ passive: false
+ - id: hazelcast-queue
+ http: false
+ passive: false
+ - id: hazelcast-replicatedmap
+ http: false
+ passive: false
+ - id: hazelcast-ringbuffer
+ http: false
+ passive: false
+ - id: hazelcast-seda
+ http: false
+ passive: false
+ - id: hazelcast-set
+ http: false
+ passive: false
+ - id: hazelcast-topic
+ http: false
+ passive: false
+ camel-hbase:
+ groupId: org.apache.camel
+ artifactId: camel-hbase
+ schemes:
+ - id: hbase
+ http: false
+ passive: false
+ camel-hdfs:
+ groupId: org.apache.camel
+ artifactId: camel-hdfs
+ schemes:
+ - id: hdfs
+ http: false
+ passive: false
+ camel-hipchat:
+ groupId: org.apache.camel
+ artifactId: camel-hipchat
+ schemes:
+ - id: hipchat
+ http: false
+ passive: false
+ camel-hl7:
+ groupId: org.apache.camel
+ artifactId: camel-hl7
+ languages:
+ - hl7terser
+ dataformats:
+ - hl7
+ camel-http:
+ groupId: org.apache.camel
+ artifactId: camel-http
+ schemes:
+ - id: http
+ http: false
+ passive: false
+ - id: https
+ http: false
+ passive: false
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-file
+ camel-ical:
+ groupId: org.apache.camel
+ artifactId: camel-ical
+ dataformats:
+ - ical
+ camel-iec60870:
+ groupId: org.apache.camel
+ artifactId: camel-iec60870
+ schemes:
+ - id: iec60870-client
+ http: false
+ passive: false
+ - id: iec60870-server
+ http: false
+ passive: false
+ camel-ignite:
+ groupId: org.apache.camel
+ artifactId: camel-ignite
+ schemes:
+ - id: ignite-cache
+ http: false
+ passive: false
+ - id: ignite-compute
+ http: false
+ passive: false
+ - id: ignite-events
+ http: false
+ passive: false
+ - id: ignite-idgen
+ http: false
+ passive: false
+ - id: ignite-messaging
+ http: false
+ passive: false
+ - id: ignite-queue
+ http: false
+ passive: false
+ - id: ignite-set
+ http: false
+ passive: false
+ camel-infinispan:
+ groupId: org.apache.camel
+ artifactId: camel-infinispan
+ schemes:
+ - id: infinispan
+ http: false
+ passive: false
+ camel-influxdb:
+ groupId: org.apache.camel
+ artifactId: camel-influxdb
+ schemes:
+ - id: influxdb
+ http: false
+ passive: false
+ camel-iota:
+ groupId: org.apache.camel
+ artifactId: camel-iota
+ schemes:
+ - id: iota
+ http: false
+ passive: false
+ camel-ipfs:
+ groupId: org.apache.camel
+ artifactId: camel-ipfs
+ schemes:
+ - id: ipfs
+ http: false
+ passive: false
+ camel-irc:
+ groupId: org.apache.camel
+ artifactId: camel-irc
+ schemes:
+ - id: irc
+ http: false
+ passive: false
+ camel-ironmq:
+ groupId: org.apache.camel
+ artifactId: camel-ironmq
+ schemes:
+ - id: ironmq
+ http: false
+ passive: false
+ camel-jackson:
+ groupId: org.apache.camel
+ artifactId: camel-jackson
+ dataformats:
+ - json-jackson
+ camel-jacksonxml:
+ groupId: org.apache.camel
+ artifactId: camel-jacksonxml
+ dataformats:
+ - jacksonxml
+ camel-jaxb:
+ groupId: org.apache.camel
+ artifactId: camel-jaxb
+ dataformats:
+ - jaxb
+ camel-jaxp:
+ groupId: org.apache.camel
+ artifactId: camel-jaxp
+ languages:
+ - xtokenize
+ camel-jbpm:
+ groupId: org.apache.camel
+ artifactId: camel-jbpm
+ schemes:
+ - id: jbpm
+ http: false
+ passive: false
+ camel-jcache:
+ groupId: org.apache.camel
+ artifactId: camel-jcache
+ schemes:
+ - id: jcache
+ http: false
+ passive: false
+ camel-jclouds:
+ groupId: org.apache.camel
+ artifactId: camel-jclouds
+ schemes:
+ - id: jclouds
+ http: false
+ passive: false
+ camel-jcr:
+ groupId: org.apache.camel
+ artifactId: camel-jcr
+ schemes:
+ - id: jcr
+ http: false
+ passive: false
+ camel-jdbc:
+ groupId: org.apache.camel
+ artifactId: camel-jdbc
+ schemes:
+ - id: jdbc
+ http: false
+ passive: false
+ camel-jetty:
+ groupId: org.apache.camel
+ artifactId: camel-jetty
+ schemes:
+ - id: jetty
+ http: true
+ passive: false
+ camel-jgroups:
+ groupId: org.apache.camel
+ artifactId: camel-jgroups
+ schemes:
+ - id: jgroups
+ http: false
+ passive: false
+ camel-jgroups-raft:
+ groupId: org.apache.camel
+ artifactId: camel-jgroups-raft
+ schemes:
+ - id: jgroups-raft
+ http: false
+ passive: false
+ camel-jing:
+ groupId: org.apache.camel
+ artifactId: camel-jing
+ schemes:
+ - id: jing
+ http: false
+ passive: false
+ camel-jira:
+ groupId: org.apache.camel
+ artifactId: camel-jira
+ schemes:
+ - id: jira
+ http: false
+ passive: false
+ camel-jms:
+ groupId: org.apache.camel
+ artifactId: camel-jms
+ schemes:
+ - id: jms
+ http: false
+ passive: false
+ camel-jmx:
+ groupId: org.apache.camel
+ artifactId: camel-jmx
+ schemes:
+ - id: jmx
+ http: false
+ passive: false
+ camel-johnzon:
+ groupId: org.apache.camel
+ artifactId: camel-johnzon
+ dataformats:
+ - json-johnzon
+ camel-jolt:
+ groupId: org.apache.camel
+ artifactId: camel-jolt
+ schemes:
+ - id: jolt
+ http: false
+ passive: false
+ camel-jooq:
+ groupId: org.apache.camel
+ artifactId: camel-jooq
+ schemes:
+ - id: jooq
+ http: false
+ passive: false
+ camel-jpa:
+ groupId: org.apache.camel
+ artifactId: camel-jpa
+ schemes:
+ - id: jpa
+ http: false
+ passive: false
+ camel-jsch:
+ groupId: org.apache.camel
+ artifactId: camel-jsch
+ schemes:
+ - id: scp
+ http: false
+ passive: false
+ camel-json-validator:
+ groupId: org.apache.camel
+ artifactId: camel-json-validator
+ schemes:
+ - id: json-validator
+ http: false
+ passive: false
+ camel-jsonapi:
+ groupId: org.apache.camel
+ artifactId: camel-jsonapi
+ dataformats:
+ - jsonApi
+ camel-jsonpath:
+ groupId: org.apache.camel
+ artifactId: camel-jsonpath
+ languages:
+ - jsonpath
+ camel-jt400:
+ groupId: org.apache.camel
+ artifactId: camel-jt400
+ schemes:
+ - id: jt400
+ http: false
+ passive: false
+ camel-k-loader-groovy:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-groovy
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-endpointdsl
+ - groupId: org.apache.camel
+ artifactId: camel-groovy
+ camel-k-loader-java:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-java
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-endpointdsl
+ camel-k-loader-js:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-js
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-endpointdsl
+ camel-k-loader-knative:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-knative
+ version: 1.0.0
+ camel-k-loader-kotlin:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-kotlin
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-endpointdsl
+ camel-k-loader-xml:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-loader-xml
+ version: 1.0.0
+ camel-k-runtime-groovy:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-groovy
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-groovy
+ - groupId: org.apache.camel
+ artifactId: camel-groovy
+ camel-k-runtime-health:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-health
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-servlet
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-servlet
+ camel-k-runtime-jvm:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-jvm
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-main
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-js
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-xml
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-java
+ - groupId: org.apache.camel
+ artifactId: camel-core-engine
+ - groupId: org.apache.camel
+ artifactId: camel-main
+ - groupId: org.apache.camel
+ artifactId: camel-properties
+ camel-k-runtime-knative:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-knative
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-cloud
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-yaml
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-knative
+ - groupId: org.apache.camel.k
+ artifactId: camel-knative-api
+ - groupId: org.apache.camel.k
+ artifactId: camel-knative
+ - groupId: org.apache.camel.k
+ artifactId: camel-knative-http
+ camel-k-runtime-kotlin:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-kotlin
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-kotlin
+ camel-k-runtime-main:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-main
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-core-engine
+ - groupId: org.apache.camel
+ artifactId: camel-main
+ - groupId: org.apache.camel
+ artifactId: camel-properties
+ camel-k-runtime-servlet:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-servlet
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-servlet
+ camel-k-runtime-yaml:
+ groupId: org.apache.camel.k
+ artifactId: camel-k-runtime-yaml
+ version: 1.0.0
+ dependencies:
+ - groupId: org.apache.camel.k
+ artifactId: camel-k-loader-yaml
+ camel-kafka:
+ groupId: org.apache.camel
+ artifactId: camel-kafka
+ schemes:
+ - id: kafka
+ http: false
+ passive: false
+ camel-knative:
+ groupId: org.apache.camel.k
+ artifactId: camel-knative
+ version: 1.0.0
+ schemes:
+ - id: knative
+ http: true
+ passive: false
+ dependencies:
+ - groupId: org.apache.camel
+ artifactId: camel-cloud
+ - groupId: org.apache.camel.k
+ artifactId: camel-knative-api
+ - groupId: org.apache.camel.k
+ artifactId: camel-knative-http
+ camel-kubernetes:
+ groupId: org.apache.camel
+ artifactId: camel-kubernetes
+ schemes:
+ - id: kubernetes-config-maps
+ http: false
+ passive: false
+ - id: kubernetes-deployments
+ http: false
+ passive: false
+ - id: kubernetes-hpa
+ http: false
+ passive: false
+ - id: kubernetes-job
+ http: false
+ passive: false
+ - id: kubernetes-namespaces
+ http: false
+ passive: false
+ - id: kubernetes-nodes
+ http: false
+ passive: false
+ - id: kubernetes-persistent-volumes
+ http: false
+ passive: false
+ - id: kubernetes-persistent-volumes-claims
+ http: false
+ passive: false
+ - id: kubernetes-pods
+ http: false
+ passive: false
+ - id: kubernetes-replication-controllers
+ http: false
+ passive: false
+ - id: kubernetes-resources-quota
+ http: false
+ passive: false
+ - id: kubernetes-secrets
+ http: false
+ passive: false
+ - id: kubernetes-service-accounts
+ http: false
+ passive: false
+ - id: kubernetes-services
+ http: false
+ passive: false
+ - id: openshift-build-configs
+ http: false
+ passive: false
+ - id: openshift-builds
+ http: false
+ passive: false
+ camel-language:
+ groupId: org.apache.camel
+ artifactId: camel-language
+ schemes:
+ - id: language
+ http: false
+ passive: true
+ camel-ldap:
+ groupId: org.apache.camel
+ artifactId: camel-ldap
+ schemes:
+ - id: ldap
+ http: false
+ passive: false
+ camel-ldif:
+ groupId: org.apache.camel
+ artifactId: camel-ldif
+ schemes:
+ - id: ldif
+ http: false
+ passive: false
+ camel-linkedin:
+ groupId: org.apache.camel
+ artifactId: camel-linkedin
+ schemes:
+ - id: linkedin
+ http: false
+ passive: false
+ camel-log:
+ groupId: org.apache.camel
+ artifactId: camel-log
+ schemes:
+ - id: log
+ http: false
+ passive: true
+ camel-lucene:
+ groupId: org.apache.camel
+ artifactId: camel-lucene
+ schemes:
+ - id: lucene
+ http: false
+ passive: false
+ camel-lumberjack:
+ groupId: org.apache.camel
+ artifactId: camel-lumberjack
+ schemes:
+ - id: lumberjack
+ http: false
+ passive: false
+ camel-lzf:
+ groupId: org.apache.camel
+ artifactId: camel-lzf
+ dataformats:
+ - lzf
+ camel-mail:
+ groupId: org.apache.camel
+ artifactId: camel-mail
+ schemes:
+ - id: imap
+ http: false
+ passive: false
+ - id: imaps
+ http: false
+ passive: false
+ - id: pop3
+ http: false
+ passive: false
+ - id: pop3s
+ http: false
+ passive: false
+ - id: smtp
+ http: false
+ passive: false
+ - id: smtps
+ http: false
+ passive: false
+ dataformats:
+ - mime-multipart
+ camel-master:
+ groupId: org.apache.camel
+ artifactId: camel-master
+ schemes:
+ - id: master
+ http: false
+ passive: false
+ camel-metrics:
+ groupId: org.apache.camel
+ artifactId: camel-metrics
+ schemes:
+ - id: metrics
+ http: false
+ passive: false
+ camel-micrometer:
+ groupId: org.apache.camel
+ artifactId: camel-micrometer
+ schemes:
+ - id: micrometer
+ http: false
+ passive: false
+ camel-microprofile-metrics:
+ groupId: org.apache.camel
+ artifactId: camel-microprofile-metrics
+ schemes:
+ - id: microprofile-metrics
+ http: false
+ passive: false
+ camel-milo:
+ groupId: org.apache.camel
+ artifactId: camel-milo
+ schemes:
+ - id: milo-client
+ http: false
+ passive: false
+ - id: milo-server
+ http: false
+ passive: false
+ camel-mina:
+ groupId: org.apache.camel
+ artifactId: camel-mina
+ schemes:
+ - id: mina
+ http: false
+ passive: false
+ camel-mllp:
+ groupId: org.apache.camel
+ artifactId: camel-mllp
+ schemes:
+ - id: mllp
+ http: false
+ passive: false
+ camel-mock:
+ groupId: org.apache.camel
+ artifactId: camel-mock
+ schemes:
+ - id: mock
+ http: false
+ passive: true
+ camel-mongodb:
+ groupId: org.apache.camel
+ artifactId: camel-mongodb
+ schemes:
+ - id: mongodb
+ http: false
+ passive: false
+ camel-mongodb-gridfs:
+ groupId: org.apache.camel
+ artifactId: camel-mongodb-gridfs
+ schemes:
+ - id: mongodb-gridfs
+ http: false
+ passive: false
+ camel-mqtt:
+ groupId: org.apache.camel
+ artifactId: camel-mqtt
+ schemes:
+ - id: mqtt
+ http: false
+ passive: false
+ camel-msv:
+ groupId: org.apache.camel
+ artifactId: camel-msv
+ schemes:
+ - id: msv
+ http: false
+ passive: false
+ camel-mustache:
+ groupId: org.apache.camel
+ artifactId: camel-mustache
+ schemes:
+ - id: mustache
+ http: false
+ passive: false
+ camel-mvel:
+ groupId: org.apache.camel
+ artifactId: camel-mvel
+ schemes:
+ - id: mvel
+ http: false
+ passive: false
+ languages:
+ - mvel
+ camel-mybatis:
+ groupId: org.apache.camel
+ artifactId: camel-mybatis
+ schemes:
+ - id: mybatis
+ http: false
+ passive: false
+ - id: mybatis-bean
+ http: false
+ passive: false
+ camel-nagios:
+ groupId: org.apache.camel
+ artifactId: camel-nagios
+ schemes:
+ - id: nagios
+ http: false
+ passive: false
+ camel-nats:
+ groupId: org.apache.camel
+ artifactId: camel-nats
+ schemes:
+ - id: nats
+ http: false
+ passive: false
+ camel-netty:
+ groupId: org.apache.camel
+ artifactId: camel-netty
+ schemes:
+ - id: netty
+ http: false
+ passive: false
+ camel-netty-http:
+ groupId: org.apache.camel
+ artifactId: camel-netty-http
+ schemes:
+ - id: netty-http
+ http: true
+ passive: false
+ camel-nsq:
+ groupId: org.apache.camel
+ artifactId: camel-nsq
+ schemes:
+ - id: nsq
+ http: false
+ passive: false
+ camel-ognl:
+ groupId: org.apache.camel
+ artifactId: camel-ognl
+ languages:
+ - ognl
+ camel-olingo2:
+ groupId: org.apache.camel
+ artifactId: camel-olingo2
+ schemes:
+ - id: olingo2
+ http: false
+ passive: false
+ camel-olingo4:
+ groupId: org.apache.camel
+ artifactId: camel-olingo4
+ schemes:
+ - id: olingo4
+ http: false
+ passive: false
+ camel-openstack:
+ groupId: org.apache.camel
+ artifactId: camel-openstack
+ schemes:
+ - id: openstack-cinder
+ http: false
+ passive: false
+ - id: openstack-glance
+ http: false
+ passive: false
+ - id: openstack-keystone
+ http: false
+ passive: false
+ - id: openstack-neutron
+ http: false
+ passive: false
+ - id: openstack-nova
+ http: false
+ passive: false
+ - id: openstack-swift
+ http: false
+ passive: false
+ camel-optaplanner:
+ groupId: org.apache.camel
+ artifactId: camel-optaplanner
+ schemes:
+ - id: optaplanner
+ http: false
+ passive: false
+ camel-paho:
+ groupId: org.apache.camel
+ artifactId: camel-paho
+ schemes:
+ - id: paho
+ http: false
+ passive: false
+ camel-paxlogging:
+ groupId: org.apache.camel
+ artifactId: camel-paxlogging
+ schemes:
+ - id: paxlogging
+ http: false
+ passive: false
+ camel-pdf:
+ groupId: org.apache.camel
+ artifactId: camel-pdf
+ schemes:
+ - id: pdf
+ http: false
+ passive: false
+ camel-pg-replication-slot:
+ groupId: org.apache.camel
+ artifactId: camel-pg-replication-slot
+ schemes:
+ - id: pg-replication-slot
+ http: false
+ passive: false
+ camel-pgevent:
+ groupId: org.apache.camel
+ artifactId: camel-pgevent
+ schemes:
+ - id: pgevent
+ http: false
+ passive: false
+ camel-printer:
+ groupId: org.apache.camel
+ artifactId: camel-printer
+ schemes:
+ - id: lpr
+ http: false
+ passive: false
+ camel-properties:
+ groupId: org.apache.camel
+ artifactId: camel-properties
+ schemes:
+ - id: properties
+ http: false
+ passive: true
+ camel-protobuf:
+ groupId: org.apache.camel
+ artifactId: camel-protobuf
+ dataformats:
+ - protobuf
+ camel-pubnub:
+ groupId: org.apache.camel
+ artifactId: camel-pubnub
+ schemes:
+ - id: pubnub
+ http: false
+ passive: false
+ camel-pulsar:
+ groupId: org.apache.camel
+ artifactId: camel-pulsar
+ schemes:
+ - id: pulsar
+ http: false
+ passive: false
+ camel-quartz:
+ groupId: org.apache.camel
+ artifactId: camel-quartz
+ schemes:
+ - id: quartz
+ http: false
+ passive: false
+ camel-quickfix:
+ groupId: org.apache.camel
+ artifactId: camel-quickfix
+ schemes:
+ - id: quickfix
+ http: false
+ passive: false
+ camel-rabbitmq:
+ groupId: org.apache.camel
+ artifactId: camel-rabbitmq
+ schemes:
+ - id: rabbitmq
+ http: false
+ passive: false
+ camel-reactive-streams:
+ groupId: org.apache.camel
+ artifactId: camel-reactive-streams
+ schemes:
+ - id: reactive-streams
+ http: false
+ passive: false
+ camel-ref:
+ groupId: org.apache.camel
+ artifactId: camel-ref
+ schemes:
+ - id: ref
+ http: false
+ passive: true
+ camel-rest:
+ groupId: org.apache.camel
+ artifactId: camel-rest
+ schemes:
+ - id: rest
+ http: true
+ passive: false
+ - id: rest-api
+ http: false
+ passive: false
+ camel-rest-swagger:
+ groupId: org.apache.camel
+ artifactId: camel-rest-swagger
+ schemes:
+ - id: rest-swagger
+ http: false
+ passive: false
+ camel-restlet:
+ groupId: org.apache.camel
+ artifactId: camel-restlet
+ schemes:
+ - id: restlet
+ http: true
+ passive: false
+ camel-rss:
+ groupId: org.apache.camel
+ artifactId: camel-rss
+ schemes:
+ - id: rss
+ http: false
+ passive: false
+ dataformats:
+ - rss
+ camel-saga:
+ groupId: org.apache.camel
+ artifactId: camel-saga
+ schemes:
+ - id: saga
+ http: false
+ passive: false
+ camel-salesforce:
+ groupId: org.apache.camel
+ artifactId: camel-salesforce
+ schemes:
+ - id: salesforce
+ http: false
+ passive: false
+ camel-sap-netweaver:
+ groupId: org.apache.camel
+ artifactId: camel-sap-netweaver
+ schemes:
+ - id: sap-netweaver
+ http: false
+ passive: false
+ camel-saxon:
+ groupId: org.apache.camel
+ artifactId: camel-saxon
+ schemes:
+ - id: xquery
+ http: false
+ passive: false
+ languages:
+ - xquery
+ camel-scheduler:
+ groupId: org.apache.camel
+ artifactId: camel-scheduler
+ schemes:
+ - id: scheduler
+ http: false
+ passive: false
+ camel-schematron:
+ groupId: org.apache.camel
+ artifactId: camel-schematron
+ schemes:
+ - id: schematron
+ http: false
+ passive: false
+ camel-seda:
+ groupId: org.apache.camel
+ artifactId: camel-seda
+ schemes:
+ - id: seda
+ http: false
+ passive: true
+ camel-service:
+ groupId: org.apache.camel
+ artifactId: camel-service
+ schemes:
+ - id: service
+ http: false
+ passive: false
+ camel-servicenow:
+ groupId: org.apache.camel
+ artifactId: camel-servicenow
+ schemes:
+ - id: servicenow
+ http: false
+ passive: false
+ camel-servlet:
+ groupId: org.apache.camel
+ artifactId: camel-servlet
+ schemes:
+ - id: servlet
+ http: true
+ passive: false
+ camel-sip:
+ groupId: org.apache.camel
+ artifactId: camel-sip
+ schemes:
+ - id: sip
+ http: false
+ passive: false
+ - id: sips
+ http: false
+ passive: false
+ camel-sjms:
+ groupId: org.apache.camel
+ artifactId: camel-sjms
+ schemes:
+ - id: sjms
+ http: false
+ passive: false
+ - id: sjms-batch
+ http: false
+ passive: false
+ camel-sjms2:
+ groupId: org.apache.camel
+ artifactId: camel-sjms2
+ schemes:
+ - id: sjms2
+ http: false
+ passive: false
+ camel-slack:
+ groupId: org.apache.camel
+ artifactId: camel-slack
+ schemes:
+ - id: slack
+ http: false
+ passive: false
+ camel-smpp:
+ groupId: org.apache.camel
+ artifactId: camel-smpp
+ schemes:
+ - id: smpp
+ http: false
+ passive: false
+ - id: smpps
+ http: false
+ passive: false
+ camel-snakeyaml:
+ groupId: org.apache.camel
+ artifactId: camel-snakeyaml
+ dataformats:
+ - yaml-snakeyaml
+ camel-snmp:
+ groupId: org.apache.camel
+ artifactId: camel-snmp
+ schemes:
+ - id: snmp
+ http: false
+ passive: false
+ camel-soap:
+ groupId: org.apache.camel
+ artifactId: camel-soap
+ dataformats:
+ - soapjaxb
+ camel-solr:
+ groupId: org.apache.camel
+ artifactId: camel-solr
+ schemes:
+ - id: solr
+ http: false
+ passive: false
+ - id: solrs
+ http: false
+ passive: false
+ - id: solrCloud
+ http: false
+ passive: false
+ camel-soroush:
+ groupId: org.apache.camel
+ artifactId: camel-soroush
+ schemes:
+ - id: soroush
+ http: false
+ passive: false
+ camel-spark:
+ groupId: org.apache.camel
+ artifactId: camel-spark
+ schemes:
+ - id: spark
+ http: false
+ passive: false
+ camel-spark-rest:
+ groupId: org.apache.camel
+ artifactId: camel-spark-rest
+ schemes:
+ - id: spark-rest
+ http: true
+ passive: false
+ camel-splunk:
+ groupId: org.apache.camel
+ artifactId: camel-splunk
+ schemes:
+ - id: splunk
+ http: false
+ passive: false
+ camel-spring:
+ groupId: org.apache.camel
+ artifactId: camel-spring
+ schemes:
+ - id: spring-event
+ http: false
+ passive: false
+ languages:
+ - spel
+ camel-spring-batch:
+ groupId: org.apache.camel
+ artifactId: camel-spring-batch
+ schemes:
+ - id: spring-batch
+ http: false
+ passive: false
+ camel-spring-integration:
+ groupId: org.apache.camel
+ artifactId: camel-spring-integration
+ schemes:
+ - id: spring-integration
+ http: false
+ passive: false
+ camel-spring-ldap:
+ groupId: org.apache.camel
+ artifactId: camel-spring-ldap
+ schemes:
+ - id: spring-ldap
+ http: false
+ passive: false
+ camel-spring-redis:
+ groupId: org.apache.camel
+ artifactId: camel-spring-redis
+ schemes:
+ - id: spring-redis
+ http: false
+ passive: false
+ camel-spring-ws:
+ groupId: org.apache.camel
+ artifactId: camel-spring-ws
+ schemes:
+ - id: spring-ws
+ http: true
+ passive: false
+ camel-sql:
+ groupId: org.apache.camel
+ artifactId: camel-sql
+ schemes:
+ - id: sql
+ http: false
+ passive: false
+ - id: sql-stored
+ http: false
+ passive: false
+ camel-ssh:
+ groupId: org.apache.camel
+ artifactId: camel-ssh
+ schemes:
+ - id: ssh
+ http: false
+ passive: false
+ camel-stax:
+ groupId: org.apache.camel
+ artifactId: camel-stax
+ schemes:
+ - id: stax
+ http: false
+ passive: false
+ camel-stomp:
+ groupId: org.apache.camel
+ artifactId: camel-stomp
+ schemes:
+ - id: stomp
+ http: false
+ passive: false
+ camel-stream:
+ groupId: org.apache.camel
+ artifactId: camel-stream
+ schemes:
+ - id: stream
+ http: false
+ passive: false
+ camel-stringtemplate:
+ groupId: org.apache.camel
+ artifactId: camel-stringtemplate
+ schemes:
+ - id: string-template
+ http: false
+ passive: false
+ camel-stub:
+ groupId: org.apache.camel
+ artifactId: camel-stub
+ schemes:
+ - id: stub
+ http: false
+ passive: true
+ camel-syslog:
+ groupId: org.apache.camel
+ artifactId: camel-syslog
+ dataformats:
+ - syslog
+ camel-tagsoup:
+ groupId: org.apache.camel
+ artifactId: camel-tagsoup
+ dataformats:
+ - tidyMarkup
+ camel-tarfile:
+ groupId: org.apache.camel
+ artifactId: camel-tarfile
+ dataformats:
+ - tarfile
+ camel-telegram:
+ groupId: org.apache.camel
+ artifactId: camel-telegram
+ schemes:
+ - id: telegram
+ http: false
+ passive: false
+ camel-thrift:
+ groupId: org.apache.camel
+ artifactId: camel-thrift
+ schemes:
+ - id: thrift
+ http: false
+ passive: false
+ dataformats:
+ - thrift
+ camel-tika:
+ groupId: org.apache.camel
+ artifactId: camel-tika
+ schemes:
+ - id: tika
+ http: false
+ passive: false
+ camel-timer:
+ groupId: org.apache.camel
+ artifactId: camel-timer
+ schemes:
+ - id: timer
+ http: false
+ passive: false
+ camel-twilio:
+ groupId: org.apache.camel
+ artifactId: camel-twilio
+ schemes:
+ - id: twilio
+ http: false
+ passive: false
+ camel-twitter:
+ groupId: org.apache.camel
+ artifactId: camel-twitter
+ schemes:
+ - id: twitter-directmessage
+ http: false
+ passive: false
+ - id: twitter-search
+ http: false
+ passive: false
+ - id: twitter-timeline
+ http: false
+ passive: false
+ camel-undertow:
+ groupId: org.apache.camel
+ artifactId: camel-undertow
+ schemes:
+ - id: undertow
+ http: true
+ passive: false
+ camel-univocity-parsers:
+ groupId: org.apache.camel
+ artifactId: camel-univocity-parsers
+ dataformats:
+ - univocity-csv
+ - univocity-fixed
+ - univocity-tsv
+ camel-validator:
+ groupId: org.apache.camel
+ artifactId: camel-validator
+ schemes:
+ - id: validator
+ http: false
+ passive: true
+ camel-velocity:
+ groupId: org.apache.camel
+ artifactId: camel-velocity
+ schemes:
+ - id: velocity
+ http: false
+ passive: false
+ camel-vertx:
+ groupId: org.apache.camel
+ artifactId: camel-vertx
+ schemes:
+ - id: vertx
+ http: false
+ passive: false
+ camel-vm:
+ groupId: org.apache.camel
+ artifactId: camel-vm
+ schemes:
+ - id: vm
+ http: false
+ passive: true
+ camel-weather:
+ groupId: org.apache.camel
+ artifactId: camel-weather
+ schemes:
+ - id: weather
+ http: false
+ passive: false
+ camel-web3j:
+ groupId: org.apache.camel
+ artifactId: camel-web3j
+ schemes:
+ - id: web3j
+ http: false
+ passive: false
+ camel-webhook:
+ groupId: org.apache.camel
+ artifactId: camel-webhook
+ schemes:
+ - id: webhook
+ http: true
+ passive: false
+ camel-websocket:
+ groupId: org.apache.camel
+ artifactId: camel-websocket
+ schemes:
+ - id: websocket
+ http: true
+ passive: false
+ camel-websocket-jsr356:
+ groupId: org.apache.camel
+ artifactId: camel-websocket-jsr356
+ schemes:
+ - id: websocket-jsr356
+ http: false
+ passive: false
+ camel-wordpress:
+ groupId: org.apache.camel
+ artifactId: camel-wordpress
+ schemes:
+ - id: wordpress
+ http: false
+ passive: false
+ camel-xchange:
+ groupId: org.apache.camel
+ artifactId: camel-xchange
+ schemes:
+ - id: xchange
+ http: false
+ passive: false
+ camel-xmlsecurity:
+ groupId: org.apache.camel
+ artifactId: camel-xmlsecurity
+ schemes:
+ - id: xmlsecurity
+ http: false
+ passive: false
+ dataformats:
+ - secureXML
+ camel-xmpp:
+ groupId: org.apache.camel
+ artifactId: camel-xmpp
+ schemes:
+ - id: xmpp
+ http: false
+ passive: false
+ camel-xpath:
+ groupId: org.apache.camel
+ artifactId: camel-xpath
+ languages:
+ - xpath
+ camel-xslt:
+ groupId: org.apache.camel
+ artifactId: camel-xslt
+ schemes:
+ - id: xslt
+ http: false
+ passive: false
+ camel-xstream:
+ groupId: org.apache.camel
+ artifactId: camel-xstream
+ dataformats:
+ - json-xstream
+ - xstream
+ camel-yammer:
+ groupId: org.apache.camel
+ artifactId: camel-yammer
+ schemes:
+ - id: yammer
+ http: false
+ passive: false
+ camel-zendesk:
+ groupId: org.apache.camel
+ artifactId: camel-zendesk
+ schemes:
+ - id: zendesk
+ http: false
+ passive: false
+ camel-zip-deflater:
+ groupId: org.apache.camel
+ artifactId: camel-zip-deflater
+ dataformats:
+ - gzipdeflater
+ - zipdeflater
+ camel-zipfile:
+ groupId: org.apache.camel
+ artifactId: camel-zipfile
+ dataformats:
+ - zipfile
+ camel-zookeeper:
+ groupId: org.apache.camel
+ artifactId: camel-zookeeper
+ schemes:
+ - id: zookeeper
+ http: false
+ passive: false
+ camel-zookeeper-master:
+ groupId: org.apache.camel
+ artifactId: camel-zookeeper-master
+ schemes:
+ - id: zookeeper-master
+ http: false
+ passive: false
+
+`
Resources["crd-build.yaml"] =
`
# ---------------------------------------------------------------------------
@@ -3039,6 +5306,23 @@ rules:
`
Resources["operator-role-olm.yaml"] =
`
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
@@ -3210,6 +5494,7 @@ rules:
- watch
- apiGroups:
- eventing.knative.dev
+ - messaging.knative.dev
resources:
- "*"
verbs:
diff --git a/docs/modules/ROOT/pages/traits.adoc b/docs/modules/ROOT/pages/traits.adoc
index c710919..2b825ba 100644
--- a/docs/modules/ROOT/pages/traits.adoc
+++ b/docs/modules/ROOT/pages/traits.adoc
@@ -143,16 +143,22 @@ More information can be found in the official Kubernetes documentation about htt
!===
! knative.channel-sources
-! Configures a (comma-separated) list of channels to which the Knative service must be subscribed (to receive cloudevents from a channel).
+! Configures a (comma-separated) list of channels to which the Knative service must be subscribed (to receive cloudevents from a channel). May also contain Camel URIs instead of simple names.
! knative.channel-sinks
-! Configures a (comma-separated) list of channels to which the Knative service publishes.
+! Configures a (comma-separated) list of channels to which the Knative service publishes. May also contain Camel URIs instead of simple names.
! knative.endpoint-sources
-! Configures a (comma-separated) list of endpoints the Knative service exposes (the name is).
+! Configures a (comma-separated) list of endpoints the Knative service exposes (the name is). May also contain Camel URIs instead of simple names.
! knative.endpoint-sinks
-! Configures a (comma-separated) list of endpoints the Knative consumes.
+! Configures a (comma-separated) list of endpoints the Knative consumes. May also contain Camel URIs instead of simple names.
+
+! knative.event-sources
+! Configures a (comma-separated) list of events that will trigger the Knative service (receiving cloudevents from the broker). May also contain Camel URIs instead of simple names.
+
+! knative.event-sinks
+! Configures a (comma-separated) list of event types that the service will produce. May also contain Camel URIs instead of simple names.
! knative.filter-source-channels
! Force the knative endpoint to filter messages based on the `ce-knativehistory` header (Knative experimental feature). It's enabled automatically when there are more than 2 source channels. It's optional (default to false) when there's a single source channel.
diff --git a/e2e/build_test.go b/e2e/build_test.go
index 57dc3b8..6b3f346 100644
--- a/e2e/build_test.go
+++ b/e2e/build_test.go
@@ -57,7 +57,7 @@ func TestKitYAMLFullBuild(t *testing.T) {
doNamedKitFullBuild(t, "yaml")
}
-func TestKitHealthFullBuild(t *testing.T) {
+func TestKitKnativeFullBuild(t *testing.T) {
doNamedKitFullBuild(t, "knative")
}
diff --git a/e2e/files/knativeevt1.groovy b/e2e/files/knativeevt1.groovy
new file mode 100644
index 0000000..afd2d4b
--- /dev/null
+++ b/e2e/files/knativeevt1.groovy
@@ -0,0 +1,24 @@
+/*
+ * 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('timer:tick')
+ .setBody().constant("Hello 1")
+ .to('knative:event/hello.1')
+
+from('timer:tick')
+ .setBody().constant("Hello 2")
+ .to('knative:event/hello.2')
diff --git a/e2e/files/knativeevt2.groovy b/e2e/files/knativeevt2.groovy
new file mode 100644
index 0000000..7047751
--- /dev/null
+++ b/e2e/files/knativeevt2.groovy
@@ -0,0 +1,22 @@
+/*
+ * 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:event/hello.1')
+ .log('Received 1: ${body}')
+
+from('knative:event/hello.2')
+ .log('Received 2: ${body}')
diff --git a/e2e/knative_test.go b/e2e/knative_test.go
index 371add2..1efe183 100644
--- a/e2e/knative_test.go
+++ b/e2e/knative_test.go
@@ -55,3 +55,18 @@ func TestRunChannelCombo(t *testing.T) {
Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
}
+
+func TestRunBroker(t *testing.T) {
+ withNewTestNamespaceWithKnativeBroker(func(ns string) {
+ RegisterTestingT(t)
+ Expect(kamel("install", "-n", ns, "--trait-profile", "knative").Execute()).Should(BeNil())
+ Expect(kamel("run", "-n", ns, "files/knativeevt1.groovy").Execute()).Should(BeNil())
+ Expect(kamel("run", "-n", ns, "files/knativeevt2.groovy").Execute()).Should(BeNil())
+ Eventually(integrationPodPhase(ns, "knativeevt1"), 10*time.Minute).Should(Equal(v1.PodRunning))
+ Eventually(integrationPodPhase(ns, "knativeevt2"), 10*time.Minute).Should(Equal(v1.PodRunning))
+ Eventually(integrationLogs(ns, "knativeevt2"), 5*time.Minute).Should(ContainSubstring("Received 1: Hello 1"))
+ Eventually(integrationLogs(ns, "knativeevt2"), 5*time.Minute).Should(ContainSubstring("Received 2: Hello 2"))
+ Eventually(integrationLogs(ns, "knativeevt2")).ShouldNot(ContainSubstring("Received 1: Hello 2"))
+ Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
+ })
+}
diff --git a/e2e/test_support.go b/e2e/test_support.go
index 04a5203..25657b3 100644
--- a/e2e/test_support.go
+++ b/e2e/test_support.go
@@ -48,6 +48,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
+ eventing "knative.dev/eventing/pkg/apis/eventing/v1alpha1"
messaging "knative.dev/eventing/pkg/apis/messaging/v1alpha1"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
)
@@ -62,6 +63,10 @@ var testImageName = defaults.ImageName
var testImageVersion = defaults.Version
func init() {
+ // Register some resources used in e2e tests only
+ client.FastMapperAllowedAPIGroups["project.openshift.io"] = true
+ client.FastMapperAllowedAPIGroups["eventing.knative.dev"] = true
+
var err error
testContext = context.TODO()
testClient, err = newTestClient()
@@ -536,12 +541,57 @@ func numPods(ns string) func() int {
}
func withNewTestNamespace(doRun func(string)) {
- ns := newTestNamespace()
+ ns := newTestNamespace(false)
+ defer deleteTestNamespace(ns)
+
+ doRun(ns.GetName())
+}
+
+func withNewTestNamespaceWithKnativeBroker(doRun func(string)) {
+ ns := newTestNamespace(true)
defer deleteTestNamespace(ns)
+ defer deleteKnativeBroker(ns)
doRun(ns.GetName())
}
+func deleteKnativeBroker(ns metav1.Object) {
+ nsRef := v1.Namespace{
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: "Namespace",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Name: ns.GetName(),
+ },
+ }
+ nsKey, err := k8sclient.ObjectKeyFromObject(&nsRef)
+ if err != nil {
+ panic(err)
+ }
+ if err := testClient.Get(testContext, nsKey, &nsRef); err != nil {
+ panic(err)
+ }
+
+ nsRef.SetLabels(make(map[string]string, 0))
+ if err := testClient.Update(testContext, &nsRef); err != nil {
+ panic(err)
+ }
+ broker := eventing.Broker{
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: eventing.SchemeGroupVersion.String(),
+ Kind: "Broker",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: ns.GetName(),
+ Name: "default",
+ },
+ }
+ if err := testClient.Delete(testContext, &broker); err != nil {
+ panic(err)
+ }
+}
+
func deleteTestNamespace(ns metav1.Object) {
var oc bool
var err error
@@ -567,10 +617,10 @@ func deleteTestNamespace(ns metav1.Object) {
}
// Wait for all pods to be deleted
- gomega.Eventually(numPods(ns.GetName()), 30*time.Second).Should(gomega.Equal(0))
+ gomega.Eventually(numPods(ns.GetName()), 60*time.Second).Should(gomega.Equal(0))
}
-func newTestNamespace() metav1.Object {
+func newTestNamespace(injectKnativeBroker bool) metav1.Object {
var err error
var oc bool
var obj runtime.Object
@@ -600,6 +650,14 @@ func newTestNamespace() metav1.Object {
},
}
}
+
+ if injectKnativeBroker {
+ mo := obj.(metav1.Object)
+ mo.SetLabels(map[string]string{
+ "knative-eventing-injection": "enabled",
+ })
+ }
+
if err = testClient.Create(testContext, obj); err != nil {
panic(err)
}
diff --git a/pkg/apis/camel/v1alpha1/knative/types.go b/pkg/apis/camel/v1alpha1/knative/types.go
index 833931b..f520a08 100644
--- a/pkg/apis/camel/v1alpha1/knative/types.go
+++ b/pkg/apis/camel/v1alpha1/knative/types.go
@@ -32,13 +32,22 @@ func NewCamelEnvironment() CamelEnvironment {
// CamelServiceDefinition defines the parameters to connect to Knative service. It's also used for exposed services
type CamelServiceDefinition struct {
ServiceType CamelServiceType `json:"type"`
- Protocol CamelProtocol `json:"protocol"`
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port"`
Metadata map[string]string `json:"metadata"`
}
+// CamelEndpointKind --
+type CamelEndpointKind string
+
+const (
+ // CamelEndpointKindSource is a service that can be used to consume events
+ CamelEndpointKindSource CamelEndpointKind = "source"
+ // CamelEndpointKindSink is a service that can be used to send events to
+ CamelEndpointKindSink CamelEndpointKind = "sink"
+)
+
// CamelServiceType --
type CamelServiceType string
@@ -47,26 +56,23 @@ const (
CamelServiceTypeEndpoint CamelServiceType = "endpoint"
// CamelServiceTypeChannel is a callable endpoint that will be also associated to a subscription
CamelServiceTypeChannel CamelServiceType = "channel"
-)
-
-// CamelProtocol is the communication protocol to use for the service
-type CamelProtocol string
-
-// Knative protocols
-const (
- CamelProtocolHTTP CamelProtocol = "http"
- CamelProtocolHTTPS CamelProtocol = "https"
+ // CamelServiceTypeEvent is used when the target service is the Knative broker
+ CamelServiceTypeEvent CamelServiceType = "event"
)
// Meta Options
const (
- CamelMetaServicePath = "service.path"
- CamelMetaServiceID = "service.id"
- CamelMetaServiceName = "service.name"
- CamelMetaServiceHost = "service.host"
- CamelMetaServicePort = "service.port"
- CamelMetaServiceZone = "service.zone"
- CamelMetaServiceProtocol = "service.protocol"
- CamelMetaFilterHeaderName = "filter.header.name"
- CamelMetaFilterHeaderValue = "filter.header.value"
+ CamelMetaServicePath = "service.path"
+ CamelMetaServiceID = "service.id"
+ CamelMetaServiceName = "service.name"
+ CamelMetaServiceHost = "service.host"
+ CamelMetaServicePort = "service.port"
+ CamelMetaServiceZone = "service.zone"
+
+ CamelMetaKnativeKind = "knative.kind"
+ CamelMetaKnativeAPIVersion = "knative.apiVersion"
+
+ CamelMetaEndpointKind = "camel.endpoint.kind"
+
+ CamelMetaFilterPrefix = "filter."
)
diff --git a/pkg/apis/camel/v1alpha1/knative/types_support.go b/pkg/apis/camel/v1alpha1/knative/types_support.go
index f18f35b..168c6bd 100644
--- a/pkg/apis/camel/v1alpha1/knative/types_support.go
+++ b/pkg/apis/camel/v1alpha1/knative/types_support.go
@@ -24,15 +24,19 @@ import (
)
// BuildCamelServiceDefinition creates a CamelServiceDefinition from a given URL
-func BuildCamelServiceDefinition(name string, serviceType CamelServiceType, serviceURL url.URL) (CamelServiceDefinition, error) {
- protocol := CamelProtocol(serviceURL.Scheme)
+func BuildCamelServiceDefinition(name string, endpointKind CamelEndpointKind, serviceType CamelServiceType,
+ serviceURL url.URL, apiVersion, kind string) (CamelServiceDefinition, error) {
+
definition := CamelServiceDefinition{
Name: name,
Host: serviceURL.Host,
- Port: defaultCamelProtocolPort(protocol),
+ Port: 80,
ServiceType: serviceType,
- Protocol: protocol,
- Metadata: make(map[string]string),
+ Metadata: map[string]string{
+ CamelMetaEndpointKind: string(endpointKind),
+ CamelMetaKnativeAPIVersion: apiVersion,
+ CamelMetaKnativeKind: kind,
+ },
}
portStr := serviceURL.Port()
if portStr != "" {
@@ -51,17 +55,6 @@ func BuildCamelServiceDefinition(name string, serviceType CamelServiceType, serv
return definition, nil
}
-func defaultCamelProtocolPort(prot CamelProtocol) int {
- switch prot {
- case CamelProtocolHTTP:
- return 80
- case CamelProtocolHTTPS:
- return 443
- default:
- return -1
- }
-}
-
// Serialize serializes a CamelEnvironment
func (env *CamelEnvironment) Serialize() (string, error) {
res, err := json.Marshal(env)
@@ -80,15 +73,19 @@ func (env *CamelEnvironment) Deserialize(str string) error {
}
// ContainsService tells if the environment contains a service with the given name and type
-func (env *CamelEnvironment) ContainsService(name string, serviceType CamelServiceType) bool {
- return env.FindService(name, serviceType) != nil
+func (env *CamelEnvironment) ContainsService(name string, endpointKind CamelEndpointKind, serviceType CamelServiceType, apiVersion, kind string) bool {
+ return env.FindService(name, endpointKind, serviceType, apiVersion, kind) != nil
}
// FindService --
-func (env *CamelEnvironment) FindService(name string, serviceType CamelServiceType) *CamelServiceDefinition {
+func (env *CamelEnvironment) FindService(name string, endpointKind CamelEndpointKind, serviceType CamelServiceType, apiVersion, kind string) *CamelServiceDefinition {
for _, svc := range env.Services {
svc := svc
- if svc.Name == name && svc.ServiceType == serviceType {
+ if svc.Name == name &&
+ svc.Metadata[CamelMetaEndpointKind] == string(endpointKind) &&
+ svc.ServiceType == serviceType &&
+ (apiVersion == "" || svc.Metadata[CamelMetaKnativeAPIVersion] == apiVersion) &&
+ (kind == "" || svc.Metadata[CamelMetaKnativeKind] == kind) {
return &svc
}
}
diff --git a/pkg/client/fastmapper.go b/pkg/client/fastmapper.go
index 6016550..1501e4d 100644
--- a/pkg/client/fastmapper.go
+++ b/pkg/client/fastmapper.go
@@ -28,14 +28,13 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
-// allowedAPIGroups contains a set of API groups that are allowed when using the fastmapper.
+// FastMapperAllowedAPIGroups contains a set of API groups that are allowed when using the fastmapper.
// Those must correspond to all groups used by the "kamel" binary tool when running out-of-cluster.
-var allowedAPIGroups = map[string]bool{
+var FastMapperAllowedAPIGroups = map[string]bool{
"": true, // core APIs
"apiextensions.k8s.io": true,
"apps": true,
"camel.apache.org": true,
- "project.openshift.io": true, // used in e2e tests
"rbac.authorization.k8s.io": true,
"console.openshift.io": true, // OpenShift console resources
}
@@ -45,7 +44,7 @@ var allowedAPIGroups = map[string]bool{
func newFastDiscoveryRESTMapper(config *rest.Config) meta.RESTMapper {
return meta.NewLazyRESTMapperLoader(func() (meta.RESTMapper, error) {
return newFastDiscoveryRESTMapperWithFilter(config, func(g *metav1.APIGroup) bool {
- return allowedAPIGroups[g.Name]
+ return FastMapperAllowedAPIGroups[g.Name]
})
})
}
diff --git a/pkg/trait/knative.go b/pkg/trait/knative.go
index f64929a..b3e2286 100644
--- a/pkg/trait/knative.go
+++ b/pkg/trait/knative.go
@@ -18,67 +18,43 @@ limitations under the License.
package trait
import (
- "fmt"
- "regexp"
+ "net/url"
"strings"
"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ knativeapi "github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative"
"github.com/apache/camel-k/pkg/metadata"
"github.com/apache/camel-k/pkg/util/envvar"
+ knativeutil "github.com/apache/camel-k/pkg/util/knative"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/pkg/errors"
- "github.com/scylladb/go-set/strset"
+ v1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/runtime/schema"
-
- knativeapi "github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative"
- knativeutil "github.com/apache/camel-k/pkg/util/knative"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ eventing "knative.dev/eventing/pkg/apis/eventing/v1alpha1"
messaging "knative.dev/eventing/pkg/apis/messaging/v1alpha1"
+ serving "knative.dev/serving/pkg/apis/serving/v1beta1"
kubeclient "sigs.k8s.io/controller-runtime/pkg/client"
)
type knativeTrait struct {
BaseTrait `property:",squash"`
- Configuration string `property:"configuration"`
- ChannelSources string `property:"channel-sources"`
- ChannelSinks string `property:"channel-sinks"`
- EndpointSources string `property:"endpoint-sources"`
- EndpointSinks string `property:"endpoint-sinks"`
- FilterSourceChannels *bool `property:"filter-source-channels"`
- ChannelAPIs []string `property:"channel-apis"`
- EndpointAPIs []string `property:"endpoint-apis"`
- Knative08CompatMode *bool `property:"knative-08-compat-mode"`
- Auto *bool `property:"auto"`
+ Configuration string `property:"configuration"`
+ ChannelSources string `property:"channel-sources"`
+ ChannelSinks string `property:"channel-sinks"`
+ EndpointSources string `property:"endpoint-sources"`
+ EndpointSinks string `property:"endpoint-sinks"`
+ EventSources string `property:"event-sources"`
+ EventSinks string `property:"event-sinks"`
+ FilterSourceChannels *bool `property:"filter-source-channels"`
+ Knative08CompatMode *bool `property:"knative-08-compat-mode"`
+ Auto *bool `property:"auto"`
}
const (
knativeHistoryHeader = "ce-knativehistory"
)
-var (
- kindAPIGroupVersionFormat = regexp.MustCompile(`^([^/]+)/([^/]+)/([^/]+)$`)
-
- defaultChannelAPIs = []string{
- "messaging.knative.dev/v1alpha1/Channel",
- "eventing.knative.dev/v1alpha1/Channel",
- "messaging.knative.dev/v1alpha1/InMemoryChannel",
- "messaging.knative.dev/v1alpha1/KafkaChannel",
- "messaging.knative.dev/v1alpha1/NatssChannel",
- }
-
- defaultEndpointAPIs = []string{
- "serving.knative.dev/v1beta1/Service",
- "serving.knative.dev/v1alpha1/Service",
- "serving.knative.dev/v1/Service",
- }
-)
-
-func init() {
- // Channels are also endpoints
- defaultEndpointAPIs = append(defaultEndpointAPIs, defaultChannelAPIs...)
-}
-
func newKnativeTrait() *knativeTrait {
t := &knativeTrait{
BaseTrait: newBaseTrait("knative"),
@@ -96,20 +72,12 @@ func (t *knativeTrait) Configure(e *Environment) (bool, error) {
return false, nil
}
- // Always applying the defaults
- if len(t.ChannelAPIs) == 0 {
- t.ChannelAPIs = append(t.ChannelAPIs, defaultChannelAPIs...)
- }
- if len(t.EndpointAPIs) == 0 {
- t.EndpointAPIs = append(t.EndpointAPIs, defaultEndpointAPIs...)
- }
-
if t.Auto == nil || *t.Auto {
if t.ChannelSources == "" {
items := make([]string, 0)
metadata.Each(e.CamelCatalog, e.Integration.Spec.Sources, func(_ int, meta metadata.IntegrationMetadata) bool {
- items = append(items, knativeutil.ExtractChannelNames(meta.FromURIs)...)
+ items = append(items, knativeutil.FilterURIs(meta.FromURIs, knativeapi.CamelServiceTypeChannel)...)
return true
})
@@ -119,7 +87,7 @@ func (t *knativeTrait) Configure(e *Environment) (bool, error) {
items := make([]string, 0)
metadata.Each(e.CamelCatalog, e.Integration.Spec.Sources, func(_ int, meta metadata.IntegrationMetadata) bool {
- items = append(items, knativeutil.ExtractChannelNames(meta.ToURIs)...)
+ items = append(items, knativeutil.FilterURIs(meta.ToURIs, knativeapi.CamelServiceTypeChannel)...)
return true
})
@@ -129,7 +97,7 @@ func (t *knativeTrait) Configure(e *Environment) (bool, error) {
items := make([]string, 0)
metadata.Each(e.CamelCatalog, e.Integration.Spec.Sources, func(_ int, meta metadata.IntegrationMetadata) bool {
- items = append(items, knativeutil.ExtractEndpointNames(meta.FromURIs)...)
+ items = append(items, knativeutil.FilterURIs(meta.FromURIs, knativeapi.CamelServiceTypeEndpoint)...)
return true
})
@@ -139,12 +107,32 @@ func (t *knativeTrait) Configure(e *Environment) (bool, error) {
items := make([]string, 0)
metadata.Each(e.CamelCatalog, e.Integration.Spec.Sources, func(_ int, meta metadata.IntegrationMetadata) bool {
- items = append(items, knativeutil.ExtractEndpointNames(meta.ToURIs)...)
+ items = append(items, knativeutil.FilterURIs(meta.ToURIs, knativeapi.CamelServiceTypeEndpoint)...)
return true
})
t.EndpointSinks = strings.Join(items, ",")
}
+ if t.EventSources == "" {
+ items := make([]string, 0)
+
+ metadata.Each(e.CamelCatalog, e.Integration.Spec.Sources, func(_ int, meta metadata.IntegrationMetadata) bool {
+ items = append(items, knativeutil.FilterURIs(meta.FromURIs, knativeapi.CamelServiceTypeEvent)...)
+ return true
+ })
+
+ t.EventSources = strings.Join(items, ",")
+ }
+ if t.EventSinks == "" {
+ items := make([]string, 0)
+
+ metadata.Each(e.CamelCatalog, e.Integration.Spec.Sources, func(_ int, meta metadata.IntegrationMetadata) bool {
+ items = append(items, knativeutil.FilterURIs(meta.ToURIs, knativeapi.CamelServiceTypeEvent)...)
+ return true
+ })
+
+ t.EventSinks = strings.Join(items, ",")
+ }
if len(strings.Split(t.ChannelSources, ",")) > 1 {
// Always filter channels when the integration subscribes to more than one
// Using Knative experimental header: https://github.com/knative/eventing/blob/7df0cc56c28d58223ff25d5ddfb487fa8c29a004/pkg/provisioners/message.go#L28
@@ -166,17 +154,6 @@ func (t *knativeTrait) Configure(e *Environment) (bool, error) {
}
func (t *knativeTrait) Apply(e *Environment) error {
- if err := t.createConfiguration(e); err != nil {
- return err
- }
- if err := t.createSubscriptions(e); err != nil {
- return err
- }
-
- return nil
-}
-
-func (t *knativeTrait) createConfiguration(e *Environment) error {
env := knativeapi.NewCamelEnvironment()
if t.Configuration != "" {
if err := env.Deserialize(t.Configuration); err != nil {
@@ -190,6 +167,9 @@ func (t *knativeTrait) createConfiguration(e *Environment) error {
if err := t.configureEndpoints(e, &env); err != nil {
return err
}
+ if err := t.configureEvents(e, &env); err != nil {
+ return err
+ }
conf, err := env.Serialize()
if err != nil {
@@ -201,171 +181,231 @@ func (t *knativeTrait) createConfiguration(e *Environment) error {
return nil
}
-func (t *knativeTrait) createSubscriptions(e *Environment) error {
- channels := t.extractNames(t.ChannelSources)
- types, err := decodeKindAPIGroupVersions(t.ChannelAPIs)
+func (t *knativeTrait) configureChannels(e *Environment, env *knativeapi.CamelEnvironment) error {
+ // Sources
+ err := t.ifServiceMissingDo(e, env, t.ChannelSources, knativeapi.CamelServiceTypeChannel, knativeapi.CamelEndpointKindSource,
+ func(ref *v1.ObjectReference, loc *url.URL, serviceURI string) error {
+ meta := map[string]string{
+ knativeapi.CamelMetaServicePath: "/",
+ knativeapi.CamelMetaEndpointKind: string(knativeapi.CamelEndpointKindSource),
+ knativeapi.CamelMetaKnativeAPIVersion: ref.APIVersion,
+ knativeapi.CamelMetaKnativeKind: ref.Kind,
+ }
+ if t.FilterSourceChannels != nil && *t.FilterSourceChannels {
+ meta[knativeapi.CamelMetaFilterPrefix+knativeHistoryHeader] = loc.Host
+ }
+ svc := knativeapi.CamelServiceDefinition{
+ Name: ref.Name,
+ Host: "0.0.0.0",
+ Port: 8080,
+ ServiceType: knativeapi.CamelServiceTypeChannel,
+ Metadata: meta,
+ }
+ env.Services = append(env.Services, svc)
+
+ if err := t.createSubscription(e, ref); err != nil {
+ return err
+ }
+ return nil
+ })
if err != nil {
return err
}
- compat := t.Knative08CompatMode != nil && *t.Knative08CompatMode
-
- for _, ch := range channels {
- chRef, err := knativeutil.GetAddressableReference(t.ctx, t.client, types, e.Integration.Namespace, ch)
- if err != nil {
- return err
- }
- sub := knativeutil.CreateSubscription(*chRef, e.Integration.Name, compat)
- e.Resources.Add(sub)
+ // Sinks
+ err = t.ifServiceMissingDo(e, env, t.ChannelSinks, knativeapi.CamelServiceTypeChannel, knativeapi.CamelEndpointKindSink,
+ func(ref *v1.ObjectReference, loc *url.URL, serviceURI string) error {
+ svc, err := knativeapi.BuildCamelServiceDefinition(ref.Name, knativeapi.CamelEndpointKindSink,
+ knativeapi.CamelServiceTypeChannel, *loc, ref.APIVersion, ref.Kind)
+ if err != nil {
+ return err
+ }
+ env.Services = append(env.Services, svc)
+ return nil
+ })
+ if err != nil {
+ return err
}
return nil
}
-func (t *knativeTrait) configureChannels(e *Environment, env *knativeapi.CamelEnvironment) error {
- sources := t.extractNames(t.ChannelSources)
- sinks := t.extractNames(t.ChannelSinks)
-
- sr := strset.New(sources...)
- sk := strset.New(sinks...)
- is := strset.Intersection(sr, sk)
-
- if is.Size() > 0 {
- return fmt.Errorf("cannot use the same channels as source and sink (%s)", is.List())
- }
-
- types, err := decodeKindAPIGroupVersions(t.ChannelAPIs)
- if err != nil {
- return err
- }
+func (t *knativeTrait) createSubscription(e *Environment, ref *v1.ObjectReference) error {
+ compat := t.Knative08CompatMode != nil && *t.Knative08CompatMode
+ sub := knativeutil.CreateSubscription(*ref, e.Integration.Name, compat)
+ e.Resources.Add(sub)
+ return nil
+}
+func (t *knativeTrait) configureEndpoints(e *Environment, env *knativeapi.CamelEnvironment) error {
// Sources
- for _, ch := range sources {
- if env.ContainsService(ch, knativeapi.CamelServiceTypeChannel) {
- continue
- }
-
- targetURL, err := knativeutil.GetAnySinkURL(t.ctx, t.client, types, e.Integration.Namespace, ch)
- if err != nil && k8serrors.IsNotFound(err) {
- return errors.Errorf("cannot find channel %s", ch)
- } else if err != nil {
+ serviceSources := t.extractServices(t.EndpointSources, knativeapi.CamelServiceTypeEndpoint)
+ for _, endpoint := range serviceSources {
+ ref, err := knativeutil.ExtractObjectReference(endpoint)
+ if err != nil {
return err
}
-
- meta := map[string]string{
- knativeapi.CamelMetaServicePath: "/",
- }
- if t.FilterSourceChannels != nil && *t.FilterSourceChannels {
- meta[knativeapi.CamelMetaFilterHeaderName] = knativeHistoryHeader
- meta[knativeapi.CamelMetaFilterHeaderValue] = targetURL.Host
+ if env.ContainsService(endpoint, knativeapi.CamelEndpointKindSource, knativeapi.CamelServiceTypeEndpoint,
+ serving.SchemeGroupVersion.String(), "Service") {
+ continue
}
svc := knativeapi.CamelServiceDefinition{
- Name: ch,
+ Name: ref.Name,
Host: "0.0.0.0",
Port: 8080,
- Protocol: knativeapi.CamelProtocolHTTP,
- ServiceType: knativeapi.CamelServiceTypeChannel,
- Metadata: meta,
+ ServiceType: knativeapi.CamelServiceTypeEndpoint,
+ Metadata: map[string]string{
+ knativeapi.CamelMetaServicePath: "/",
+ knativeapi.CamelMetaEndpointKind: string(knativeapi.CamelEndpointKindSource),
+ knativeapi.CamelMetaKnativeAPIVersion: serving.SchemeGroupVersion.String(),
+ knativeapi.CamelMetaKnativeKind: "Service",
+ },
}
env.Services = append(env.Services, svc)
}
// Sinks
- for _, ch := range sinks {
- if env.ContainsService(ch, knativeapi.CamelServiceTypeChannel) {
- continue
- }
-
- targetURL, err := knativeutil.GetAnySinkURL(t.ctx, t.client, types, e.Integration.Namespace, ch)
- if err != nil && k8serrors.IsNotFound(err) {
- return errors.Errorf("cannot find channel %s", ch)
- } else if err != nil {
- return err
- }
- t.L.Infof("Found URL for channel %s: %s", ch, targetURL.String())
- svc, err := knativeapi.BuildCamelServiceDefinition(ch, knativeapi.CamelServiceTypeChannel, *targetURL)
- if err != nil {
- return errors.Wrapf(err, "cannot determine address of channel %s", ch)
- }
- env.Services = append(env.Services, svc)
+ err := t.ifServiceMissingDo(e, env, t.EndpointSinks, knativeapi.CamelServiceTypeEndpoint, knativeapi.CamelEndpointKindSink,
+ func(ref *v1.ObjectReference, loc *url.URL, serviceURI string) error {
+ svc, err := knativeapi.BuildCamelServiceDefinition(ref.Name, knativeapi.CamelEndpointKindSink,
+ knativeapi.CamelServiceTypeEndpoint, *loc, ref.APIVersion, ref.Kind)
+ if err != nil {
+ return err
+ }
+ env.Services = append(env.Services, svc)
+ return nil
+ })
+ if err != nil {
+ return err
}
return nil
}
-func (t *knativeTrait) configureEndpoints(e *Environment, env *knativeapi.CamelEnvironment) error {
- sources := t.extractNames(t.EndpointSources)
- sinks := t.extractNames(t.EndpointSinks)
-
- sr := strset.New(sources...)
- sk := strset.New(sinks...)
- is := strset.Intersection(sr, sk)
-
- if is.Size() > 0 {
- return fmt.Errorf("cannot use the same enadpoints as source and synk (%s)", is.List())
+func (t *knativeTrait) configureEvents(e *Environment, env *knativeapi.CamelEnvironment) error {
+ // Sources
+ err := t.withServiceDo(false, e, env, t.EventSources, knativeapi.CamelServiceTypeEvent, knativeapi.CamelEndpointKindSource,
+ func(ref *v1.ObjectReference, loc *url.URL, serviceURI string) error {
+ // Iterate over all, without skipping duplicates
+ eventType := knativeutil.ExtractEventType(serviceURI)
+ t.createTrigger(e, ref, eventType)
+
+ if !env.ContainsService(ref.Name, knativeapi.CamelEndpointKindSource, knativeapi.CamelServiceTypeEvent, ref.APIVersion, ref.Kind) {
+ svc := knativeapi.CamelServiceDefinition{
+ Name: ref.Name,
+ Host: "0.0.0.0",
+ Port: 8080,
+ ServiceType: knativeapi.CamelServiceTypeEvent,
+ Metadata: map[string]string{
+ knativeapi.CamelMetaServicePath: "/",
+ knativeapi.CamelMetaEndpointKind: string(knativeapi.CamelEndpointKindSource),
+ knativeapi.CamelMetaKnativeAPIVersion: ref.APIVersion,
+ knativeapi.CamelMetaKnativeKind: ref.Kind,
+ },
+ }
+ env.Services = append(env.Services, svc)
+ }
+ return nil
+ })
+ if err != nil {
+ return err
}
- types, err := decodeKindAPIGroupVersions(t.EndpointAPIs)
+ // Sinks
+ err = t.ifServiceMissingDo(e, env, t.EventSinks, knativeapi.CamelServiceTypeEvent, knativeapi.CamelEndpointKindSink,
+ func(ref *v1.ObjectReference, loc *url.URL, serviceURI string) error {
+ svc, err := knativeapi.BuildCamelServiceDefinition(ref.Name, knativeapi.CamelEndpointKindSink,
+ knativeapi.CamelServiceTypeEvent, *loc, ref.APIVersion, ref.Kind)
+ if err != nil {
+ return err
+ }
+ env.Services = append(env.Services, svc)
+ return nil
+ })
if err != nil {
return err
}
- // Sources
- for _, endpoint := range sources {
- if env.ContainsService(endpoint, knativeapi.CamelServiceTypeEndpoint) {
- continue
- }
- svc := knativeapi.CamelServiceDefinition{
- Name: endpoint,
- Host: "0.0.0.0",
- Port: 8080,
- Protocol: knativeapi.CamelProtocolHTTP,
- ServiceType: knativeapi.CamelServiceTypeEndpoint,
- Metadata: map[string]string{
- knativeapi.CamelMetaServicePath: "/",
- },
- }
- env.Services = append(env.Services, svc)
+ return nil
+}
+
+func (t *knativeTrait) createTrigger(e *Environment, ref *v1.ObjectReference, eventType string) {
+ // TODO extend to additional filters too, to filter them at source and not at destination
+ found := e.Resources.HasKnativeTrigger(func(trigger *eventing.Trigger) bool {
+ return trigger.Spec.Broker == ref.Name &&
+ trigger.Spec.Filter != nil &&
+ trigger.Spec.Filter.Attributes != nil &&
+ (*trigger.Spec.Filter.Attributes)["type"] == eventType
+ })
+ if !found {
+ trigger := knativeutil.CreateTrigger(*ref, e.Integration.Name, eventType)
+ e.Resources.Add(trigger)
}
+}
- // Sinks
- for _, endpoint := range sinks {
- if env.ContainsService(endpoint, knativeapi.CamelServiceTypeEndpoint) {
+func (t *knativeTrait) ifServiceMissingDo(
+ e *Environment,
+ env *knativeapi.CamelEnvironment,
+ serviceURIsAsString string,
+ serviceType knativeapi.CamelServiceType,
+ endpointKind knativeapi.CamelEndpointKind,
+ gen func(ref *v1.ObjectReference, url *url.URL, serviceURI string) error) error {
+ return t.withServiceDo(true, e, env, serviceURIsAsString, serviceType, endpointKind, gen)
+}
+
+func (t *knativeTrait) withServiceDo(
+ skipDuplicates bool,
+ e *Environment,
+ env *knativeapi.CamelEnvironment,
+ serviceURIsAsString string,
+ serviceType knativeapi.CamelServiceType,
+ endpointKind knativeapi.CamelEndpointKind,
+ gen func(ref *v1.ObjectReference, url *url.URL, serviceURI string) error) error {
+
+ serviceURIs := t.extractServices(serviceURIsAsString, serviceType)
+ for _, serviceURI := range serviceURIs {
+ ref, err := knativeutil.ExtractObjectReference(serviceURI)
+ if err != nil {
+ return err
+ }
+ if skipDuplicates && env.ContainsService(ref.Name, endpointKind, serviceType, ref.APIVersion, ref.Kind) {
continue
}
-
- targetURL, err := knativeutil.GetAnySinkURL(t.ctx, t.client, types, e.Integration.Namespace, endpoint)
+ possibleRefs := knativeutil.FillMissingReferenceData(serviceType, ref)
+ actualRef, err := knativeutil.GetAddressableReference(t.ctx, t.client, possibleRefs, e.Integration.Namespace, ref.Name)
if err != nil && k8serrors.IsNotFound(err) {
- return errors.Errorf("cannot find endpoint %s", endpoint)
+ return errors.Errorf("cannot find %s %s", serviceType, ref.Name)
} else if err != nil {
- return err
+ return errors.Wrapf(err, "error looking up %s %s", serviceType, ref.Name)
}
- t.L.Infof("Found URL for endpoint %s: %s", endpoint, targetURL.String())
- svc, err := knativeapi.BuildCamelServiceDefinition(endpoint, knativeapi.CamelServiceTypeEndpoint, *targetURL)
+ targetURL, err := knativeutil.GetSinkURL(t.ctx, t.client, actualRef, e.Integration.Namespace)
if err != nil {
- return errors.Wrapf(err, "cannot determine address of endpoint %s", endpoint)
+ return errors.Wrapf(err, "cannot determine address of %s %s", string(serviceType), ref.Name)
+ }
+ t.L.Infof("Found URL for %s: %s", string(serviceType), targetURL.String())
+ err = gen(actualRef, targetURL, serviceURI)
+ if err != nil {
+ return errors.Wrapf(err, "unexpected error while executing handler for %s %s", string(serviceType), ref.Name)
}
- env.Services = append(env.Services, svc)
}
-
return nil
}
-func (t *knativeTrait) extractNames(names string) []string {
+func (t *knativeTrait) extractServices(names string, serviceType knativeapi.CamelServiceType) []string {
answer := make([]string, 0)
for _, item := range strings.Split(names, ",") {
i := strings.Trim(item, " \t\"")
if i != "" {
+ i = knativeutil.NormalizeToURI(serviceType, i)
answer = append(answer, i)
}
}
-
return answer
}
func (t *knativeTrait) shouldUseKnative08CompatMode(namespace string) (bool, error) {
lst := messaging.SubscriptionList{
- TypeMeta: v1.TypeMeta{
+ TypeMeta: metav1.TypeMeta{
Kind: "Subscription",
APIVersion: messaging.SchemeGroupVersion.String(),
},
@@ -379,27 +419,3 @@ func (t *knativeTrait) shouldUseKnative08CompatMode(namespace string) (bool, err
}
return false, err
}
-
-func decodeKindAPIGroupVersions(specs []string) ([]schema.GroupVersionKind, error) {
- lst := make([]schema.GroupVersionKind, 0, len(specs))
- for _, spec := range specs {
- res, err := decodeKindAPIGroupVersion(spec)
- if err != nil {
- return lst, err
- }
- lst = append(lst, res)
- }
- return lst, nil
-}
-
-func decodeKindAPIGroupVersion(spec string) (schema.GroupVersionKind, error) {
- if !kindAPIGroupVersionFormat.MatchString(spec) {
- return schema.GroupVersionKind{}, errors.Errorf("spec does not match the Group/Version/Kind format: %s", spec)
- }
- matches := kindAPIGroupVersionFormat.FindStringSubmatch(spec)
- return schema.GroupVersionKind{
- Group: matches[1],
- Version: matches[2],
- Kind: matches[3],
- }, nil
-}
diff --git a/pkg/trait/knative_test.go b/pkg/trait/knative_test.go
index 422eccd..8cf3084 100644
--- a/pkg/trait/knative_test.go
+++ b/pkg/trait/knative_test.go
@@ -22,7 +22,6 @@ import (
"testing"
"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/envvar"
"github.com/apache/camel-k/pkg/util/test"
@@ -34,7 +33,6 @@ import (
k8sutils "github.com/apache/camel-k/pkg/util/kubernetes"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime/schema"
messaging "knative.dev/eventing/pkg/apis/messaging/v1alpha1"
"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"
@@ -122,22 +120,22 @@ func TestKnativeEnvConfigurationFromTrait(t *testing.T) {
err = ne.Deserialize(kc.Value)
assert.Nil(t, err)
- cSource1 := ne.FindService("channel-source-1", knativeapi.CamelServiceTypeChannel)
+ cSource1 := ne.FindService("channel-source-1", knativeapi.CamelEndpointKindSource, knativeapi.CamelServiceTypeChannel, "messaging.knative.dev/v1alpha1", "Channel")
assert.NotNil(t, cSource1)
assert.Equal(t, "0.0.0.0", cSource1.Host)
- cSink1 := ne.FindService("channel-sink-1", knativeapi.CamelServiceTypeChannel)
+ cSink1 := ne.FindService("channel-sink-1", knativeapi.CamelEndpointKindSink, knativeapi.CamelServiceTypeChannel, "messaging.knative.dev/v1alpha1", "Channel")
assert.NotNil(t, cSink1)
assert.Equal(t, "channel-sink-1.host", cSink1.Host)
- eSource1 := ne.FindService("endpoint-source-1", knativeapi.CamelServiceTypeEndpoint)
+ eSource1 := ne.FindService("endpoint-source-1", knativeapi.CamelEndpointKindSource, knativeapi.CamelServiceTypeEndpoint, "serving.knative.dev/v1beta1", "Service")
assert.NotNil(t, eSource1)
assert.Equal(t, "0.0.0.0", eSource1.Host)
- eSink1 := ne.FindService("endpoint-sink-1", knativeapi.CamelServiceTypeEndpoint)
+ eSink1 := ne.FindService("endpoint-sink-1", knativeapi.CamelEndpointKindSink, knativeapi.CamelServiceTypeEndpoint, "serving.knative.dev/v1beta1", "Service")
assert.NotNil(t, eSink1)
assert.Equal(t, "endpoint-sink-1.host", eSink1.Host)
- eSink2 := ne.FindService("endpoint-sink-2", knativeapi.CamelServiceTypeEndpoint)
+ eSink2 := ne.FindService("endpoint-sink-2", knativeapi.CamelEndpointKindSink, knativeapi.CamelServiceTypeEndpoint, "serving.knative.dev/v1beta1", "Service")
assert.NotNil(t, eSink2)
assert.Equal(t, "endpoint-sink-2.host", eSink2.Host)
}
@@ -232,29 +230,12 @@ func TestKnativeEnvConfigurationFromSource(t *testing.T) {
err = ne.Deserialize(kc.Value)
assert.Nil(t, err)
- source := ne.FindService("s3fileMover1", knativeapi.CamelServiceTypeEndpoint)
+ source := ne.FindService("s3fileMover1", knativeapi.CamelEndpointKindSource, knativeapi.CamelServiceTypeEndpoint, "serving.knative.dev/v1beta1", "Service")
assert.NotNil(t, source)
- assert.Equal(t, knative.CamelProtocolHTTP, source.Protocol)
assert.Equal(t, "0.0.0.0", source.Host)
assert.Equal(t, 8080, source.Port)
}
-func TestDecodeKindAPIGroupVersion(t *testing.T) {
- kgv, err := decodeKindAPIGroupVersion("messaging.knative.dev/v1alpha1/Channel")
- assert.Nil(t, err)
- assert.Equal(t, schema.GroupVersionKind{
- Group: "messaging.knative.dev",
- Version: "v1alpha1",
- Kind: "Channel",
- }, kgv)
-
- _, err = decodeKindAPIGroupVersion("messaging.knative.dev/v1alpha1/Chann/el/")
- assert.NotNil(t, err)
-
- _, err = decodeKindAPIGroupVersion("messaging.knative.dev/v1alpha1")
- assert.NotNil(t, err)
-}
-
func NewFakeClient(namespace string) (client.Client, error) {
sink1URL, err := apis.ParseURL("http://endpoint-sink-1.host/")
if err != nil {
diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go
index a728332..d30b181 100644
--- a/pkg/util/defaults/defaults.go
+++ b/pkg/util/defaults/defaults.go
@@ -31,10 +31,10 @@ const (
CamelVersionConstraint = ">=3.0.0-RC1"
// DefaultRuntimeVersion --
- DefaultRuntimeVersion = "1.0.4"
+ DefaultRuntimeVersion = "1.0.5-SNAPSHOT"
// RuntimeVersionConstraint --
- RuntimeVersionConstraint = ">=1.0.4"
+ RuntimeVersionConstraint = ">=1.0.5-SNAPSHOT"
// KanikoVersion --
KanikoVersion = "0.9.0"
diff --git a/pkg/util/knative/apis.go b/pkg/util/knative/apis.go
new file mode 100644
index 0000000..bb80509
--- /dev/null
+++ b/pkg/util/knative/apis.go
@@ -0,0 +1,155 @@
+/*
+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 (
+ knativev1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative"
+ "github.com/apache/camel-k/pkg/util"
+ v1 "k8s.io/api/core/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ // KnownChannelKinds are known channel kinds belonging to Knative
+ KnownChannelKinds = []schema.GroupVersionKind{
+ {
+ Kind: "Channel",
+ Group: "messaging.knative.dev",
+ Version: "v1alpha1",
+ },
+ {
+ Kind: "Channel",
+ Group: "eventing.knative.dev",
+ Version: "v1alpha1",
+ },
+ {
+ Kind: "InMemoryChannel",
+ Group: "messaging.knative.dev",
+ Version: "v1alpha1",
+ },
+ {
+ Kind: "KafkaChannel",
+ Group: "messaging.knative.dev",
+ Version: "v1alpha1",
+ },
+ {
+ Kind: "NatssChannel",
+ Group: "messaging.knative.dev",
+ Version: "v1alpha1",
+ },
+ }
+
+ // KnownEndpointKinds are known endpoint kinds belonging to Knative
+ KnownEndpointKinds = []schema.GroupVersionKind{
+ {
+ Kind: "Service",
+ Group: "serving.knative.dev",
+ Version: "v1beta1",
+ },
+ {
+ Kind: "Service",
+ Group: "serving.knative.dev",
+ Version: "v1alpha1",
+ },
+ {
+ Kind: "Service",
+ Group: "serving.knative.dev",
+ Version: "v1",
+ },
+ }
+
+ // KnownBrokerKinds are known broker kinds belonging to Knative
+ KnownBrokerKinds = []schema.GroupVersionKind{
+ {
+ Kind: "Broker",
+ Group: "eventing.knative.dev",
+ Version: "v1alpha1",
+ },
+ }
+)
+
+func init() {
+ // Channels are also endpoints
+ KnownEndpointKinds = append(KnownEndpointKinds, KnownChannelKinds...)
+ // Let's add the brokers as last
+ KnownEndpointKinds = append(KnownEndpointKinds, KnownBrokerKinds...)
+}
+
+// FillMissingReferenceData returns all possible combinations of ObjectReference that can be obtained by filling the missing fields
+// with known data.
+func FillMissingReferenceData(serviceType knativev1.CamelServiceType, ref v1.ObjectReference) []v1.ObjectReference {
+ var refs []v1.ObjectReference
+ switch serviceType {
+ case knativev1.CamelServiceTypeChannel:
+ refs = fillMissingReferenceDataWith(KnownChannelKinds, ref)
+ case knativev1.CamelServiceTypeEndpoint:
+ refs = fillMissingReferenceDataWith(KnownEndpointKinds, ref)
+ case knativev1.CamelServiceTypeEvent:
+ refs = fillMissingReferenceDataWith(KnownBrokerKinds, ref)
+ }
+
+ return refs
+}
+
+// nolint: gocritic
+func fillMissingReferenceDataWith(serviceTypes []schema.GroupVersionKind, ref v1.ObjectReference) []v1.ObjectReference {
+ list := make([]v1.ObjectReference, 0)
+ if ref.APIVersion == "" && ref.Kind == "" {
+ for _, st := range serviceTypes {
+ refCopy := ref.DeepCopy()
+ refCopy.APIVersion = st.GroupVersion().String()
+ refCopy.Kind = st.Kind
+ list = append(list, *refCopy)
+ }
+ } else if ref.APIVersion == "" {
+ for _, gv := range getGroupVersions(serviceTypes, ref.Kind) {
+ refCopy := ref.DeepCopy()
+ refCopy.APIVersion = gv
+ list = append(list, *refCopy)
+ }
+ } else if ref.Kind == "" {
+ for _, k := range getKinds(serviceTypes, ref.APIVersion) {
+ refCopy := ref.DeepCopy()
+ refCopy.Kind = k
+ list = append(list, *refCopy)
+ }
+ } else {
+ list = append(list, ref)
+ }
+ return list
+}
+
+func getGroupVersions(serviceTypes []schema.GroupVersionKind, kind string) []string {
+ res := make([]string, 0)
+ for _, st := range serviceTypes {
+ if st.Kind == kind {
+ util.StringSliceUniqueAdd(&res, st.GroupVersion().String())
+ }
+ }
+ return res
+}
+
+func getKinds(serviceTypes []schema.GroupVersionKind, apiVersion string) []string {
+ res := make([]string, 0)
+ for _, st := range serviceTypes {
+ if st.GroupVersion().String() == apiVersion {
+ util.StringSliceUniqueAdd(&res, st.Kind)
+ }
+ }
+ return res
+}
diff --git a/pkg/util/knative/apis_test.go b/pkg/util/knative/apis_test.go
new file mode 100644
index 0000000..ab573b9
--- /dev/null
+++ b/pkg/util/knative/apis_test.go
@@ -0,0 +1,165 @@
+/*
+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/pkg/apis/camel/v1alpha1/knative"
+ "github.com/stretchr/testify/assert"
+ v1 "k8s.io/api/core/v1"
+)
+
+func TestAPIs(t *testing.T) {
+ ref, err := ExtractObjectReference("knative:endpoint/ciao")
+ assert.Nil(t, err)
+ refs := FillMissingReferenceData(knative.CamelServiceTypeEndpoint, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Service",
+ APIVersion: "serving.knative.dev/v1beta1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?apiVersion=serving.knative.dev/v1")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEndpoint, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, 1, len(refs))
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Service",
+ APIVersion: "serving.knative.dev/v1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?apiVersion=serving.knative.dev/v1&kind=Xxx")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEndpoint, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, 1, len(refs))
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Xxx",
+ APIVersion: "serving.knative.dev/v1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?apiVersion=yyy&kind=Xxx")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEndpoint, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, 1, len(refs))
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Xxx",
+ APIVersion: "yyy",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?kind=Service")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEndpoint, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Service",
+ APIVersion: "serving.knative.dev/v1beta1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?kind=Channel")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEndpoint, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Channel",
+ APIVersion: "messaging.knative.dev/v1alpha1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?kind=KafkaChannel")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEndpoint, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "KafkaChannel",
+ APIVersion: "messaging.knative.dev/v1alpha1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:channel/ciao")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeChannel, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Channel",
+ APIVersion: "messaging.knative.dev/v1alpha1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:channel/ciao?apiVersion=eventing.knative.dev/v1alpha1")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeChannel, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Channel",
+ APIVersion: "eventing.knative.dev/v1alpha1",
+ Name: "ciao",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:channel/ciao?apiVersion=xxx.knative.dev/v1alpha1")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeChannel, ref)
+ assert.Equal(t, 0, len(refs))
+
+ ref, err = ExtractObjectReference("knative:event/ciao")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEvent, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Broker",
+ APIVersion: "eventing.knative.dev/v1alpha1",
+ Name: "default",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:event/ciao?brokerApiVersion=xxx")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEvent, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Broker",
+ APIVersion: "xxx",
+ Name: "default",
+ }, refs[0])
+
+ ref, err = ExtractObjectReference("knative:event/ciao?brokerName=aaa")
+ assert.Nil(t, err)
+ refs = FillMissingReferenceData(knative.CamelServiceTypeEvent, ref)
+ checkValidRefs(t, refs)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Broker",
+ APIVersion: "eventing.knative.dev/v1alpha1",
+ Name: "aaa",
+ }, refs[0])
+}
+
+func checkValidRefs(t *testing.T, refs []v1.ObjectReference) {
+ assert.True(t, len(refs) > 0)
+ for _, ref := range refs {
+ assert.NotNil(t, ref.Name)
+ assert.NotNil(t, ref.Kind)
+ assert.NotNil(t, ref.APIVersion)
+ }
+}
diff --git a/pkg/util/knative/knative.go b/pkg/util/knative/knative.go
index bc5b3bd..eaaa470 100644
--- a/pkg/util/knative/knative.go
+++ b/pkg/util/knative/knative.go
@@ -103,49 +103,64 @@ func CreateSubscription(channelReference corev1.ObjectReference, serviceName str
return &subs
}
-// GetAnySinkURL looks up the resource among all given types and returns the resource sink URL if present
-func GetAnySinkURL(ctx context.Context, c client.Client, types []schema.GroupVersionKind, namespace string, name string) (*url.URL, error) {
- for _, gvk := range types {
- sink := corev1.ObjectReference{
- Kind: gvk.Kind,
- APIVersion: gvk.GroupVersion().String(),
- Namespace: namespace,
- Name: name,
- }
-
- res, err := GetSinkURI(ctx, c, &sink, namespace)
- if err != nil && (k8serrors.IsNotFound(err) || kubernetesutils.IsUnknownAPIError(err)) {
- continue
- } else if err != nil {
- return nil, err
- }
- return url.Parse(res)
+// CreateTrigger ---
+func CreateTrigger(brokerReference corev1.ObjectReference, serviceName string, eventType string) runtime.Object {
+ subs := eventing.Trigger{
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: eventing.SchemeGroupVersion.String(),
+ Kind: "Trigger",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: brokerReference.Namespace,
+ Name: brokerReference.Name + "-" + serviceName + "-" + eventType,
+ },
+ Spec: eventing.TriggerSpec{
+ Filter: &eventing.TriggerFilter{
+ Attributes: &eventing.TriggerFilterAttributes{
+ "type": eventType,
+ },
+ },
+ Broker: brokerReference.Name,
+ Subscriber: &messaging.SubscriberSpec{
+ Ref: &corev1.ObjectReference{
+ APIVersion: serving.SchemeGroupVersion.String(),
+ Kind: "Service",
+ Name: serviceName,
+ },
+ },
+ },
}
- return nil, k8serrors.NewNotFound(schema.GroupResource{}, name)
+ return &subs
}
// GetAddressableReference looks up the resource among all given types and returns an object reference to it
-func GetAddressableReference(ctx context.Context, c client.Client, types []schema.GroupVersionKind, namespace string, name string) (*corev1.ObjectReference, error) {
- for _, gvk := range types {
- sink := corev1.ObjectReference{
- Kind: gvk.Kind,
- APIVersion: gvk.GroupVersion().String(),
- Namespace: namespace,
- Name: name,
- }
+func GetAddressableReference(ctx context.Context, c client.Client,
+ possibleReferences []corev1.ObjectReference, namespace string, name string) (*corev1.ObjectReference, error) {
- _, err := GetSinkURI(ctx, c, &sink, namespace)
+ for _, ref := range possibleReferences {
+ sink := ref.DeepCopy()
+ sink.Namespace = namespace
+ _, err := GetSinkURI(ctx, c, sink, namespace)
if err != nil && (k8serrors.IsNotFound(err) || kubernetesutils.IsUnknownAPIError(err)) {
continue
} else if err != nil {
return nil, err
}
- return &sink, nil
+ return sink, nil
}
return nil, k8serrors.NewNotFound(schema.GroupResource{}, name)
}
+// GetSinkURL returns the sink as *url.URL
+func GetSinkURL(ctx context.Context, c client.Client, sink *corev1.ObjectReference, namespace string) (*url.URL, error) {
+ res, err := GetSinkURI(ctx, c, sink, namespace)
+ if err != nil {
+ return nil, err
+ }
+ return url.Parse(res)
+}
+
// GetSinkURI retrieves the sink URI from the object referenced by the given
// ObjectReference.
//
diff --git a/pkg/util/knative/uri.go b/pkg/util/knative/uri.go
index c2f50ed..897b422 100644
--- a/pkg/util/knative/uri.go
+++ b/pkg/util/knative/uri.go
@@ -18,52 +18,84 @@ limitations under the License.
package knative
import (
+ "fmt"
"regexp"
knativev1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative"
+ v1 "k8s.io/api/core/v1"
)
-var uriRegexp = regexp.MustCompile(`^knative:[/]*(channel|endpoint)/([a-z>-Z0-9.-]+)(?:[/?].*|$)`)
+var uriRegexp = regexp.MustCompile(`^knative:[/]*(channel|endpoint|event)/([A-Za-z0-9.-]+)(?:[/?].*|$)`)
+var plainNameRegexp = regexp.MustCompile(`^[A-Za-z0-9.-]+$`)
+var queryExtractorRegexp = `^[^?]+\?(?:|.*[&])%s=([^&]+)(?:[&].*|$)`
+var apiVersionRegexp = regexp.MustCompile(fmt.Sprintf(queryExtractorRegexp, "apiVersion"))
+var kindRegexp = regexp.MustCompile(fmt.Sprintf(queryExtractorRegexp, "kind"))
+var brokerNameRegexp = regexp.MustCompile(fmt.Sprintf(queryExtractorRegexp, "brokerName"))
+var brokerAPIVersion = regexp.MustCompile(fmt.Sprintf(queryExtractorRegexp, "brokerApiVersion"))
-// ExtractChannelNames extracts all Knative named channels from the given URIs
-func ExtractChannelNames(uris []string) []string {
- channels := make([]string, 0)
+// FilterURIs returns all Knative URIs of the given type from a slice
+func FilterURIs(uris []string, kind knativev1.CamelServiceType) []string {
+ res := make([]string, 0)
for _, uri := range uris {
- channel := ExtractChannelName(uri)
- if channel != "" {
- channels = append(channels, channel)
+ if isKnativeURI(kind, uri) {
+ res = append(res, uri)
}
}
- return channels
+ return res
}
-// ExtractChannelName returns a channel name from the Knative URI if present
-func ExtractChannelName(uri string) string {
- return ExtractName(knativev1.CamelServiceTypeChannel, uri)
+// NormalizeToURI produces a Knative uri of the given service type if the argument is a plain string
+func NormalizeToURI(kind knativev1.CamelServiceType, uriOrString string) string {
+ if plainNameRegexp.MatchString(uriOrString) {
+ return fmt.Sprintf("knative://%s/%s", string(kind), uriOrString)
+ }
+ return uriOrString
}
-// ExtractEndpointNames extracts all Knative named endpoints from the given URIs
-func ExtractEndpointNames(uris []string) []string {
- channels := make([]string, 0)
- for _, uri := range uris {
- channel := ExtractEndpointlName(uri)
- if channel != "" {
- channels = append(channels, channel)
+// ExtractObjectReference returns a reference to the object described in the Knative URI
+func ExtractObjectReference(uri string) (v1.ObjectReference, error) {
+ if isKnativeURI(knativev1.CamelServiceTypeEvent, uri) {
+ name := matchOrEmpty(brokerNameRegexp, 1, uri)
+ if name == "" {
+ name = "default"
}
+ apiVersion := matchOrEmpty(brokerAPIVersion, 1, uri)
+ return v1.ObjectReference{
+ Name: name,
+ APIVersion: apiVersion,
+ Kind: "Broker",
+ }, nil
}
- return channels
+ name := matchOrEmpty(uriRegexp, 2, uri)
+ if name == "" {
+ return v1.ObjectReference{}, fmt.Errorf("cannot find name in uri %s", uri)
+ }
+ apiVersion := matchOrEmpty(apiVersionRegexp, 1, uri)
+ kind := matchOrEmpty(kindRegexp, 1, uri)
+ return v1.ObjectReference{
+ Name: name,
+ APIVersion: apiVersion,
+ Kind: kind,
+ }, nil
+}
+
+// ExtractEventType extract the eventType from a event URI
+func ExtractEventType(uri string) string {
+ return matchOrEmpty(uriRegexp, 2, uri)
}
-// ExtractEndpointlName returns an endpoint name from the Knative URI if present
-func ExtractEndpointlName(uri string) string {
- return ExtractName(knativev1.CamelServiceTypeEndpoint, uri)
+func matchOrEmpty(reg *regexp.Regexp, index int, str string) string {
+ match := reg.FindStringSubmatch(str)
+ if len(match) > index {
+ return match[index]
+ }
+ return ""
}
-// ExtractName returns a channel name from the Knative URI if present
-func ExtractName(kind knativev1.CamelServiceType, uri string) string {
+func isKnativeURI(kind knativev1.CamelServiceType, uri string) bool {
match := uriRegexp.FindStringSubmatch(uri)
if len(match) == 3 && match[1] == string(kind) {
- return match[2]
+ return true
}
- return ""
+ return false
}
diff --git a/pkg/util/knative/uri_test.go b/pkg/util/knative/uri_test.go
index 2db2e70..bea4374 100644
--- a/pkg/util/knative/uri_test.go
+++ b/pkg/util/knative/uri_test.go
@@ -20,29 +20,79 @@ package knative
import (
"testing"
+ "github.com/apache/camel-k/pkg/apis/camel/v1alpha1/knative"
"github.com/stretchr/testify/assert"
+ v1 "k8s.io/api/core/v1"
)
func TestChannelUri(t *testing.T) {
- assert.Equal(t, "pippo", ExtractChannelName("knative:channel/pippo"))
- assert.Equal(t, "pippo1", ExtractChannelName("knative://channel/pippo1"))
- assert.Equal(t, "pippo-2", ExtractChannelName("knative://channel/pippo-2?pluto=12"))
- assert.Equal(t, "pip-p-o", ExtractChannelName("knative:/channel/pip-p-o?pluto=12"))
- assert.Equal(t, "pip.po", ExtractChannelName("knative:channel/pip.po?pluto=12"))
- assert.Equal(t, "pip.po-1", ExtractChannelName("knative:channel/pip.po-1/hello"))
- assert.Empty(t, ExtractChannelName("http://wikipedia.org"))
- assert.Empty(t, ExtractChannelName("a:knative:channel/chan"))
- assert.Empty(t, ExtractChannelName("knative:channel/pippa$"))
+ ref, err := ExtractObjectReference("knative:endpoint/ciao")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "",
+ APIVersion: "",
+ Name: "ciao",
+ }, ref)
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?apiVersion=xxx")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "",
+ APIVersion: "xxx",
+ Name: "ciao",
+ }, ref)
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?x=y&apiVersion=xxx")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "",
+ APIVersion: "xxx",
+ Name: "ciao",
+ }, ref)
+
+ ref, err = ExtractObjectReference("knative:channel/ciao2?x=y&apiVersion=eventing.knative.dev/v1&kind=KafkaChannel")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "KafkaChannel",
+ APIVersion: "eventing.knative.dev/v1",
+ Name: "ciao2",
+ }, ref)
+
+ ref, err = ExtractObjectReference("knative:endpoint/ciao?aapiVersion=xxx&kind=Broker")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Broker",
+ APIVersion: "",
+ Name: "ciao",
+ }, ref)
+
+ ref, err = ExtractObjectReference("knative://endpoint/ciao?&apiVersion=serving.knative.dev/v1alpha1&kind=Service&1=1")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ Kind: "Service",
+ APIVersion: "serving.knative.dev/v1alpha1",
+ Name: "ciao",
+ }, ref)
+
+ ref, err = ExtractObjectReference("knative://event/chuck?&brokerApiVersion=eventing.knative.dev/v1alpha1&brokerName=broker2")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ APIVersion: "eventing.knative.dev/v1alpha1",
+ Name: "broker2",
+ Kind: "Broker",
+ }, ref)
+
+ ref, err = ExtractObjectReference("knative://event/chuck?&brokerApxxiVersion=eventing.knative.dev/v1alpha1&brokxerName=broker2")
+ assert.Nil(t, err)
+ assert.Equal(t, v1.ObjectReference{
+ Name: "default",
+ Kind: "Broker",
+ }, ref)
}
-func TestEndpointUri(t *testing.T) {
- assert.Equal(t, "pippo", ExtractEndpointlName("knative:endpoint/pippo"))
- assert.Equal(t, "pippo1", ExtractEndpointlName("knative://endpoint/pippo1"))
- assert.Equal(t, "pippo-2", ExtractEndpointlName("knative://endpoint/pippo-2?pluto=12"))
- assert.Equal(t, "pip-p-o", ExtractEndpointlName("knative:/endpoint/pip-p-o?pluto=12"))
- assert.Equal(t, "pip.po", ExtractEndpointlName("knative:endpoint/pip.po?pluto=12"))
- assert.Equal(t, "pip.po-1", ExtractEndpointlName("knative:endpoint/pip.po-1/hello"))
- assert.Empty(t, ExtractEndpointlName("http://wikipedia.org"))
- assert.Empty(t, ExtractEndpointlName("a:knative:endpoint/chan"))
- assert.Empty(t, ExtractEndpointlName("knative:endpoint/pippa$"))
+func TestNormalizeToUri(t *testing.T) {
+ assert.Equal(t, "knative://channel/name.chan", NormalizeToURI(knative.CamelServiceTypeChannel, "name.chan"))
+ assert.Equal(t, "knative://event/chuck", NormalizeToURI(knative.CamelServiceTypeEvent, "chuck"))
+ assert.Equal(t, "knative://endpoint/xx", NormalizeToURI(knative.CamelServiceTypeEndpoint, "xx"))
+ assert.Equal(t, "direct:xxx", NormalizeToURI(knative.CamelServiceTypeChannel, "direct:xxx"))
}
diff --git a/pkg/util/kubernetes/collection.go b/pkg/util/kubernetes/collection.go
index bc84cea..eb6a00d 100644
--- a/pkg/util/kubernetes/collection.go
+++ b/pkg/util/kubernetes/collection.go
@@ -24,6 +24,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
+ eventing "knative.dev/eventing/pkg/apis/eventing/v1alpha1"
servingv1 "knative.dev/serving/pkg/apis/serving/v1"
serving "knative.dev/serving/pkg/apis/serving/v1beta1"
)
@@ -248,6 +249,27 @@ func (c *Collection) VisitKnativeService(visitor func(*serving.Service)) {
})
}
+// VisitKnativeTrigger executes the visitor function on all Knative eventing Trigger resources
+func (c *Collection) VisitKnativeTrigger(visitor func(trigger *eventing.Trigger)) {
+ c.Visit(func(res runtime.Object) {
+ if conv, ok := res.(*eventing.Trigger); ok {
+ visitor(conv)
+ }
+ })
+}
+
+// HasKnativeTrigger returns true if a Knative trigger respecting filter is found
+func (c *Collection) HasKnativeTrigger(filter func(trigger *eventing.Trigger) bool) bool {
+ var retValue *bool
+ c.VisitKnativeTrigger(func(re *eventing.Trigger) {
+ if filter(re) {
+ found := true
+ retValue = &found
+ }
+ })
+ return retValue != nil && *retValue
+}
+
// GetContainer --
func (c *Collection) GetContainer(filter func(container *corev1.Container) bool) *corev1.Container {
var retValue *corev1.Container
diff --git a/script/Makefile b/script/Makefile
index 55c53d9..c995430 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -16,8 +16,8 @@
VERSIONFILE := pkg/util/defaults/defaults.go
VERSION := 1.0.0-M3-SNAPSHOT
LAST_RELEASED_VERSION := 1.0.0-M1
-RUNTIME_VERSION := 1.0.4
-RUNTIME_VERSION_CONSTRAINT := >=1.0.4
+RUNTIME_VERSION := 1.0.5-SNAPSHOT
+RUNTIME_VERSION_CONSTRAINT := >=1.0.5-SNAPSHOT
CAMEL_VERSION := 3.0.0-RC1
CAMEL_VERSION_CONSTRAINT := >=3.0.0-RC1
KANIKO_VERSION := 0.9.0