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 2022/11/01 22:09:29 UTC

[GitHub] [camel-karavan] DiegoBetancourtC opened a new issue, #511: How to configure Auto Startup in a route using Env variable?

DiegoBetancourtC opened a new issue, #511:
URL: https://github.com/apache/camel-karavan/issues/511

   In my Java DSL, I have something like this:
   
   ```
    from("direct:my-route").autoStartup("{{env:MY_ENV_VAR_ONE:false}}")
              .process(new Processor() {
               ...
   ```
   
   Which gives the option to start the route based on the value of the env variable `MY_ENV_VAR_ONE`.
   
   I have tried Karavan but it only provides the option to turn on or off the Auto Startup property of the route, but no more. Is it possible to use env variables with this property?
   
   --
   
   I'm using Karavan in Visual Studio Code version v3.18.4 - Mac OS X


-- 
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.apache.org

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


[GitHub] [camel-karavan] davsclaus commented on issue #511: How to configure Auto Startup in a route using Env variable?

Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1352100028

   The yaml DSL is in some areas more basic in this area and offer boolean, int, types that otherwise in Java DSL is more rich and allow to use property placeholders for many options.


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


[GitHub] [camel-karavan] davsclaus commented on issue #511: How to configure Auto Startup in a route using Env variable?

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1519105300

   > @davsclaus are placeholders (properties or ENV VARs) supported for every parameters that are type=string in catalog?
   
   Yes they are


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


[GitHub] [camel-karavan] mgubaidullin commented on issue #511: How to configure Auto Startup in a route using Env variable?

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1519100031

   @davsclaus are placeholders (properties or ENV VARs) supported for every parameters that are type=string in catalog?


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


[GitHub] [camel-karavan] davsclaus commented on issue #511: How to configure Auto Startup in a route using Env variable?

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1497355671

   Yes @mgubaidullin you can find out via camel-catalog model files, eg
   
   In camelYamlDsl.json you have
   
   ```
         "org.apache.camel.model.RouteDefinition" : {
           "type" : "object",
           "properties" : {
             "autoStartup" : {
               "type" : "boolean"
             },
   ```
   
   Then you can find out its an option on `org.apache.camel.model.RouteDefinition`, which you can find in camel-catalog and match by `javaType` as in `route.json` snippet below:
   
   ```
   {
     "model": {
       "kind": "model",
       "name": "route",
       "title": "Route",
       "description": "A Camel route",
       "deprecated": false,
       "label": "configuration",
       "javaType": "org.apache.camel.model.RouteDefinition",
   ```
   
   Then you have the correct model class, and inside its properties you can find
   
   ```
       "autoStartup": { "kind": "attribute", "displayName": "Auto Startup", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "true", "description": "Whether to auto start this route" },
   ```
   
   And see that the type is `string`. And therefore it supports what the user reported.
   
   I assume you use this kind of "indirection" anyway to find documentation (eg = description) for every EIP option. So karavan must have some code that captures this, and then you can use it to find out which options can also be a "string" where you can use property placeholders, env variables and so on.
   
   This can also happens for options that are numeric (not only for boolean)


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


[GitHub] [camel-karavan] mgubaidullin commented on issue #511: How to configure Auto Startup in a route using Env variable?

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1494577037

   @davsclaus any progress on enriching camel-yaml-dsl schema with information which options can have a string property placeholder?


-- 
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: [I] How to configure Auto Startup in a route using Env variable? [camel-karavan]

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin closed issue #511: How to configure Auto Startup in a route using Env variable?
URL: https://github.com/apache/camel-karavan/issues/511


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


[GitHub] [camel-karavan] mgubaidullin commented on issue #511: How to configure Auto Startup in a route using Env variable?

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1671668653

   After https://github.com/apache/camel-karavan/issues/836


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


[GitHub] [camel-karavan] davsclaus commented on issue #511: How to configure Auto Startup in a route using Env variable?

Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1352101570

   We would need to enrich the camel-yaml-dsl schema with information which options can have a string property placeholder as well (or check via camel-catalog) and then Karavan can have some kind of "..." button to set the option via a placeholder syntax


-- 
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: [I] How to configure Auto Startup in a route using Env variable? [camel-karavan]

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1839841197

   @davsclaus I have found only 4 fields in RouteConfiguration that are defined as `boolean` in camelYamlDsl.json and as `string` in camel-catalog.


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