Skip to content

Commit

Permalink
feat(trait): deprecate quarkus package-type
Browse files Browse the repository at this point in the history
This parameter exposed implementations details not user friendly. Enabling mode parameter which accept either `jvm` or `native` seems a better UX.
  • Loading branch information
squakez committed Sep 27, 2023
1 parent cbac62e commit b1c856c
Show file tree
Hide file tree
Showing 32 changed files with 464 additions and 208 deletions.
30 changes: 19 additions & 11 deletions config/crd/bases/camel.apache.org_integrationkits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,8 @@ spec:
quarkus:
description: 'The Quarkus trait configures the Quarkus runtime.
It''s enabled by default. NOTE: Compiling to a native executable,
i.e. when using `package-type=native`, is only supported for
kamelets, as well as YAML and XML integrations. It also requires
at least 4GiB of memory, so the Pod running the native build,
that is either the operator Pod, or the build Pod (depending
on the build strategy configured for the platform), must have
enough memory available.'
requires at least 4GiB of memory, so the Pod running the native
build must have enough memory available.'
properties:
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
Expand All @@ -327,19 +323,31 @@ spec:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
description: 'The Quarkus mode to run: either `jvm` or `native`
(default `jvm`). In case both `jvm` and `native` are specified,
two `IntegrationKit` resources are created, with the `native`
kit having precedence over the `jvm` one once ready.'
items:
description: QuarkusMode is the type of Quarkus build packaging.
enum:
- jvm
- native
type: string
type: array
packageTypes:
description: The Quarkus package types, `fast-jar`, `native-sources`
or `native` (default `fast-jar`). `native` is deprecated.
In case both `fast-jar` and `native` or `native-sources`
description: 'The Quarkus package types, `fast-jar` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
are specified, two `IntegrationKit` resources are created,
with the native kit having precedence over the `fast-jar`
one once ready. The order influences the resolution of the
current kit for the integration. The kit corresponding to
the first package type will be assigned to the integration
in case no existing kit that matches the integration exists.
Deprecated: use `mode` instead.'
items:
description: QuarkusPackageType is the type of Quarkus build
packaging.
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
enum:
- fast-jar
- native-sources
Expand Down
44 changes: 34 additions & 10 deletions config/crd/bases/camel.apache.org_integrationplatforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1616,19 +1616,31 @@ spec:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
description: 'The Quarkus mode to run: either `jvm` or `native`
(default `jvm`). In case both `jvm` and `native` are specified,
two `IntegrationKit` resources are created, with the `native`
kit having precedence over the `jvm` one once ready.'
items:
description: QuarkusMode is the type of Quarkus build packaging.
enum:
- jvm
- native
type: string
type: array
packageTypes:
description: The Quarkus package types, `fast-jar`, `native-sources`
or `native` (default `fast-jar`). `native` is deprecated.
In case both `fast-jar` and `native` or `native-sources`
description: 'The Quarkus package types, `fast-jar` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
are specified, two `IntegrationKit` resources are created,
with the native kit having precedence over the `fast-jar`
one once ready. The order influences the resolution of the
current kit for the integration. The kit corresponding to
the first package type will be assigned to the integration
in case no existing kit that matches the integration exists.
Deprecated: use `mode` instead.'
items:
description: QuarkusPackageType is the type of Quarkus build
packaging.
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
enum:
- fast-jar
- native-sources
Expand Down Expand Up @@ -3418,19 +3430,31 @@ spec:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
description: 'The Quarkus mode to run: either `jvm` or `native`
(default `jvm`). In case both `jvm` and `native` are specified,
two `IntegrationKit` resources are created, with the `native`
kit having precedence over the `jvm` one once ready.'
items:
description: QuarkusMode is the type of Quarkus build packaging.
enum:
- jvm
- native
type: string
type: array
packageTypes:
description: The Quarkus package types, `fast-jar`, `native-sources`
or `native` (default `fast-jar`). `native` is deprecated.
In case both `fast-jar` and `native` or `native-sources`
description: 'The Quarkus package types, `fast-jar` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
are specified, two `IntegrationKit` resources are created,
with the native kit having precedence over the `fast-jar`
one once ready. The order influences the resolution of the
current kit for the integration. The kit corresponding to
the first package type will be assigned to the integration
in case no existing kit that matches the integration exists.
Deprecated: use `mode` instead.'
items:
description: QuarkusPackageType is the type of Quarkus build
packaging.
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
enum:
- fast-jar
- native-sources
Expand Down
22 changes: 17 additions & 5 deletions config/crd/bases/camel.apache.org_integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7533,19 +7533,31 @@ spec:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
description: 'The Quarkus mode to run: either `jvm` or `native`
(default `jvm`). In case both `jvm` and `native` are specified,
two `IntegrationKit` resources are created, with the `native`
kit having precedence over the `jvm` one once ready.'
items:
description: QuarkusMode is the type of Quarkus build packaging.
enum:
- jvm
- native
type: string
type: array
packageTypes:
description: The Quarkus package types, `fast-jar`, `native-sources`
or `native` (default `fast-jar`). `native` is deprecated.
In case both `fast-jar` and `native` or `native-sources`
description: 'The Quarkus package types, `fast-jar` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
are specified, two `IntegrationKit` resources are created,
with the native kit having precedence over the `fast-jar`
one once ready. The order influences the resolution of the
current kit for the integration. The kit corresponding to
the first package type will be assigned to the integration
in case no existing kit that matches the integration exists.
Deprecated: use `mode` instead.'
items:
description: QuarkusPackageType is the type of Quarkus build
packaging.
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
enum:
- fast-jar
- native-sources
Expand Down
38 changes: 26 additions & 12 deletions config/crd/bases/camel.apache.org_kameletbindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7828,20 +7828,34 @@ spec:
description: Can be used to enable or disable a trait.
All traits share this common property.
type: boolean
packageTypes:
description: The Quarkus package types, `fast-jar`, `native-sources`
or `native` (default `fast-jar`). `native` is deprecated.
In case both `fast-jar` and `native` or `native-sources`
mode:
description: 'The Quarkus mode to run: either `jvm` or
`native` (default `jvm`). In case both `jvm` and `native`
are specified, two `IntegrationKit` resources are created,
with the native kit having precedence over the `fast-jar`
one once ready. The order influences the resolution
of the current kit for the integration. The kit corresponding
to the first package type will be assigned to the integration
in case no existing kit that matches the integration
exists.
with the `native` kit having precedence over the `jvm`
one once ready.'
items:
description: QuarkusMode is the type of Quarkus build
packaging.
enum:
- jvm
- native
type: string
type: array
packageTypes:
description: 'The Quarkus package types, `fast-jar` or
`native` (default `fast-jar`). In case both `fast-jar`
and `native` are specified, two `IntegrationKit` resources
are created, with the native kit having precedence over
the `fast-jar` one once ready. The order influences
the resolution of the current kit for the integration.
The kit corresponding to the first package type will
be assigned to the integration in case no existing kit
that matches the integration exists. Deprecated: use
`mode` instead.'
items:
description: QuarkusPackageType is the type of Quarkus
build packaging.
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
enum:
- fast-jar
- native-sources
Expand Down
38 changes: 26 additions & 12 deletions config/crd/bases/camel.apache.org_pipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7825,20 +7825,34 @@ spec:
description: Can be used to enable or disable a trait.
All traits share this common property.
type: boolean
packageTypes:
description: The Quarkus package types, `fast-jar`, `native-sources`
or `native` (default `fast-jar`). `native` is deprecated.
In case both `fast-jar` and `native` or `native-sources`
mode:
description: 'The Quarkus mode to run: either `jvm` or
`native` (default `jvm`). In case both `jvm` and `native`
are specified, two `IntegrationKit` resources are created,
with the native kit having precedence over the `fast-jar`
one once ready. The order influences the resolution
of the current kit for the integration. The kit corresponding
to the first package type will be assigned to the integration
in case no existing kit that matches the integration
exists.
with the `native` kit having precedence over the `jvm`
one once ready.'
items:
description: QuarkusMode is the type of Quarkus build
packaging.
enum:
- jvm
- native
type: string
type: array
packageTypes:
description: 'The Quarkus package types, `fast-jar` or
`native` (default `fast-jar`). In case both `fast-jar`
and `native` are specified, two `IntegrationKit` resources
are created, with the native kit having precedence over
the `fast-jar` one once ready. The order influences
the resolution of the current kit for the integration.
The kit corresponding to the first package type will
be assigned to the integration in case no existing kit
that matches the integration exists. Deprecated: use
`mode` instead.'
items:
description: QuarkusPackageType is the type of Quarkus
build packaging.
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
enum:
- fast-jar
- native-sources
Expand Down
27 changes: 24 additions & 3 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2568,7 +2568,7 @@ The Camel trait sets up Camel configuration.
The Quarkus trait configures the Quarkus runtime.
It's enabled by default.
NOTE: Compiling to a native executable, i.e. when using `package-type=native`, is only supported for kamelets, as well as YAML and XML integrations. It also requires at least 4GiB of memory, so the Pod running the native build, that is either the operator Pod, or the build Pod (depending on the build strategy configured for the platform), must have enough memory available.
NOTE: Compiling to a native executable, requires at least 4GiB of memory, so the Pod running the native build must have enough memory available.
|`registry` +
*xref:#_camel_apache_org_v1_trait_RegistryTrait[RegistryTrait]*
Expand Down Expand Up @@ -7578,6 +7578,16 @@ Automatically configures the platform registry secret on the pod if it is of typ
|===
[#_camel_apache_org_v1_trait_QuarkusMode]
=== QuarkusMode(`string` alias)
*Appears on:*
* <<#_camel_apache_org_v1_trait_QuarkusTrait, QuarkusTrait>>
QuarkusMode is the type of Quarkus build packaging.
[#_camel_apache_org_v1_trait_QuarkusPackageType]
=== QuarkusPackageType(`string` alias)
Expand All @@ -7586,6 +7596,7 @@ Automatically configures the platform registry secret on the pod if it is of typ
* <<#_camel_apache_org_v1_trait_QuarkusTrait, QuarkusTrait>>
QuarkusPackageType is the type of Quarkus build packaging.
Deprecated: use `QuarkusMode` instead.
[#_camel_apache_org_v1_trait_QuarkusTrait]
Expand Down Expand Up @@ -7622,12 +7633,22 @@ Compiling to a native executable, i.e. when using `package-type=native`, require
|
The Quarkus package types, `fast-jar`, `native-sources` or `native` (default `fast-jar`). `native` is deprecated.
In case both `fast-jar` and `native` or `native-sources` are specified, two `IntegrationKit` resources are created,
The Quarkus package types, `fast-jar` or `native` (default `fast-jar`).
In case both `fast-jar` and `native` are specified, two `IntegrationKit` resources are created,
with the native kit having precedence over the `fast-jar` one once ready.
The order influences the resolution of the current kit for the integration.
The kit corresponding to the first package type will be assigned to the
integration in case no existing kit that matches the integration exists.
Deprecated: use `mode` instead.
|`mode` +
*xref:#_camel_apache_org_v1_trait_QuarkusMode[[\]QuarkusMode]*
|
The Quarkus mode to run: either `jvm` or `native` (default `jvm`).
In case both `jvm` and `native` are specified, two `IntegrationKit` resources are created,
with the `native` kit having precedence over the `jvm` one once ready.
|===
Expand Down
Loading

0 comments on commit b1c856c

Please sign in to comment.