Uploaded image for project: 'Camel-K'
  1. Camel-K
  2. CMLK-2274

Failed to use Trait knative.configuration & knative.config

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Normal Normal
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Very Likely
    • 0

      For camel-k knative trait. I followed the doc:
      https://docs.redhat.com/en/documentation/red_hat_build_of_apache_camel_k/1.10.1/html/developing_and_managing_integrations_using_camel_k/camel-k-traits-reference#configuration
      Both the trait "knative.configuration" or "knative.config" met error as below:

      ➜ kamel run  RestDSL.java --profile=Knative -t knative.configuration='{"services":[{"type":"endpoint","name":"test1","path":"/test1","metadata":{"camel.endpoint.kind":"source","knative.apiVersion":"serving.knative.dev/v1","knative.kind":"Service"}},{"type":"endpoint","name":"test2","path":"/test2","metadata":{"camel.endpoint.kind":"source","knative.apiVersion":"serving.knative.dev/v1","knative.kind":"Service"}}]}'
      Error: 1 error(s) decoding:
      
      * 'knative.Configuration' expected a map, got 'string'
      

      and

      ➜ kamel run  RestDSL.java --profile=Knative -t knative.config='{"services":[{"type":"endpoint","name":"test1","path":"/test1","metadata":{"camel.endpoint.kind":"source","knative.apiVersion":"serving.knative.dev/v1","knative.kind":"Service"}},{"type":"endpoint","name":"test2","path":"/test2","metadata":{"camel.endpoint.kind":"source","knative.apiVersion":"serving.knative.dev/v1","knative.kind":"Service"}}]}'
      Error: knative.config={"services":[{"type":"endpoint","name":"test1","path":"/test1","metadata":{"camel.endpoint.kind":"source","knative.apiVersion":"serving.knative.dev/v1","knative.kind":"Service"}},{"type":"endpoint","name":"test2","path":"/test2","metadata":{"camel.endpoint.kind":"source","knative.apiVersion":"serving.knative.dev/v1","knative.kind":"Service"}}]} is not a valid trait property
      

            Unassigned Unassigned
            rhn-support-xiwu Xiaohui Wu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: