You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/01/27 13:23:11 UTC

[GitHub] [camel-k] lancerdima opened a new issue #1951: Ability to have sources for integrations as ConfigMaps

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


   ### Problem
   Currently, sources for Integration CRDs are specified through _content_ property under sources tag
   spec:
     sources:
       - name: fileName.java
          content: |
            ** source / bean definition **  
   
   ### Suggestion
   Add ability to provide sources (especially sources with custom beans) as ConfigMaps. That should promote some modularity and reuse of sources between integrations.


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



[GitHub] [camel-k] lancerdima commented on issue #1951: Ability to have sources for integrations as ConfigMaps

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [camel-k] lburgazzoli commented on issue #1951: Ability to have sources for integrations as ConfigMaps

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1951:
URL: https://github.com/apache/camel-k/issues/1951#issuecomment-768284877


   If you set `contentRef: nameOfTheConfigMap`, then the content is taken from the named config map


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



[GitHub] [camel-k] nicolaferraro closed issue #1951: Ability to have sources for integrations as ConfigMaps

Posted by GitBox <gi...@apache.org>.
nicolaferraro closed issue #1951:
URL: https://github.com/apache/camel-k/issues/1951


   


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



[GitHub] [camel-k] lburgazzoli commented on issue #1951: Ability to have sources for integrations as ConfigMaps

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1951:
URL: https://github.com/apache/camel-k/issues/1951#issuecomment-768342125


   As per the [code]( https://github.com/apache/camel-k/blob/5f575430ed16317b5d03afe91d3c8d23b523d46b/pkg/util/kubernetes/resolver.go#L57-L95), the `contentKey` should have been taken into account.
   
   @squakez minf having a look if you ahve any spare time ?
   


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



[GitHub] [camel-k] squakez commented on issue #1951: Ability to have sources for integrations as ConfigMaps

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #1951:
URL: https://github.com/apache/camel-k/issues/1951#issuecomment-768345219


   Sure, I am already working on something similar.


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



[GitHub] [camel-k] lburgazzoli edited a comment on issue #1951: Ability to have sources for integrations as ConfigMaps

Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1951:
URL: https://github.com/apache/camel-k/issues/1951#issuecomment-768342125


   As per the [code]( https://github.com/apache/camel-k/blob/5f575430ed16317b5d03afe91d3c8d23b523d46b/pkg/util/kubernetes/resolver.go#L57-L95), the `contentKey` should have been taken into account.
   
   @squakez mind having a look if you have any spare time ?
   


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