From 7c503aa9361febba998ce151edd0cca0986e2c09 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Wed, 4 Oct 2023 10:38:17 +0200 Subject: [PATCH] fix(e2e): rename quarkus.mode to build-mode It seems that usage of `mode` create some problem when unmarshalling the CRD --- .../camel.apache.org_integrationkits.yaml | 22 +++++----- ...camel.apache.org_integrationplatforms.yaml | 44 +++++++++---------- .../bases/camel.apache.org_integrations.yaml | 22 +++++----- .../camel.apache.org_kameletbindings.yaml | 22 +++++----- config/crd/bases/camel.apache.org_pipes.yaml | 22 +++++----- .../ROOT/partials/apis/camel-k-crds.adoc | 6 +-- docs/modules/traits/pages/quarkus.adoc | 6 +-- e2e/builder/build_test.go | 2 +- e2e/native/native_binding_test.go | 2 +- e2e/native/native_test.go | 10 ++--- e2e/native/native_with_sources_test.go | 10 ++--- helm/camel-k/crds/crd-integration-kit.yaml | 22 +++++----- .../crds/crd-integration-platform.yaml | 44 +++++++++---------- helm/camel-k/crds/crd-integration.yaml | 22 +++++----- helm/camel-k/crds/crd-kamelet-binding.yaml | 22 +++++----- helm/camel-k/crds/crd-pipe.yaml | 22 +++++----- pkg/apis/camel/v1/trait/quarkus.go | 6 +-- resources/traits.yaml | 6 +-- 18 files changed, 156 insertions(+), 156 deletions(-) diff --git a/config/crd/bases/camel.apache.org_integrationkits.yaml b/config/crd/bases/camel.apache.org_integrationkits.yaml index b796bc8f45..2a42beee8c 100644 --- a/config/crd/bases/camel.apache.org_integrationkits.yaml +++ b/config/crd/bases/camel.apache.org_integrationkits.yaml @@ -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` @@ -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` @@ -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.' diff --git a/config/crd/bases/camel.apache.org_integrationplatforms.yaml b/config/crd/bases/camel.apache.org_integrationplatforms.yaml index 39827cdd4b..0f473b8012 100644 --- a/config/crd/bases/camel.apache.org_integrationplatforms.yaml +++ b/config/crd/bases/camel.apache.org_integrationplatforms.yaml @@ -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` @@ -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` @@ -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.' @@ -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` @@ -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` @@ -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.' diff --git a/config/crd/bases/camel.apache.org_integrations.yaml b/config/crd/bases/camel.apache.org_integrations.yaml index 21eb272257..9688a46a15 100644 --- a/config/crd/bases/camel.apache.org_integrations.yaml +++ b/config/crd/bases/camel.apache.org_integrations.yaml @@ -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` @@ -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` @@ -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.' diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml b/config/crd/bases/camel.apache.org_kameletbindings.yaml index f51b727268..2f5ff74978 100644 --- a/config/crd/bases/camel.apache.org_kameletbindings.yaml +++ b/config/crd/bases/camel.apache.org_kameletbindings.yaml @@ -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, @@ -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` @@ -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.' diff --git a/config/crd/bases/camel.apache.org_pipes.yaml b/config/crd/bases/camel.apache.org_pipes.yaml index f58e4be83e..5bf2d8ff01 100644 --- a/config/crd/bases/camel.apache.org_pipes.yaml +++ b/config/crd/bases/camel.apache.org_pipes.yaml @@ -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, @@ -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` @@ -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.' diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc index bba0ee6ac7..39fe3ed4c2 100644 --- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc +++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc @@ -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. @@ -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]* | diff --git a/docs/modules/traits/pages/quarkus.adoc b/docs/modules/traits/pages/quarkus.adoc index d015deadc0..77a7ce0218 100755 --- a/docs/modules/traits/pages/quarkus.adoc +++ b/docs/modules/traits/pages/quarkus.adoc @@ -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. @@ -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, diff --git a/e2e/builder/build_test.go b/e2e/builder/build_test.go index 204fd7d80d..f449f0ef23 100644 --- a/e2e/builder/build_test.go +++ b/e2e/builder/build_test.go @@ -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) } diff --git a/e2e/native/native_binding_test.go b/e2e/native/native_binding_test.go index 0f754dffae..4ee9ad92d9 100644 --- a/e2e/native/native_binding_test.go +++ b/e2e/native/native_binding_test.go @@ -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()) diff --git a/e2e/native/native_test.go b/e2e/native/native_test.go index 2a60b36eaa..265080ce7b 100644 --- a/e2e/native/native_test.go +++ b/e2e/native/native_test.go @@ -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()) @@ -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()) @@ -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()) @@ -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()) diff --git a/e2e/native/native_with_sources_test.go b/e2e/native/native_with_sources_test.go index 5134799287..fd9304c5ce 100644 --- a/e2e/native/native_with_sources_test.go +++ b/e2e/native/native_with_sources_test.go @@ -44,7 +44,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) { t.Run("java native support", func(t *testing.T) { name := "java-native" Expect(KamelRunWithID(operatorID, ns, "files/Java.java", "--name", name, - "-t", "quarkus.mode=native", + "-t", "quarkus.build-mode=native", "-t", "builder.tasks-limit-memory=quarkus-native:9.5Gi", ).Execute()).To(Succeed()) @@ -58,7 +58,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) { t.Run("java native same should not rebuild", func(t *testing.T) { name := "java-native-clone" Expect(KamelRunWithID(operatorID, ns, "files/Java.java", "--name", name, - "-t", "quarkus.mode=native", + "-t", "quarkus.build-mode=native", "-t", "builder.tasks-limit-memory=quarkus-native:9.5Gi", ).Execute()).To(Succeed()) @@ -75,7 +75,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) { t.Run("java native should rebuild", func(t *testing.T) { name := "java-native-2" Expect(KamelRunWithID(operatorID, ns, "files/Java2.java", "--name", name, - "-t", "quarkus.mode=native", + "-t", "quarkus.build-mode=native", "-t", "builder.tasks-limit-memory=quarkus-native:9.5Gi", ).Execute()).To(Succeed()) @@ -95,7 +95,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) { t.Run("groovy native support", func(t *testing.T) { name := "groovy-native" Expect(KamelRunWithID(operatorID, ns, "files/Groovy.groovy", "--name", name, - "-t", "quarkus.mode=native", + "-t", "quarkus.build-mode=native", "-t", "builder.tasks-limit-memory=quarkus-native:9.5Gi", ).Execute()).To(Succeed()) @@ -114,7 +114,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) { t.Run("kotlin native support", func(t *testing.T) { name := "kotlin-native" Expect(KamelRunWithID(operatorID, ns, "files/Kotlin.kts", "--name", name, - "-t", "quarkus.mode=native", + "-t", "quarkus.build-mode=native", "-t", "builder.tasks-limit-memory=quarkus-native:9.5Gi", ).Execute()).To(Succeed()) diff --git a/helm/camel-k/crds/crd-integration-kit.yaml b/helm/camel-k/crds/crd-integration-kit.yaml index b796bc8f45..2a42beee8c 100644 --- a/helm/camel-k/crds/crd-integration-kit.yaml +++ b/helm/camel-k/crds/crd-integration-kit.yaml @@ -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` @@ -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` @@ -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.' diff --git a/helm/camel-k/crds/crd-integration-platform.yaml b/helm/camel-k/crds/crd-integration-platform.yaml index 39827cdd4b..0f473b8012 100644 --- a/helm/camel-k/crds/crd-integration-platform.yaml +++ b/helm/camel-k/crds/crd-integration-platform.yaml @@ -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` @@ -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` @@ -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.' @@ -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` @@ -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` @@ -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.' diff --git a/helm/camel-k/crds/crd-integration.yaml b/helm/camel-k/crds/crd-integration.yaml index 21eb272257..9688a46a15 100644 --- a/helm/camel-k/crds/crd-integration.yaml +++ b/helm/camel-k/crds/crd-integration.yaml @@ -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` @@ -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` @@ -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.' diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml b/helm/camel-k/crds/crd-kamelet-binding.yaml index f51b727268..2f5ff74978 100644 --- a/helm/camel-k/crds/crd-kamelet-binding.yaml +++ b/helm/camel-k/crds/crd-kamelet-binding.yaml @@ -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, @@ -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` @@ -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.' diff --git a/helm/camel-k/crds/crd-pipe.yaml b/helm/camel-k/crds/crd-pipe.yaml index f58e4be83e..5bf2d8ff01 100644 --- a/helm/camel-k/crds/crd-pipe.yaml +++ b/helm/camel-k/crds/crd-pipe.yaml @@ -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, @@ -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` @@ -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.' diff --git a/pkg/apis/camel/v1/trait/quarkus.go b/pkg/apis/camel/v1/trait/quarkus.go index fb1f36f899..823bfa10bc 100644 --- a/pkg/apis/camel/v1/trait/quarkus.go +++ b/pkg/apis/camel/v1/trait/quarkus.go @@ -22,7 +22,7 @@ package trait // 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. // // +camel-k:trait=quarkus. @@ -34,12 +34,12 @@ type QuarkusTrait struct { // 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. PackageTypes []QuarkusPackageType `property:"package-type" json:"packageTypes,omitempty"` // 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. - Modes []QuarkusMode `property:"mode" json:"mode,omitempty"` + Modes []QuarkusMode `property:"build-mode" json:"buildMode,omitempty"` } // QuarkusMode is the type of Quarkus build packaging. diff --git a/resources/traits.yaml b/resources/traits.yaml index 2f2a340ce5..8a0e7c5865 100755 --- a/resources/traits.yaml +++ b/resources/traits.yaml @@ -1321,7 +1321,7 @@ traits: - OpenShift description: '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`, + strategy. 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.' properties: @@ -1337,8 +1337,8 @@ traits: 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.' - - name: mode + `build-mode` instead.' + - name: build-mode type: '[]github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait.QuarkusMode' description: 'The Quarkus mode to run: either `jvm` or `native` (default `jvm`). In case both `jvm` and `native` are specified, two `IntegrationKit` resources