squakez commented on issue #4126:
URL: https://github.com/apache/camel-k/issues/4126#issuecomment-1477883258

   There are design impediments at this stage to be able to use layers for 
native Integration Kit. Take this one (taken from a real integration):
   ```
   apiVersion: camel.apache.org/v1
   kind: IntegrationKit
   metadata:
     annotations:
       camel.apache.org/operator.id: camel-k
     creationTimestamp: "2023-03-21T12:36:21Z"
     generation: 1
     labels:
       camel.apache.org/created.by.kind: Integration
       camel.apache.org/created.by.name: test1
       camel.apache.org/created.by.namespace: default
       camel.apache.org/created.by.version: "7786"
       camel.apache.org/kit.layout: native
       camel.apache.org/kit.priority: "2000"
       camel.apache.org/kit.type: platform
       camel.apache.org/runtime.provider: quarkus
       camel.apache.org/runtime.version: 1.17.0
     name: kit-cgcq9hdscbic73auf6rg
     namespace: default
     resourceVersion: "8322"
     uid: 50879658-95ef-4121-bbae-1623d6df1d59
   spec:
     dependencies:
     - camel:log
     - camel:timer
     - mvn:org.apache.camel.k:camel-k-runtime
     - mvn:org.apache.camel.quarkus:camel-quarkus-java-joor-dsl
     sources:
     - content: |
         // camel-k: language=java
   
         import org.apache.camel.builder.RouteBuilder;
   
         public class Test1 extends RouteBuilder {
           @Override
           public void configure() throws Exception {
   
               // Write your routes here, for example:
               from("timer:java?period=1000")
                 .routeId("java")
                 
.setBody().constant("resource:file:/etc/camel/resources/resources-1.txt")
                 .to("log:info");
           }
         }
       name: Test1.java
     traits:
       quarkus:
         packageTypes:
         - native
   status:
     artifacts:
     - id: camel-k-integration-1.12.0-runner
       target: camel-k-integration-1.12.0-runner
     baseImage: quay.io/quarkus/quarkus-distroless-image:1.0
     conditions:
     - lastTransitionTime: "2023-03-21T12:36:21Z"
       lastUpdateTime: "2023-03-21T12:36:21Z"
       message: IntegrationPlatform (camel-k)
       reason: IntegrationPlatformAvailable
       status: "True"
       type: IntegrationPlatformAvailable
     digest: vyYuKB_0c5MTs9RWwkjytaWwmFh6vp8oMZ-A4Qh4y1i0
     image: 
10.110.211.30/default/camel-k-kit-cgcq9hdscbic73auf6rg@sha256:1babce858f9a4d3ef9cfa8a8f969ce88952d6227dffaa795c57ec7e876b360c6
     observedGeneration: 1
     phase: Ready
     platform: camel-k
     runtimeProvider: quarkus
     runtimeVersion: 1.17.0
     version: 1.12.0
   ```
   You can see that, when we use a native kit, we bundle all information in the 
kit, including the source. Then, the only dependency that we are using is the 
"runner" which is the one that was compiled ahead of time. We'll need to think 
if, at all, we'll be able to use any kind of inheritance mechanism when we are 
using native builds. The main problem is that, since the source code needs to 
be used as a part of the build, probably a new build will be always required, 
even if the set of dependencies is the same. With JVM mode we are loading the 
route at runtime, but it's something we probably cannot do with native builds.


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

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to