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


   I use a KameletBinding to an explicit URI pointing to a service in my 
cluster. The KameletBinding creates an integration that fails with:
   
   ```
   Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create 
route route1 at: >>> To[knative:endpoint/sink] <<< in route: 
Route(route1)[From[kamelet:timer-source?message=Hello+world%... because of 
Failed to resolve endpoint: knative://endpoint/sink due to: Cannot load Knative 
configuration from file or env variable
        at 
org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:385)
        at 
org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:112)
        at 
org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:830)
        at 
org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:582)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2680)
        at 
org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:468)
        at 
org.apache.camel.support.service.BaseService.init(BaseService.java:83)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2452)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:111)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2469)
        at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:75)
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:115)
        at 
org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:120)
        at 
org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
        ... 10 more
   Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to 
resolve endpoint: knative://endpoint/sink due to: Cannot load Knative 
configuration from file or env variable
        at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:888)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:777)
        at 
org.apache.camel.support.CamelContextHelper.resolveEndpoint(CamelContextHelper.java:123)
        at 
org.apache.camel.reifier.SendReifier.resolveEndpoint(SendReifier.java:43)
        at 
org.apache.camel.reifier.SendReifier.createProcessor(SendReifier.java:36)
        at 
org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:752)
        at 
org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:495)
        at 
org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:383)
        ... 23 more
   Caused by: java.lang.IllegalStateException: Cannot load Knative 
configuration from file or env variable
        at 
org.apache.camel.component.knative.KnativeComponent.getKnativeConfiguration(KnativeComponent.java:277)
        at 
org.apache.camel.component.knative.KnativeComponent.createEndpoint(KnativeComponent.java:223)
        at 
org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:240)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:855)
        ... 30 more
   ```
   
   I have no Knative eventing/serving enabled on my cluster but the integration 
tries to use Knative as sink.
   
   Here is the source generated by the binding:
   ```yaml
   data:
     content: |
       - from:
           steps:
           - to: knative:endpoint/sink
           uri: kamelet:timer-source?message=Hello+world%21
   ```
   
   Here is the KameletBinding that I am using
   ```yaml
   apiVersion: camel.apache.org/v1alpha1
   kind: KameletBinding
   metadata:
     name: timer-source-uri
   spec:
     source:
       ref:
         kind: Kamelet
         apiVersion: camel.apache.org/v1alpha1
         name: timer-source
       properties:
         message: "Hello world!"
     sink:
       uri: http://greeting-service.yaks-demo/greeting
   ```


----------------------------------------------------------------
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:
[email protected]


Reply via email to