You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "christophd (via GitHub)" <gi...@apache.org> on 2023/12/18 13:54:37 UTC

[PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

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

   - Adds new subcommands to Camel JBang that allow to manage Camel K integrations
   - run command to create Integrations on Kubernetes
   - get command to list all Integrations on the cluster namespace
   - delete command to remove Integrations
   - logs command to print log output of a running Integration
   
   # Description
   
   Users are able to manage Camel K integrations running on Kubernetes.
   The implementation uses the fabric8 Kubernetes client and the Camel K Integration CRDs to manage the integrations on the cluster.
   
   Users are able to call
   ```
   camel k run route.groovy
   ```
   
   Where `k` provides a set of new subcommands related to running Camel routes on Kubernetes in the form of Camel K integrations.
   
   # Follow-up
   
   Not included in this PR is documentation of the new commands. I wanted to get feedback on this first. Also I am experimenting on a Camel JBang plugin mechanism that would allow us to enable such sub-commands on demand (e.g. `camel plugin add camel-k`.
   
   # 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
   
   Relates to CAMEL-20251
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally and I have committed all auto-generated changes
   


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1863446890

   1) It would be great to have jbang with a plugin for different command sets, as we end up with a big pile of dependencies and many commands that will get us in trouble in the future. Good to hear you do some experiment with this. Its not only the CK stuff that we can separate. It would also be for example the generator command, sbom, jolokia, hawtio etc
   
   2) clever way to use k as sub command to separate this clearly
   
   3) the get command has been called get for all its life in camel-k, and we use same name in camel-jbang, so I think its not a good idea to rename it to list (old habbits die hard)
   
   4) docs, the jbang docs is a very long page, it needs to be broken up into sub pages, so a good start is to have the CK in its own sub page. And then we can use that as starting point to break up the existing big page also.
   
   5) can the tests run in isolation or do they need a running k8s cluster. Just want to sure that we can build everyhing nicely without causing test failures due to k8s stuff as core project dont have any of that.
   
   6) mind that jbang is for developers and not sys admins, or ops guys. I think the kubectl, oc and kamel go cli would be needed for those guys - I cant see them want to install java jbang to run a shell command.
   
   7) the dependency on the camel-k fabric8 client to have those CRDs - is there in the future a better way, as its not good that the core project has a dependency on a Camel K release. Can it be the fabric8-client release instead. 
   


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1862339085

   I did some local test it works well. I still have some questions:
   * I first tried the command without any kubernetes up. Is it standard in with jbang camel to end up with a full stacktrace in these kind of error cases ?
   * Is the general plan to follow with the existing design from `kamel` CLI 2nd day operations commands ? 
   


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864319463

   > > 3. the get command has been called get for all its life in camel-k, and we use same name in camel-jbang, so I think its not a good idea to rename it to list (old habbits die hard)
   > 
   > I see that the `camel get` provides many more details. I guess the `list` command I was doing here in this PR is more like the `camel ps` command. Should I use `camel k ps` then? I personally don't like `ps` very much so I am ok to use `camel k get` but just wanted to get some feedback. @davsclaus @oscerd @squakez
   
   IMO neither. The user should be able to list and operate via `kubectl` or any other Kubernetes tool as he normally does. The `camel k run` should be the only facility that we offer in my opinion. We may even not require to push the Integration to the cluster at all if we want. The ultimate feature it should offer is to create an Integration custom resource with the parameters provided by the user (here we should try to give the majority of parameters provided in the `kamel run`). We may have something like:
   ```
   $ camel k run test.yaml
   apiVersion: camel.apache.org/v1
   kind: Integration
   metadata:
     annotations:
       camel.apache.org/operator.id: camel-k
     creationTimestamp: null
     name: test
   spec:
     flows:
     - from:
         parameters:
           period: "1000"
         steps:
         - setBody:
             simple: Hello Camel from ${routeId}
         - log: ${body}
         uri: timer:yaml
     traits: {}
   ```
   and in order to apply on the cluster we may have something like a piped command in conjunction with kubectl/oc:
   ```
   $ camel k run test.yaml | kubectl apply -f -
   integration.camel.apache.org/test created
   ```


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1862372423

   > Is the general plan to follow with the existing design from kamel CLI 2nd day operations commands ?
   
   What `kamel` CLI 2nd day operations commands do you have in mind?


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864632564

   that local doc stuff is some black magic. You dont need to use that, you can just create a new adoc file along camel-jbang, and link to it from that page. And then mvn clean install in the docs folder does sanity checking for xref and broken links.
   
   And then we do have CI server doing the full build in camel-website


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864324143

   Also `kamel bind` and `kamel promote` may be useful commands with the same concept. You may just take the output of what's actually provided in the `-o yaml` of both.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864515736

   Thanks @christophd good answers.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1863984539

   @davsclaus thanks for your input I'll go through it today


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1862578184

   @squakez I have added some test that uses the complete command line `camel k run route.yaml`
   
   @gansheer renamed `get` command to `list`


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "claudio4j (via GitHub)" <gi...@apache.org>.
claudio4j commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1860709687

   Related to the command structure, wdyt to enable camel-k with an option `--runtime=camel-k` instead to have camel-k as subcommand `camel k <command>` ? Then it would be like `camel run MyAppjava --runtime=camel-k`
   
   There is a feature request, which I don't know if that has evolved.
   [CAMEL-19041 - Run with runtime](https://issues.apache.org/jira/browse/CAMEL-19041)
   
   I see the `camel` has several sub-commands which could also be used for camel-k, but at the same time not all sub-commands may not target camel-k.
   Just food for thought.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd merged PR #12474:
URL: https://github.com/apache/camel/pull/12474


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864301387

   > 3. the get command has been called get for all its life in camel-k, and we use same name in camel-jbang, so I think its not a good idea to rename it to list (old habbits die hard)
   
   I see that the `camel get` provides many more details. I guess the `list` command I was doing here in this PR is more like the `camel ps` command. Should I use `camel k ps` then? I personally don't like `ps` very much so I am ok to use `camel k get` but just wanted to get some feedback. @davsclaus @oscerd @squakez  


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864506435

   > 1. It would be great to have jbang with a plugin for different command sets, as we end up with a big pile of dependencies and many commands that will get us in trouble in the future. Good to hear you do some experiment with this. Its not only the CK stuff that we can separate. It would also be for example the generator command, sbom, jolokia, hawtio etc
   
   Working and experimenting on it but it will take some more time to get results
   
   > 3. the get command has been called get for all its life in camel-k, and we use same name in camel-jbang, so I think its not a good idea to rename it to list (old habbits die hard)
   
   I'll go back to `camel k get` and push to this PR
   
   > 4. docs, the jbang docs is a very long page, it needs to be broken up into sub pages, so a good start is to have the CK in its own sub page. And then we can use that as starting point to break up the existing big page also.
   
   Working on it and will push to this PR
   
   > 5. can the tests run in isolation or do they need a running k8s cluster. Just want to sure that we can build everyhing nicely without causing test failures due to k8s stuff as core project dont have any of that.
   
   Yes, the Kubernetes mockserver used in the tests is just an arbitrary Http server that emulates the Kubernetes API. No need to have a Kubernetes cluster
   
   > 6. mind that jbang is for developers and not sys admins, or ops guys. I think the kubectl, oc and kamel go cli would be needed for those guys - I cant see them want to install java jbang to run a shell command.
   
   Right, and we should always provide the opportunity to use these standard tooling for instance by doing the pipe to `kubectl` as Pasquale suggested. At the same time I think Camel JBang is a great way to start with Camel and it should also be a great way to start with integrations running on Kubernetes.
   


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "claudio4j (via GitHub)" <gi...@apache.org>.
claudio4j commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1863190759

   > @claudio4j yeah I was also thinking about it that way but then also realized that not all commands fit for all runtimes. 
   
   Yeah, sure let's see how this evolves.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #12474:
URL: https://github.com/apache/camel/pull/12474#discussion_r1431059466


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/k/KubeCommand.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.core.commands.k;
+
+import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "k",
+                     description = "Manage Camel integrations on Kubernetes (use config --help to see sub commands)")
+public class KubeCommand extends KubeBaseCommand {
+
+    public static final String OPERATOR_ID_LABEL = "camel.apache.org/operator.id";

Review Comment:
   I wonder if these (and any other constant) should be instead moved into the CRD dependency. Something we might ponder eventually. 



-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1860563719

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions to run
   
   * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1862349390

   > 
   >     * Is the general plan to follow with the existing design from `kamel` CLI 2nd day operations commands ?
   
   I don't think we should. We did a lot of development in the past on the CLI but the reality is that Kubernetes/Openshift already offer a lot of tooling to manage those aspects.
   


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864323939

   > 1. It would be great to have jbang with a plugin for different command sets, as we end up with a big pile of dependencies and many commands that will get us in trouble in the future. Good to hear you do some experiment with this. Its not only the CK stuff that we can separate. It would also be for example the generator command, sbom, jolokia, hawtio etc
   > 2. clever way to use k as sub command to separate this clearly
   > 3. the get command has been called get for all its life in camel-k, and we use same name in camel-jbang, so I think its not a good idea to rename it to list (old habbits die hard)
   > 4. docs, the jbang docs is a very long page, it needs to be broken up into sub pages, so a good start is to have the CK in its own sub page. And then we can use that as starting point to break up the existing big page also.
   > 5. can the tests run in isolation or do they need a running k8s cluster. Just want to sure that we can build everyhing nicely without causing test failures due to k8s stuff as core project dont have any of that.
   > 6. mind that jbang is for developers and not sys admins, or ops guys. I think the kubectl, oc and kamel go cli would be needed for those guys - I cant see them want to install java jbang to run a shell command.
   > 7. the dependency on the camel-k fabric8 client to have those CRDs - is there in the future a better way, as its not good that the core project has a dependency on a Camel K release. Can it be the fabric8-client release instead.
   
   For the last question, the point 7, they moved back to camel-k the crd responsibility, so now we are releasing the CRDs as part of our release projects. Fabric8 Kubernetes Client started to have too much stuff to maintain.
   
   


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864325980

   > For the last question, the point 7, they moved back to camel-k the crd responsibility, so now we are releasing the CRDs as part of our release projects. Fabric8 Kubernetes Client started to have too much stuff to maintain.
   
   On top of that, consider that we do not necessarily depends on the Camel K release cycle. The CRDs definition should not change, or at least has to be backward compatible. So, if we come to add some new parameter, it could be available in future versions of Camel JBang.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1862300788

   @claudio4j yeah I was also thinking about it that way but then also realized that not all commands fit for all runtimes. and also running Camel routes on Kubernetes will be independent of the runtime (Spring Boot, Quarkus, ...) so we would need something like `--runtime=camel-k,quarkus` to use both Quarkus as a runtime and at the same time Camel K to run it on Kubernetes.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on code in PR #12474:
URL: https://github.com/apache/camel/pull/12474#discussion_r1431070609


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/k/KubeCommand.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.core.commands.k;
+
+import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "k",
+                     description = "Manage Camel integrations on Kubernetes (use config --help to see sub commands)")
+public class KubeCommand extends KubeBaseCommand {
+
+    public static final String OPERATOR_ID_LABEL = "camel.apache.org/operator.id";

Review Comment:
   yes, makes sense to me



-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1862435792

   > > Is the general plan to follow with the existing design from kamel CLI 2nd day operations commands ?
   > 
   > What `kamel` CLI 2nd day operations commands do you have in mind?
   
   I don't know if the following constitutes 2nd day operations but I was thinking about the sub-commands `kit`, `rebuild`, `bind` and `promote`.
   Also if we are not following the original design, I would rename `get` as `list` if there is no filter on integration name, but I recognize that's personal preference :relaxed:.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1862825450

   > @squakez I have added some test that uses the complete command line `camel k run route.yaml`
   > 
   > @gansheer renamed `get` command to `list`
   
   Great. I think the entire testing is going to benefit a lot from this example.


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864492277

   @squakez these are good thoughts, thank you.
   
   I like the suggested way to use the pipe to `kubectl`. IMO providing the `camel k get` command in Camel JBang is not a huge burden for us though and this way users may decide on their own which path to take. 
   
   The user is able to use the pipe to `kubectl` or just use the same `camel` CLI with the advantage to not have to switch tooling for basic operations.
   
   The `camel k logs` command for instance also adds some simplification as the user does not have to select the Pod but only the integration name.
   
   My take on this would be to keep some basic operations for managing integrations on Kubernetes in Camel JBang


-- 
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-unsubscribe@camel.apache.org

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


Re: [PR] CAMEL-20251: Add Camel K commands to Camel JBang [camel]

Posted by "christophd (via GitHub)" <gi...@apache.org>.
christophd commented on PR #12474:
URL: https://github.com/apache/camel/pull/12474#issuecomment-1864625020

   I am done with using `camel k get` again and starting to modularize the Camel JBang docs. Regarding the docs I hope I did it right as I was not able to build the pages locally as described in https://camel.apache.org/manual/improving-the-documentation.html#_local_build_instructions
   
   I get these errors when running `./local-build.sh quick`
   
   ```
   FATAL (antora): require(...) is not a function
       Cause: TypeError
           at Function.create (Projects/Camel/camel-website/.yarn/cache/browser-sync-npm-2.27.7-b8e58f9a91-7f51177473.zip/node_modules/browser-sync/dist/index.js:316:45)
           at Object.default_1 [as default] (Projects/Camel/camel-website/.yarn/cache/browser-sync-npm-2.27.7-b8e58f9a91-7f51177473.zip/node_modules/browser-sync/dist/cli/command.start.js:43:10)
           at handleCli (Projects/Camel/camel-website/.yarn/cache/browser-sync-npm-2.27.7-b8e58f9a91-7f51177473.zip/node_modules/browser-sync/dist/bin.js:145:25)
           at handleNoCommand (Projects/Camel/camel-website/.yarn/cache/browser-sync-npm-2.27.7-b8e58f9a91-7f51177473.zip/node_modules/browser-sync/dist/bin.js:135:12)
           at runFromCli (Projects/Camel/camel-website/.yarn/cache/browser-sync-npm-2.27.7-b8e58f9a91-7f51177473.zip/node_modules/browser-sync/dist/bin.js:71:16)
           at Object.<anonymous> (Projects/Camel/camel-website/.yarn/cache/browser-sync-npm-2.27.7-b8e58f9a91-7f51177473.zip/node_modules/browser-sync/dist/bin.js:38:5)
           at loadCJSModule (node:internal/modules/esm/translators:270:3)
           at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:305:7)
           at ModuleJob.runSync (node:internal/modules/esm/module_job:209:17)
           at require (node:internal/modules/esm/translators:255:9)
   ```
   
   My env settings
   ```
   yarn -v
   3.2.3
   node -v
   v21.4.0
   ```


-- 
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-unsubscribe@camel.apache.org

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