You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/01/22 10:36:32 UTC

[GitHub] [camel-k] jamesnetherton opened a new pull request #1220: feat: Offer easier access to trait list

jamesnetherton opened a new pull request #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220
 
 
   fixes #1203
   
   Added a new command to list traits and their various config options.
   
   Describe all traits:
   
   `kamel describe trait`
   
   Describe the prometheus trait:
   
   `kamel describe trait prometheus` 
   
   I've hidden this from users based on the assumption that they can already get at this info via shell completion. Hence the output is in JSON, so that it's easy for tooling to parse / filter.
   
   @bfitzpat Here's an example of the output. Hope that's along the lines of what you need.
   
   ```json
   [
     {
       "name": "prometheus",
       "platform": false,
       "profiles": [
         "Kubernetes",
         "Knative",
         "OpenShift"
       ],
       "properties": [
         {
           "name": "enabled",
           "type": "bool",
           "default": false
         },
         {
           "name": "port",
           "type": "int"
         },
         {
           "name": "service-monitor",
           "type": "bool"
         },
         {
           "name": "service-monitor-labels",
           "type": "string"
         }
       ]
     }
   ]
   
   ```
   
   **Release Note**
   ```release-note
   NONE
   ```
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] jamesnetherton commented on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577141568
 
 
   I did wonder whether `describe` was the best place for it.
   
   Happy to move it and have it as a general `help` command with `-o` & `--all` args if that improves the UX. I guess logically it is a help command so it makes sense to have it there. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] bfitzpat commented on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
bfitzpat commented on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577191479
 
 
   I think this looks great and whether we go with `describe` or `help`, provides what we're looking for. My concern with `help` is that `help` is usually meant for the user, whereas this information isn't really something the user can consume in this format and `describe` might be far enough off the beaten path to avoid user confusion.
   
   JSON is perfect and we can just combine the root 'name' with the property 'name' to show the user what all is available. It's a long list of available traits, but I'm hoping we can cache the initial trait json from the cli in the tooling to make it a bit quicker to process. 
   
   But yes -- this should work well. Thank you!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] astefanutti edited a comment on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
astefanutti edited a comment on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577125785
 
 
   Just thinking out loud, as `describe` is generally meant to describe remote resources, and to be somehow consistent with Kubernetes CLI, would something like `kamel help trait prometheus -o yaml` be preferable?
   
   It could also provide a nice way to get trait documentation from the CLI with `kamel help trait prometheus`, and possibly support `kamel help trait --all`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] astefanutti commented on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
astefanutti commented on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577192669
 
 
   @bfitzpat in `kubectl` CLI, commands can have an output option that can be set to output human readable information, the default, printed in the TTY or JSON and Yaml for processing.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] astefanutti edited a comment on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
astefanutti edited a comment on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577125785
 
 
   Just thinking out loud, as `describe` is generally meant to describe remote resources, and to be somehow consistent with Kubernetes CLI, would something like `kamel help trait prometheus -o yaml` be preferable?
   
   It could also provide a nice way to get trait documentation from the CLI with `kamel help trait prometheus`, and possibly support `kamel help trait --all`, to fill the gap of missing traits help from the kamel CLI, while it's an important part of it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] astefanutti commented on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
astefanutti commented on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577125785
 
 
   Just thinking out loud, as `describe` is generally meant to describe remote resources, and to be somehow consistent with Kubernetes CLI, would something like `kamel help trait prometheus -o yaml` be preferable?
   
   It also provide a nice way to get trait documentation from the CLI with `kamel help trait prometheus`, and possibly support `kamel help trait --all`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] astefanutti merged pull request #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
astefanutti merged pull request #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] bfitzpat commented on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
bfitzpat commented on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577192968
 
 
   @astefanutti That would be a great way to handle this then -- offering both something user-friendly and tooling-friendly. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-k] jamesnetherton commented on issue #1220: feat: Offer easier access to trait list

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #1220: feat: Offer easier access to trait list
URL: https://github.com/apache/camel-k/pull/1220#issuecomment-577614733
 
 
   Pushed some changes to support `kamel help trait` along with the additional args we discussed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services