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:
us...@infra.apache.org


Reply via email to