You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/03/13 08:37:27 UTC

[GitHub] [camel-k] jamesnetherton opened a new issue #548: Improve SanitizeName

jamesnetherton opened a new issue #548: Improve SanitizeName
URL: https://github.com/apache/camel-k/issues/548
 
 
   I found a couple of small issues with the current implementation of [SanitizeName](https://github.com/apache/camel-k/blob/a4ce12f6ab7c8c2812a88104507718da52b6daa5/pkg/util/kubernetes/sanitize.go#L32-L41).
   
   1. If you try to create an integration using a path like:
   
   ```
   $ kamel run ../../examples/foo.java
   ```
   
   You get:
   
   ```
   Error: unable to determine integration name
   ```
   
   2. If you use a URL, the first part of the host name is used. So with GitHub you end up with the slightly odd name of 'raw'.
   
   ```
   $ kamel run https://raw.githubusercontent.com/apache/camel-k/master/examples/Sample.java
   
   integration "raw" created
   ```
   
   Maybe it'd be better to base the name on the actual file name (just like how it works when passing a filesystem path to the kamel binary). And fallback on host name if its not present.
   
   If we think its worth improving, I can submit a PR.

----------------------------------------------------------------
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