-
Feature
-
Resolution: Won't Do
-
Major
-
None
-
None
-
False
-
False
-
0
-
0%
-
Todo
-
Undefined
-
Traits are ways to configure a general aspect of an integration, while a Kamelet is just one of the building blocks that compose an integration.
There's no way for a Kamelet to activate a different behavior in the integration where the Kamelet is used.
That said, I can find multiple cases where a Kamelet may need to activate a trait (and it can't). For example, a timed Kamelet may want to activate the "cron" trait. An openapi based kamelet may need to activate the "openapi" trait.
But this mechanism is not in place (and not so easy to formalize), so traits need to be configured manually on the KameletBinding object.
It's possible to configure them on the KameletBinding using the spec->integration field, and we were talking about extending it to annotations: https://github.com/apache/camel-k/issues/2165
We can also think to extend the annotation mechanism also to Kamelets in case we need it.
We should also keep in mind that traits are Camel-K-only elements, while we want Kamelets to run in other camel subprojects as well...