lancerdima commented on issue #1951:
URL: https://github.com/apache/camel-k/issues/1951#issuecomment-768334730


   Thanks for the hint @lburgazzoli, I've figured out the setup that works.
   For future reference, the yaml should look like this.
   ```
   spec:
     flows:
       - from:
           ...
           steps:
             - to: ...
     sources:
       - contentRef: configmapname
         contentKey: MySourceFile.java
         name: MySourceFile.java
   ```
   The corresponding config map is:
   
   ```
   apiVersion: v1
   kind: ConfigMap
   metadata:
     name: configmapname
   data:
     content: |
       **my source code**
   ```
   
   The only confusion I have is that `contentKey` seems does not have any 
effect, and I am required to use `content` property in configmap, instead of 
e.g. `MySourceFile.java`.
   If that is expected, issue can be closed.
   


----------------------------------------------------------------
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