Open
Description
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.
Steps to reproduce
- Create sample kamelets
---
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}"
- Create JAVA DSL integration, using both kamelets
import org.apache.camel.builder.RouteBuilder;
public class MyJava extends RouteBuilder {
@Override
public void configure() throws Exception {
from("kamelet:mytimer")
.to("kamelet:mylog");
}
}
- Run integration with
kamel run MyJava.java --dev
Relevant log output
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
Activity