-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declaring multiple traits in KameletBinding fails badly #3458
Comments
Yeah, I think the problem is the declaration, as the format expected may be this one:
from https://camel.apache.org/camel-k/1.9.x/kamelets/kamelets-user.html#_trait_via_annotations please, try that and let us know how it goes. |
Just noticing that one would be for annotations. Probably it is anyhow the preferred way to add traits to KameletBindings. |
If I go with
This will fail with
|
Ok, it needs to be escaped. Let's see if it works or not. |
Same error |
Marking it as a bug, it may be an issue in the camel trait as I see it tries to mount several times the same volume. |
As a temporary workaround you can use the deprecated
|
It's not really critical at this time, but supporting vault for loading properties, means being able to essentially inject either camel properties or env variables and adding the camel component JAR for the vaults used.. I think this should be possible in all the way we are offering and for the moment it seems to be working only through Kamel run. |
It seems the problem is happening when there is both a |
If you try something like:
This will fail with:
{"level":"error","ts":1658164253.419387,"logger":"controller.integration-controller","msg":"Reconciler error","reconciler group":"camel.apache.org","reconciler kind":"Integration","name":"test","namespace":"default","error":"error executing post actions: error during apply resource: default/test: failed to create typed patch object (default/test; apps/v1, Kind=Deployment): errors:\n .spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate entries for key [mountPath=\"/etc/camel/conf.d/user.properties\"]\n .spec.template.spec.volumes: duplicate entries for key [name=\"user-properties\"]","errorVerbose":"error during apply resource: default/test: failed to create typed patch object (default/test; apps/v1, Kind=Deployment): errors:\n .spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate entries for key [mountPath=\"/etc/camel/conf.d/user.properties\"]\n .spec.template.spec.volumes: duplicate entries for key [name=\"user-properties\"]\nerror executing post actions\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:55\ngithub.com/apache/camel-k/pkg/controller/integration.(*monitorAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/monitor.go:118\ngithub.com/apache/camel-k/pkg/controller/integration.(*reconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:309\ngithub.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile\n\tgithub.com/apache/camel-k/pkg/util/monitoring/controller.go:70\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227\nruntime.goexit\n\truntime/asm_amd64.s:1371","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}
I don't know if the declaration is wrong, but I prefer open an issue to track.
The text was updated successfully, but these errors were encountered: