Skip to content

Commit

Permalink
fix(e2e): rename quarkus.mode to build-mode
Browse files Browse the repository at this point in the history
It seems that usage of  `mode` create some problem when unmarshalling the CRD
  • Loading branch information
squakez committed Oct 4, 2023
1 parent 0dd0833 commit 7c503aa
Show file tree
Hide file tree
Showing 18 changed files with 156 additions and 156 deletions.
22 changes: 11 additions & 11 deletions config/crd/bases/camel.apache.org_integrationkits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,7 @@ spec:
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:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
buildMode:
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`
Expand All @@ -335,6 +326,15 @@ spec:
- native
type: string
type: array
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
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` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
Expand All @@ -344,7 +344,7 @@ spec:
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.'
Deprecated: use `build-mode` instead.'
items:
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
Expand Down
44 changes: 22 additions & 22 deletions config/crd/bases/camel.apache.org_integrationplatforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1607,16 +1607,7 @@ spec:
quarkus:
description: The configuration of Quarkus trait
properties:
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
buildMode:
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`
Expand All @@ -1628,6 +1619,15 @@ spec:
- native
type: string
type: array
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
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` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
Expand All @@ -1637,7 +1637,7 @@ spec:
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.'
Deprecated: use `build-mode` instead.'
items:
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
Expand Down Expand Up @@ -3420,16 +3420,7 @@ spec:
quarkus:
description: The configuration of Quarkus trait
properties:
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
buildMode:
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`
Expand All @@ -3441,6 +3432,15 @@ spec:
- native
type: string
type: array
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
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` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
Expand All @@ -3450,7 +3450,7 @@ spec:
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.'
Deprecated: use `build-mode` instead.'
items:
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
Expand Down
22 changes: 11 additions & 11 deletions config/crd/bases/camel.apache.org_integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7524,16 +7524,7 @@ spec:
quarkus:
description: The configuration of Quarkus trait
properties:
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
type: boolean
mode:
buildMode:
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`
Expand All @@ -7545,6 +7536,15 @@ spec:
- native
type: string
type: array
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
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` or `native`
(default `fast-jar`). In case both `fast-jar` and `native`
Expand All @@ -7554,7 +7554,7 @@ spec:
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.'
Deprecated: use `build-mode` instead.'
items:
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
Expand Down
22 changes: 11 additions & 11 deletions config/crd/bases/camel.apache.org_kameletbindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7819,16 +7819,7 @@ spec:
quarkus:
description: The configuration of Quarkus trait
properties:
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait.
All traits share this common property.
type: boolean
mode:
buildMode:
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,
Expand All @@ -7842,6 +7833,15 @@ spec:
- native
type: string
type: array
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
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` or
`native` (default `fast-jar`). In case both `fast-jar`
Expand All @@ -7852,7 +7852,7 @@ spec:
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.'
`build-mode` instead.'
items:
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
Expand Down
22 changes: 11 additions & 11 deletions config/crd/bases/camel.apache.org_pipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7816,16 +7816,7 @@ spec:
quarkus:
description: The configuration of Quarkus trait
properties:
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait.
All traits share this common property.
type: boolean
mode:
buildMode:
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,
Expand All @@ -7839,6 +7830,15 @@ spec:
- native
type: string
type: array
configuration:
description: 'Legacy trait configuration parameters. Deprecated:
for backward compatibility.'
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
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` or
`native` (default `fast-jar`). In case both `fast-jar`
Expand All @@ -7849,7 +7849,7 @@ spec:
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.'
`build-mode` instead.'
items:
description: 'QuarkusPackageType is the type of Quarkus
build packaging. Deprecated: use `QuarkusMode` instead.'
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7613,7 +7613,7 @@ The Quarkus trait configures the Quarkus runtime.
It's enabled by default.
NOTE: A native based compilation will be forced to use a `pod` build strategy.
Compiling to a native executable, i.e. when using `package-type=native`, requires at least
Compiling to a native executable, i.e. when using `build-mode=native`, requires at least
4GiB of memory, so the Pod running the native build, must have enough memory available.
Expand All @@ -7640,9 +7640,9 @@ 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.
Deprecated: use `build-mode` instead.
|`mode` +
|`buildMode` +
*xref:#_camel_apache_org_v1_trait_QuarkusMode[[\]QuarkusMode]*
|
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/traits/pages/quarkus.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Quarkus trait configures the Quarkus runtime.
It's enabled by default.

NOTE: A native based compilation will be forced to use a `pod` build strategy.
Compiling to a native executable, i.e. when using `package-type=native`, requires at least
Compiling to a native executable, i.e. when using `build-mode=native`, requires at least
4GiB of memory, so the Pod running the native build, must have enough memory available.


Expand Down Expand Up @@ -41,9 +41,9 @@ 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.
Deprecated: use `build-mode` instead.

| quarkus.mode
| quarkus.build-mode
| []github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait.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,
Expand Down
2 changes: 1 addition & 1 deletion e2e/builder/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func TestKitTimerToLogFullNativeBuild(t *testing.T) {
"camel:timer", "camel:log",
},
traits: []string{
"quarkus.mode=native",
"quarkus.build-mode=native",
},
}, v1.BuildPhaseSucceeded, v1.IntegrationKitPhaseReady)
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/native/native_binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestNativeBinding(t *testing.T) {
"timer-source",
"log-sink",
"-p", "source.message="+message,
"--annotation", "trait.camel.apache.org/quarkus.mode=native",
"--annotation", "trait.camel.apache.org/quarkus.build-mode=native",
"--annotation", "trait.camel.apache.org/builder.tasks-limit-memory=quarkus-native:6.5Gi",
"--name", bindingName,
).Execute()).To(Succeed())
Expand Down
10 changes: 5 additions & 5 deletions e2e/native/native_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestNativeIntegrations(t *testing.T) {
t.Run("unsupported integration source language", func(t *testing.T) {
name := "unsupported-js"
Expect(KamelRunWithID(operatorID, ns, "files/JavaScript.js", "--name", name,
"-t", "quarkus.mode=native",
"-t", "quarkus.build-mode=native",
"-t", "builder.tasks-limit-memory=quarkus-native:6.5Gi",
).Execute()).To(Succeed())

Expand All @@ -60,7 +60,7 @@ func TestNativeIntegrations(t *testing.T) {
t.Run("xml native support", func(t *testing.T) {
name := "xml-native"
Expect(KamelRunWithID(operatorID, ns, "files/Xml.xml", "--name", name,
"-t", "quarkus.mode=native",
"-t", "quarkus.build-mode=native",
"-t", "builder.tasks-limit-memory=quarkus-native:6.5Gi",
).Execute()).To(Succeed())

Expand All @@ -81,8 +81,8 @@ func TestNativeIntegrations(t *testing.T) {
Expect(DeleteKits(ns)).To(Succeed())
name := "yaml-native"
Expect(KamelRunWithID(operatorID, ns, "files/yaml.yaml", "--name", name,
"-t", "quarkus.mode=jvm",
"-t", "quarkus.mode=native",
"-t", "quarkus.build-mode=jvm",
"-t", "quarkus.build-mode=native",
"-t", "builder.tasks-limit-memory=quarkus-native:6.5Gi",
).Execute()).To(Succeed())

Expand Down Expand Up @@ -134,7 +134,7 @@ func TestNativeIntegrations(t *testing.T) {
t.Run("yaml native should not rebuild", func(t *testing.T) {
name := "yaml-native-2"
Expect(KamelRunWithID(operatorID, ns, "files/yaml2.yaml", "--name", name,
"-t", "quarkus.mode=native",
"-t", "quarkus.build-mode=native",
"-t", "builder.tasks-limit-memory=quarkus-native:6.5Gi",
).Execute()).To(Succeed())

Expand Down
Loading

0 comments on commit 7c503aa

Please sign in to comment.