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/08 17:29:18 UTC

[GitHub] [camel-k] nicolaferraro opened a new issue #1182: Add native support for CronJobs

nicolaferraro opened a new issue #1182: Add native support for CronJobs
URL: https://github.com/apache/camel-k/issues/1182
 
 
   To complete the Camel K "serverless experience", a simple addition would be the support for Kubernetes CronJob out of the box.
   
   A user running an integration like:
   ```
   from('timer:tick?period=1m').to('...')
   ```
   
   Can have it materialized as cronjob.
   In practice, a pod will be created by Kubernetes only when it's time to run the integration and there's no pod running between executions.
   
   This rocks in combination with Quarkus.
   
   There will be periods of the timer that cannot be supported (sub minute, or periods that cannot be expressed by a cron), but that should be fine, we fallback to normal implementation.
   
   Equivalently, we can also add:
   ```
   from('quartz:tick?cron=* 0/1 * * ? *').to('...')
   ```
   
   The translation is easier, even if quartz supports 6-7 fields in the cron expression, while Kubernetes only 5 (no seconds, no years).
   
   This requires some changes also at runtime level.

----------------------------------------------------------------
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] lburgazzoli commented on issue #1182: Add native support for CronJobs

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1182: Add native support for CronJobs
URL: https://github.com/apache/camel-k/issues/1182#issuecomment-572290350
 
 
   On the runtime side, we can use a trick similar to the one we use for knative-source, like have a `cron` loader that replaces the `from` definition with a simple time that fore immediately and only once.
   
   Do you mind opening an issue on runtime side too? 
   

----------------------------------------------------------------
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] nicolaferraro closed issue #1182: Add native support for CronJobs

Posted by GitBox <gi...@apache.org>.
nicolaferraro closed issue #1182: Add native support for CronJobs
URL: https://github.com/apache/camel-k/issues/1182
 
 
   

----------------------------------------------------------------
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] lburgazzoli edited a comment on issue #1182: Add native support for CronJobs

Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1182: Add native support for CronJobs
URL: https://github.com/apache/camel-k/issues/1182#issuecomment-572290350
 
 
   On the runtime side, we can use a trick similar to the one we use for `knative-source`, like have a `cron` loader that replaces the `from` definition with a simple time that fires immediately and only once.
   
   Do you mind opening an issue on runtime side too? 
   

----------------------------------------------------------------
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] nicolaferraro commented on issue #1182: Add native support for CronJobs

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #1182: Add native support for CronJobs
URL: https://github.com/apache/camel-k/issues/1182#issuecomment-572296316
 
 
   Opening.. I've sketched a solution using a different trick (customizer), so that it can be used also when you need a knative-source loader.. Will try to publish soon, so we can iterate on that

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