You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2025/07/30 07:23:00 UTC

[jira] [Commented] (CAMEL-22288) camel-jbang: Kubernetes plugin: add --source-dir option

    [ https://issues.apache.org/jira/browse/CAMEL-22288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18010840#comment-18010840 ] 

Claus Ibsen commented on CAMEL-22288:
-------------------------------------

You dont need source-dir for that, and its not its intention - its for prototype development where the source files can be updated and hot-reloaded.

You can do a k8s run where the name is a folder name/*, then all files in the given folder is used.

 

camel run myfolder/*


But we can maybe consider making jbang auto-detect the file name is a folder and then automatic load all files inside, so you dont need the /*

> camel-jbang: Kubernetes plugin: add --source-dir option
> -------------------------------------------------------
>
>                 Key: CAMEL-22288
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22288
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-kubernetes
>            Reporter: Cameron Fitzwater
>            Priority: Minor
>
> Similar to `camel run`, it would be nice to have a `camel kubernetes run/export --source-dir` option.
> --source-dir=<sourceDir>
>                              Source directory for dynamically loading Camel file
>                                (s) to run. When using this, then files cannot
>                                be specified at the same time.
> The goal being, if a directory has numerous `*.yaml` files AND an `application.properties` file alongside, one should be able to easily just specify the directory.
> What is driving this was a slight issue when trying to determine how to include *all* things from a source directory, and the fact that the application.properties files was not being picked up unless I first `cd` into the source-dir. This may be a potentially separate issue,  but is related to why this feature request is being floated.
> ```
> kubernetes export raw/* \
>     --name=$(APP_NAME) \
>     --dir=./$(APP_NAME) \
>     --gav=org.example.project:$(APP_NAME):0.0.0 \
>     --image='ghcr.io/org/$${project.artifactId}:$${revision}' \
>     --image-builder=docker \
>     --clean-dir \
>     --runtime=quarkus
> ```
> ... however, if you `cd ./raw` and run this, it does pick the `application.properties` file up:
> ```
> cd ./raw
> kubernetes export * \
>     --name=$(APP_NAME) \
>     --dir=../$(APP_NAME) \
>     --gav=org.example.project:$(APP_NAME):0.0.0 \
>     --image='ghcr.io/org/$${project.artifactId}:$${revision}' \
>     --image-builder=docker \
>     --clean-dir \
>     --runtime=quarkus
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)