From ac9c19603cc7ae76c20bcc85f40f3829f67d3953 Mon Sep 17 00:00:00 2001 From: Gaelle Fournier Date: Thu, 1 Feb 2024 11:02:07 +0100 Subject: [PATCH 1/2] fix(doc): Add warning on cron trait for native build Ref #5088 --- pkg/apis/camel/v1/trait/cron.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/apis/camel/v1/trait/cron.go b/pkg/apis/camel/v1/trait/cron.go index 33f095a875..55f2eb4967 100644 --- a/pkg/apis/camel/v1/trait/cron.go +++ b/pkg/apis/camel/v1/trait/cron.go @@ -26,6 +26,8 @@ package trait // // Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`. // +// WARNING: In case of native build-mode defined in xref:traits:quarkus.adoc[quarkus] trait, the component can't be customized. +// // The rules for using a Kubernetes CronJob are the following: // // - `timer`: when period is set in milliseconds with no remaining seconds, for example 120000. If there is any second left as in 121000 (120s and 1s) or the presence of any of these parameters (delay, repeatCount, time) then a CronJob won't be created, but a standard deployment. From d64a6f886dfd98bfefeb7c3cde1121eb68bcbc82 Mon Sep 17 00:00:00 2001 From: Gaelle Fournier Date: Fri, 2 Feb 2024 09:55:35 +0100 Subject: [PATCH 2/2] chore: generate updates --- .../ROOT/partials/apis/camel-k-crds.adoc | 2 ++ docs/modules/traits/pages/cron.adoc | 2 ++ resources/traits.yaml | 17 +++++++++-------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index 4d72084672..df9191735c 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -6126,6 +6126,8 @@ in order to save resources when the integration does not need to be executed. Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`. +WARNING: In case of native build-mode defined in xref:traits:quarkus.adoc[quarkus] trait, the component can't be customized. + The rules for using a Kubernetes CronJob are the following: - `timer`: when period is set in milliseconds with no remaining seconds, for example 120000. If there is any second left as in 121000 (120s and 1s) or the presence of any of these parameters (delay, repeatCount, time) then a CronJob won't be created, but a standard deployment. diff --git a/docs/modules/traits/pages/cron.adoc b/docs/modules/traits/pages/cron.adoc index 124ae3542c..2250e33057 100755 --- a/docs/modules/traits/pages/cron.adoc +++ b/docs/modules/traits/pages/cron.adoc @@ -10,6 +10,8 @@ in order to save resources when the integration does not need to be executed. Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`. +WARNING: In case of native build-mode defined in xref:traits:quarkus.adoc[quarkus] trait, the component can't be customized. + The rules for using a Kubernetes CronJob are the following: - `timer`: when period is set in milliseconds with no remaining seconds, for example 120000. If there is any second left as in 121000 (120s and 1s) or the presence of any of these parameters (delay, repeatCount, time) then a CronJob won't be created, but a standard deployment. diff --git a/resources/traits.yaml b/resources/traits.yaml index 0f92439670..4e62ce385b 100755 --- a/resources/traits.yaml +++ b/resources/traits.yaml @@ -390,14 +390,15 @@ traits: For such tasks, the cron trait can materialize the integration as a Kubernetes CronJob instead of a standard deployment, in order to save resources when the integration does not need to be executed. Integrations that start from the following - components are evaluated by the cron trait: `timer`, `cron`, `quartz`. The rules - for using a Kubernetes CronJob are the following: - `timer`: when period is set - in milliseconds with no remaining seconds, for example 120000. If there is any - second left as in 121000 (120s and 1s) or the presence of any of these parameters - (delay, repeatCount, time) then a CronJob won''t be created, but a standard deployment. - - `cron`, `quartz`: when the cron expression does not contain seconds (or the - "seconds" part is set to 0). E.g. `cron:tab?schedule=0/2${plus}*{plus}*{plus}*{plus}?` - or `quartz:trigger?cron=0{plus}0/2{plus}*{plus}*{plus}*{plus}?`.' + components are evaluated by the cron trait: `timer`, `cron`, `quartz`. WARNING: + In case of native build-mode defined in xref:traits:quarkus.adoc[quarkus] trait, + the component can''t be customized. The rules for using a Kubernetes CronJob are + the following: - `timer`: when period is set in milliseconds with no remaining + seconds, for example 120000. If there is any second left as in 121000 (120s and + 1s) or the presence of any of these parameters (delay, repeatCount, time) then + a CronJob won''t be created, but a standard deployment. - `cron`, `quartz`: when + the cron expression does not contain seconds (or the "seconds" part is set to + 0). E.g. `cron:tab?schedule=0/2${plus}*{plus}*{plus}*{plus}?` or `quartz:trigger?cron=0{plus}0/2{plus}*{plus}*{plus}*{plus}?`.' properties: - name: enabled type: bool