camel-k
camel-k copied to clipboard
Dependency Service Discovery for Camel K
Requirement
Camel K operator should use the camel route as input, given in any of the supported DSLs (java, groovy, yaml, pipe, etc.) and discover all the required camel dependencies to help the user not bother to manually set each camel dependency. By camel dependencies, it's all the maven artifacts needed to run the materialized integration for the chosen camel runtime, as camel-quarkus, camel-main or camel-spring-boot (when this runtime becomes supported).
Problem
Currently Camel K operator, developed in Golang has to inspect the route using a regular expression parser to probe the possible camel components, however there are several reports (#527 #2600 #4027) by users about dependencies not discovered. There are several ways that a camel component may be used in a route, such as a marshal, header, eip, etc., making it very hard to use a regular expression to probe the camel dependencies.
Proposal
Camel JBang has a dependency list mechanism that under the hood uses Kamelet Main to discover all the camel dependencies.
Open questions
There were some discussion about some approaches:
- Having camel-k-operator spawn an OS process to invoke a command line
camel dependency list, capture the output and set in the Integration CR object. - Having camel-jbang-plugin-k to discover the dependencies and set in the Integration CR object. This approach is not interesting as it's a client side operation, also it would exclude any Integraiton CR yaml object not created by the camel-jbang-k-plugin as a Pipe.
- Having a side card container in the camel-k-operator pod, with a rest service materialized from a camel-jbang image. This approach has to consider the security implication of an http endpoint and the maintenance of a camel-jbang image release coupled with a camel release.
In term of maintenance, aren't point 1 and 3 very similar as you'd need to update the camel cli never the less ?
In term of maintenance, aren't point 1 and 3 very similar as you'd need to update the
camelcli never the less ?
yes, both has to follow a camel-jbang release. We can take advantage of the camel-jbang images. I will have a look how that works.
This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!