christophd opened a new pull request, #14757:
URL: https://github.com/apache/camel/pull/14757

   # Description
   
   <!--
   - Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   -->
   
   This PR introduces a new Camel JBang plugin to deploy/run on Kubernetes. The 
plugin extends the Camel JBang export functionality to also generate a 
Kubernetes manifest (kubernetes.yml) which holds all resources (Deployment, 
Service, ConfigMap, etc.) to run the application on Kubernetes.
   
   The idea is to run a project export first and then build and deploy via SB / 
Quarkus standards using the generated Kubernetes manifest just like how you 
would normally do this via their Maven plugins.
   
   The Kubernetes plugin provides the following commands:
   - export to generate the Quarkus/SB project with the Kubernetes manifest 
being part of the exported project
   - run to export the project in the background and call Maven package to 
build and deploy to Kubernetes (also supports `--dev` option to use automatic 
redeployment)
   - delete to remove all resources from Kubernetes using the generated 
Kubernetes manifest
   - logs to show the logs of the running Pod
   
   Traits:
   The Kubernetes export functionality is able to make use of the Camel K 
traits in order to simplify the Kubernetes manifest generation (e.g. adding 
envvars, configure exported ports, use volume mounts, secrets, configmaps 
etc.). At the moment the PR supports some basic traits (DeploymentTrait, 
ContainerTrait, EnvTrait, ...) more trait implementations may follow.
   
   Detailed changes in this PR:
   - Introduce new Camel JBang plugin `camel-jbang-plugin-kubernetes` to 
configure/run Camel applications on Kubernetes
   - Camel K JBang plugin depends on the new Kubernetes plugin
   - Move Kubernetes basics (e.g. PodLogs command) from Camel K plugin to the 
new Kubernetes plugin
   - Kubernetes plugin provides run, delete, export and logs command
   - Kubernetes export command extends the arbitrary project export command and 
adds the generation of a Kubernetes manifest (kubernetes.yml) that becomes part 
of the exported project.
   - Kubernetes run command uses the exported project to build the application 
image (with container-jib)
   - Kubernetes deployment is done with arbitrary Quarkus/Spring Boot tooling 
and uses the generated Kubernetes manifest (kubernetes.yml)
   - Kubernetes delete command uses the manifest (kubernetes.yml) to remove all 
resources
   - Kubernetes logs command connects to the pod (selected via label 
conventions) and displays the log output
   
   The PR put focus on Maven based projects with Quarkus platform as a runtime. 
Next step would be to also apply this Kubernetes run mechanism to Spring Boot 
(eventually camel-main).
   
   TODOs in this PR:
   - remove Camel K CRD model dependency in favor of using own trait domain 
model in Camel JBang
   - make image builder configurable to support builders other than 
quarkus-container-image-jib
   - remove fixed kubernetes-client version as soon as 6.13.1 is part of the 
Quarkus platform
   - implement SpringBoot project build & Kubernetes deployment
   
   This is considered to be a draft PR in order to find agreement within the 
team and to do some tuning with adding documentation and writing some unit 
tests.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (note that 
Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   See CAMEL-20904
   
   <!--
   # *Note*: trivial changes like, typos, minor documentation fixes and other 
small items do not require a JIRA issue. In this case your pull request should 
address just this issue, without pulling in other changes.
   -->
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   <!--
   If you're unsure, you can format the pull request title like `[CAMEL-XXX] 
Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the 
appropriate JIRA issue.
   -->
   
   - [x] I have run `mvn clean install -DskipTests` locally and I have 
committed all auto-generated changes
   
   <!--
   You can run the aforementioned command in your module so that the build 
auto-formats your code. This will also be verified as part of the checks and 
your PR may be rejected if if there are uncommited changes after running `mvn 
clean install -DskipTests`.
   
   You can learn more about the contribution guidelines at 
https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to