Claus Ibsen created CAMEL-25592:
-----------------------------------

             Summary: camel-jbang-plugin-kubernetes - read the endpoints of the 
route sources from the route model instead of starting a stubbed CamelContext
                 Key: CAMEL-25592
                 URL: https://issues.apache.org/jira/browse/CAMEL-25592
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen
             Fix For: 4.24.0


{{MetadataHelper.readFromSource}} of the Kubernetes plugin (used by {{camel 
kubernetes export/run}}) reads every route source by building and starting a 
stubbed CamelContext: it resolves the Quarkus platform BOM through the Maven 
downloader and the Quarkus extension registry (on every call), sets up a 
downloading class loader, class resolver and routes loader, and for a Java 
source compiles it and runs its {{configure()}}.

Of what it collects (components, languages, data formats, kamelets, 
capabilities, Maven dependencies, and the from/to endpoint uris) only the 
endpoint uris are used: the service trait creates a Kubernetes Service when a 
route consumes from an HTTP component or knative, and the knative trait picks 
the knative: channel, endpoint and event uris.

h3. Proposal

Read the sources into the route model without starting anything, and take the 
endpoint uris from it: Java with the Java DSL parser of camel-java-io (nothing 
compiled or run), XML with the XML DSL parser, YAML with the YAML DSL loader in 
a CamelContext that is never started. {{from}} are the route inputs, {{to}} the 
fixed endpoints the routes send to. Drop the unused metadata and the 
downloading set up.

_Created by Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to