gansheer commented on code in PR #6980: URL: https://github.com/apache/camel-k/pull/6980#discussion_r4630247358
########## proposals/v3-architecture.adoc: ########## @@ -71,6 +73,76 @@ The Camel K operator `Pod` will be also much simpler as it won't require it to b * Kit reusability * Managed custom pipeline (external CICD still available) +== CLI + +The `kamel` CLI was born when the project's main purpose was to ease the first steps of a user with an integration platform: a single `kamel run` command was able to take care of everything, from the source file to the running application. The project is now moving towards a more enterprise oriented approach, where build and deployment are separate concerns (possibly owned by different actors and tools). The CLI scope must follow the same direction. + +=== Command set + +The `run` command today concentrates a large amount of logic (modeline parsing, local source/dependency resolution, traits and properties handling, waiting and logging, ...) and mixes build and execution in one single step. The proposal is to remove it entirely, already in the first v3 release, and expose the lifecycle of an `Integration` through three explicit commands, each one mapped to a task performed by the operator: + +[cols="1,3,3"] +|=== +|Command |Responsibility |Operator counterpart + +|`kamel build` +|Create (or update) the `Integration`/`Pipe` and trigger an `IntegrationBuild`. It can optionally wait for the build to complete and stream its logs. It never starts the application. +|Build and containerization phase, up to `Build Complete`. + +|`kamel deploy` +|Request the deployment of an `Integration`/`Pipe` which has a successful build. It fails if the build is not complete. An explicit build (ie, a previous one, in a rollback scenario) may be selected. +|Deployment phase (`Deployment` generation and rollout). + +|`kamel undeploy` +|Stop the running workload, keeping the `Integration`/`Pipe` and its builds available for a later `deploy`. Removal of the resources remains a plain `kubectl delete`. +|Scale-down/removal of the runtime resources only. +|=== + +The behaviour is: **an `Integration` is never run unless the user explicitly asks for it, and only once it has been built**. This is the opposite of the current default (build and run), where skipping the run requires `--dont-run-after-build`. Review Comment: Doesn't this contradicts line 54, which says that once the build completes "the operator will continue the deployment phase, generating the related Deployment and starting the application" ? Maybe I'm missing something here. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
