You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/01/06 15:35:35 UTC

[GitHub] [camel-k] lancerdima opened a new issue #1882: Can't use Kamelets from Integration yaml resources

lancerdima opened a new issue #1882:
URL: https://github.com/apache/camel-k/issues/1882


   Using code from documentation as a guiding point (https://camel.apache.org/camel-k/latest/architecture/sources.html).
   
   I create integration as k8s yaml resources and run it directly by applying to k8s cluster, without the help of kamel CLI.
   I want to use kamelets to enable reuse of my connectivity points.
   Integration fails to start, due to error: `unable to find an EndpointUriFactory for scheme kamelet`
   k8s cluster (local docker desktop) has v1.3 camelK runtime.
   
   #### kamelet.yaml
   ```
   apiVersion: camel.apache.org/v1alpha1
   kind: Kamelet
   metadata:
     name: timer-source
     labels:
       camel.apache.org/kamelet.type: "source"
   spec:
     definition:
       title: "Timer"
       description: "Produces periodic events with a custom payload"
       required:
         - message
       properties:
         payload:
           title: Payload
           description: The message to generate as payload of each Cloudevent
           type: string
   
     types:
       out:
         mediaType: text/plain
   
     flow:
       from:
         uri: timer:kameletTimer
         parameters:
           fixedRate: true
           period: 1000
         steps:
           - log: "{{message}}"
           - to: "kamelet:sink"
   
   ```
   
   #### integration.yaml
   ```
   apiVersion: camel.apache.org/v1
   kind: Integration
   metadata:
     name: timer-integration
   spec:
     flows:
       - from:
           uri: kamelet:timer-source
           parameters:
             payload: "Hello World"
           steps:
             - log: "${body}"
   
   ```
   
   Integration fails to start with error:
   ```
   2021-01-06 15:25:49,298 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: java.lang.IllegalArgumentException: Cannot compute endpoint URI: unable to find an EndpointUriFactory for scheme kamelet
   	at org.apache.camel.k.loader.yaml.support.StepParserSupport.getEndpointUriFactory(StepParserSupport.java:121)
   	at org.apache.camel.k.loader.yaml.support.StepParserSupport.createEndpointUri(StepParserSupport.java:84)
   	at org.apache.camel.k.loader.yaml.parser.FromStepParser.process(FromStepParser.java:39)
   	at org.apache.camel.k.loader.yaml.spi.StartStepParser.invoke(StartStepParser.java:28)
   	at org.apache.camel.k.loader.yaml.YamlSourceLoader$1.accept(YamlSourceLoader.java:80)
   	at org.apache.camel.k.loader.yaml.YamlSourceLoader$1.accept(YamlSourceLoader.java:76)
   	at org.apache.camel.k.support.RouteBuilders$3.configure(RouteBuilders.java:57)
   	at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:483)
   	at org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:430)
   	at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:405)
   	at org.apache.camel.impl.engine.AbstractCamelContext.addRoutes(AbstractCamelContext.java:1110)
   	at org.apache.camel.main.RoutesConfigurer.configureRoutes(RoutesConfigurer.java:94)
   	at org.apache.camel.main.BaseMainSupport.configureRoutes(BaseMainSupport.java:454)
   	at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:474)
   	at org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:97)
   	at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:67)
   	at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
   	at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:118)
   	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
   	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
   	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
   	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
   	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:534)
   	at io.quarkus.runtime.Application.start(Application.java:90)
   	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:97)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:62)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:104)
   	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez edited a comment on issue #1882: Can't use Kamelets from Integration yaml resources

Posted by GitBox <gi...@apache.org>.
squakez edited a comment on issue #1882:
URL: https://github.com/apache/camel-k/issues/1882#issuecomment-755987780


   Hi there, what camel k operator version are you using? Kamelets were introduced starting version 1.2, is your operator up to date?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #1882: Can't use Kamelets from Integration yaml resources

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #1882:
URL: https://github.com/apache/camel-k/issues/1882#issuecomment-763715577


   While having a patch release, as a workaround, we can omit parameters and put them as query parameters such as:
   ```
   - from:
       uri: "kamelet:timer-source?payload=Hello%20World&message=Hello%20World"
       steps:
         - log: "${body}"
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] lburgazzoli closed issue #1882: Can't use Kamelets from Integration yaml resources

Posted by GitBox <gi...@apache.org>.
lburgazzoli closed issue #1882:
URL: https://github.com/apache/camel-k/issues/1882


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #1882: Can't use Kamelets from Integration yaml resources

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #1882:
URL: https://github.com/apache/camel-k/issues/1882#issuecomment-756642454


   I've run some test and it seems to be a possible bug in the yaml loader. The issue is appearing also when a yaml integration is run via `kamel`. As an example, given the `kamelet` mentioned above and the `test.yaml` file with content:
   ```
   - from:
       uri: "kamelet:timer-source"
       parameters:
         payload: "Hello World"
         message: "Hello World"
       steps:
         - log: "${body}"
   ```
   Running `kamel run test.yaml` would produce the same result.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] lancerdima commented on issue #1882: Can't use Kamelets from Integration yaml resources

Posted by GitBox <gi...@apache.org>.
lancerdima commented on issue #1882:
URL: https://github.com/apache/camel-k/issues/1882#issuecomment-756035073


   It's 1.3 (image: docker.io/apache/camel-k:1.3.0)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #1882: Can't use Kamelets from Integration yaml resources

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #1882:
URL: https://github.com/apache/camel-k/issues/1882#issuecomment-755987780


   Hi there, what camel k operator version are you using? Kamelets were introducing starting version 1.2, is your operator up to date?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #1882: Can't use Kamelets from Integration yaml resources

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #1882:
URL: https://github.com/apache/camel-k/issues/1882#issuecomment-756642454


   I've run some test and it seems to be a possible bug in the yaml loader. The issue is appearing also when a yaml integration is run via `kamel`. As an example, given the `kamelet` mentioned above and the `test.yaml` file with content:
   ```
   - from:
       uri: "kamelet:timer-source"
       parameters:
         payload: "Hello World"
         message: "Hello World"
       steps:
         - log: "${body}"
   ```
   Running `kamel run test.yaml` would produce the same result.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org