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/04/20 13:43:27 UTC

[GitHub] [camel-k] lburgazzoli opened a new issue #2232: Traits to configure the container image and location fo the sources

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


   We should support traits to configure what container image an integration should use to run integrations as well as where as where sources are located.
   
   As example, it would be nice to be able to define a `KameletBinding` like:
   
   ```yaml
   apiVersion: camel.apache.org/v1alpha1
   kind: KameletBinding
   metadata:
     name: my-binding
     annotations:
       trait.camel.apache.org/integration.image: "acme/image:1.0"
       trait.camel.apache.org/integration.sources-mode: "embedded"
   ```
   
   Where:
   - the `KameletBinding` should be executed using the the container image defined by the `trait.camel.apache.org/integration.image` annotation (no build should be performed)
   - the annotation `trait.camel.apache.org/integration.sources-mode: "embedded"` instruct the operator that any source are embedded in the container image on a specific location, the operator still need to configure them for the runtime to be able to read but does not need to look them up in k8s.
   
   Relates to: https://github.com/apache/camel-k/issues/2165
   


-- 
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 #2232: Traits to configure the container image and location fo the sources

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


   Thinking a little bit about this:
   
   - We may not need to add an `integration.sources-mode` but we could probably add an option to set the location of the source on to the source definition, like:
   
   ```yaml
   spec:
       sources:
       - location: "{{env.CAMEL_K_SOURCES}}/routes.yaml"
   ```
   
   - for what concern the container images, as we have a `pod` trait now so we may add an additional option there, like:
   
   ```
   kamel run -t pod.integration-image=foo/bar:1.0.0
   ```
   
   - for what concern the `kamelets` we may add an option to the related trait to list embedded kamelets that the operator should not attempt to look up from k8s
   
   ```
   kamel run -t kamelets.embedded=foo,bar,baz
   ```


-- 
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 commented on issue #2232: Traits to configure the container image and location fo the sources

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


   I was thinking we could embed the location in the classpath. I'd assume that without information about the sources, the operator is not in a position to compute the right classpath, so that should be provided as part of the container image. So we may only need to choose a (fixed) relative path for sources.


-- 
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 #2232: Traits to configure the container image and location fo the sources

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


   /cc @nicolaferraro 


-- 
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 #2232: Traits to configure the container image and location fo the sources

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


   > I was thinking we could embed the location in the classpath. I'd assume that without information about the sources, the operator is not in a position to compute the right classpath, so that should be provided as part of the container image. So we may only need to choose a (fixed) relative path for sources.
   
   This is probably true for kamelets but sources it is a little bit more complex so I think, the location of the sources should always be provided. The operator should then ignore any inspection task and only create the "application.properties" where the sources are configured.
   
   Not sure if it makes any sense :)


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