-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
camel-k-1.10
-
None
-
False
-
None
-
False
-
%
-
Todo
-
-
-
Very Likely
On OCP 4.11, with Camel K 1.10.0CK5, I observe following problem in kameletbinding with jslt-action, if parameter template points to "file:":
1. in case template points to file in current directory, integration runs correctly
2. otherwise the file seems to be searched for in pod of created integration (ie. if I use either relative or absolute path to the transformation file on my drive)
Ad 2. - As a workaround I created configmap and mounted it via trait mount.resources in the kameletbinding; it was created in the integration pod in default location /etc/camel/resources/, so I could specify in template parameter path 'file:///etc/camel/resources/myconfigmap/jslt':
apiVersion: camel.apache.org/v1alpha1 kind: KameletBinding metadata: annotations: trait.camel.apache.org/mount.resources: 'configmap:myconfigmap' name: jslt-kbind spec: source: ref: kind: Kamelet apiVersion: camel.apache.org/v1alpha1 name: timer-source properties: message: '{"from":{ "first_name":"MyCamelBot"},"text":"third msg"}' steps: - ref: kind: Kamelet apiVersion: camel.apache.org/v1alpha1 name: jslt-action properties: #template: file://myfile.jslt # OK - file in current directory #template: file://mylocaldir/myfile.jslt #NOK - file doesn't exist #template: file://./mylocaldir/myfile.jslt #NOK #template: file:///tmp/mylocaldir/myfile.jslt #NOK template: 'file:///etc/camel/resources/myconfigmap/jslt' sink: ref: kind: Kamelet apiVersion: camel.apache.org/v1alpha1 name: log-sink
$ oc get cm myconfigmap -o yaml apiVersion: v1 data: jslt: .foo kind: ConfigMap metadata: name: myconfigmap