Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.2.x]: fix(doc): Add warning on cron trait for native build #5129

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/traits/pages/cron.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/camel/v1/trait/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 9 additions & 8 deletions resources/traits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading