Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-17257

Kbind requires property "apiVersion" to create KameletBinding with InMemoryChannel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • camel-k-1.6-GA
    • None
    • Camel-K
    • None
    • False
    • False
    • % %
    • CK2
    • Todo
    • Hide

      1.

      apiVersion: messaging.knative.dev/v1
      kind: InMemoryChannel
      metadata:
        name: messages
      
      oc apply -f messages.yaml
      

      2. Results in Error:

      kamel bind aws-sqs-source -p "source.queueNameOrArn=kamelet-myq" -p "source.accessKey=XXX" -p "source.secretKey=XXX" -p "source.region=us-west-1"  InMemoryChannel:messages
      
      Show
      1. apiVersion: messaging.knative.dev/v1 kind: InMemoryChannel metadata: name: messages oc apply -f messages.yaml 2. Results in Error: kamel bind aws-sqs-source -p "source.queueNameOrArn=kamelet-myq" -p "source.accessKey=XXX" -p "source.secretKey=XXX" -p "source.region=us-west-1" InMemoryChannel:messages

      On OCP 4.6, with Camel K 1.4.0 operator (GA) installed from Provider Type "Red Hat", Red Hat OpenShift Serverless operator v1.16.0:

      I would like to create kameletbinding from source kamelet to InMemoryChannel.

      I observed following command creates correctly running integration:

      kamel bind aws-sqs-source -p "source.queueNameOrArn=kamelet-myq" -p "source.accessKey=XXX" -p "source.secretKey=XXX" -p "source.region=us-west-1" -p "sink.apiVersion=messaging.knative.dev/v1" InMemoryChannel:messages`
      

      However, if I omit the -p "sink.apiVersion=messaging.knative.dev/v1", kameletbinding is in state "Error" and created integration (from Running switches immediately to Error) produces error:

       1] 2021-09-01 12:04:17,353 INFO  [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='aws-sqs-source', language='yaml', location='file:/etc/camel/sources/aws-sqs-source.yaml', }
      [1] 2021-09-01 12:04:20,852 ERROR [org.apa.cam.imp.eng.AbstractCamelContext] (main) Error starting CamelContext (camel-1) due to exception thrown: Failed to start route route1 because of null: org.apache.camel.FailedToStartRouteException: Failed to start route route1 because of null
      [1]     at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:123)
      ...
      1] Caused by: org.apache.camel.RuntimeCamelException: java.lang.IllegalArgumentException: Unable to find a resource definition for endpoint/sink/messages
      

      Created kameletbinding:

      ...
      spec:
        sink:
          ref:
            kind: InMemoryChannel
            name: messages
            namespace: lfabriko
        source:
          properties:
            accessKey: XXX
            queueNameOrArn: kamelet-myq
            region: us-west-1
            secretKey: XXX
          ref:
            apiVersion: camel.apache.org/v1alpha1
            kind: Kamelet
            name: aws-sqs-source
            namespace: lfabriko
      status:
      ...
      

              nicolaferraro Nicola Ferraro (Inactive)
              lfabriko@redhat.com Lucie Krejcirova
              Lucie Krejcirova Lucie Krejcirova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: