eshepelyuk opened a new issue, #6098:
URL: https://github.com/apache/camel-k/issues/6098

   ### What happened?
   
   While creating integration in JAVA DSL that leverages custom defined 
kamelets, I am receiving errors.
   Meanwhile the same integration works when defined in YAML DSL.
   
   [Zulip 
thread](https://camel.zulipchat.com/#narrow/channel/257299-camel-k/topic/Inconsistent.20kamelet.20behaviour.20between.20DSLs)
   
   ### Steps to reproduce
   
   1. Create sample kamelets
   ```yaml
   ---
   apiVersion: camel.apache.org/v1
   kind: Kamelet
   metadata:
     name: mytimer
     namespace: default
   spec:
     template:
       from:
         uri: "timer:tick?includeMetadata=true&period=5000"
         steps:
           - to: "kamelet:sink"
   ---
   apiVersion: camel.apache.org/v1
   kind: Kamelet
   metadata:
     name: mylog
     namespace: default
   spec:
     template:
       from:
         uri: "kamelet:source"
         steps:
           - log: "${headers}"
   ```
   2.  Create JAVA DSL integration, using both kamelets
   ```java
   import org.apache.camel.builder.RouteBuilder;
   
   public class MyJava extends RouteBuilder {
       @Override
       public void configure() throws Exception {
           from("kamelet:mytimer")
               .to("kamelet:mylog");
       }
   }
   ```
   3. Run integration with 
   `kamel run MyJava.java --dev`
   
   ### Relevant log output
   
   ```shell
   Integration "my-java" created
   Progress: integration "my-java" in phase Initialization
   Condition "IntegrationPlatformAvailable" is "True" for Integration my-java: 
default/camel-k
   Condition "TraitInfo" is "True" for Integration my-java: Applied traits: 
platform,camel,deployer
   Integration "my-java" in phase "Initialization"
   Progress: integration "my-java" in phase Building Kit
   Condition "KameletsAvailable" is "True" for Integration my-java: kamelets 
[mylog,mytimer] found in (Kubernetes[namespace=default], 
Github[owner=deepetherlabs, repo=d-ifttt, path=src/kamelet, ref=chore/ifttt]) 
repositories
   Condition "TraitInfo" is "True" for Integration my-java: Applied traits: 
init,camel,kamelets,dependencies,deployer,container,health,jolokia,owner
   Integration "my-java" in phase "Building Kit"
   Condition "TraitInfo" is "True" for Integration my-java: Applied traits: 
camel,deployer,quarkus
   Condition "IntegrationKitAvailable" is "False" for Integration my-java: 
creating a new integration kit
   Integration Kit "kit-cv3bddh3uod4luhunmj0", created by Integration 
"my-java", changed phase to "Build Submitted"
   Build "kit-cv3bddh3uod4luhunmj0", created by Integration "my-java", changed 
phase to "Scheduling"
   Build "kit-cv3bddh3uod4luhunmj0", created by Integration "my-java", changed 
phase to "Pending"
   Build "kit-cv3bddh3uod4luhunmj0", created by Integration "my-java", changed 
phase to "Running"
   Integration Kit "kit-cv3bddh3uod4luhunmj0", created by Integration 
"my-java", changed phase to "Build Running"
   Build "kit-cv3bddh3uod4luhunmj0", created by Integration "my-java", changed 
phase to "Succeeded"
   Integration Kit "kit-cv3bddh3uod4luhunmj0", created by Integration 
"my-java", changed phase to "Ready"
   Progress: integration "my-java" in phase Deploying
   Condition "IntegrationKitAvailable" is "True" for Integration my-java: 
kit-cv3bddh3uod4luhunmj0
   Integration "my-java" in phase "Deploying"
   Cannot reconcile Integration my-java: error executing post actions - 1/1 
failed: [error during apply resource: default/my-java: failed to create typed 
patch object (default/my-java; apps/v1, Kind=Deployment): 
.spec.template.spec.containers[name="integration"].volumeMounts: duplicate 
entries for key [mountPath="/etc/camel/sources/MyJava.java"]]
   Progress: integration "my-java" in phase Error
   Error: integration "my-java" deployment failed
   ```
   
   ### Camel K version
   
   Camel-K 2.6.0 / Camel 4.8.3


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to