camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

Dependency Service Discovery for Camel K

Open claudio4j opened this issue 1 year ago • 3 comments

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:

  1. 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.
  2. 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.
  3. 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.

claudio4j avatar Feb 28 '24 13:02 claudio4j

In term of maintenance, aren't point 1 and 3 very similar as you'd need to update the camel cli never the less ?

lburgazzoli avatar Feb 28 '24 13:02 lburgazzoli

In term of maintenance, aren't point 1 and 3 very similar as you'd need to update the camel cli 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.

claudio4j avatar Feb 28 '24 16:02 claudio4j

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!

github-actions[bot] avatar May 29 '24 00:05 github-actions[bot]