Skip to content

Commit 1643001

Browse files
committed
feat(runtime): enable plain Quarkus runtime
Added the support for plain Quarkus runtime. Trait `camel.runtime-provider` is in charge to control the possibility to use `plain-quarkus`.
1 parent 144ddcb commit 1643001

24 files changed

+497
-98
lines changed

.github/workflows/native.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ jobs:
7373
- name: Infra setting
7474
uses: ./.github/actions/infra-setting
7575

76-
- name: Install Knative
77-
shell: bash
78-
run: |
79-
./e2e/knative/files/setup.sh
80-
8176
- name: Install operator
8277
shell: bash
8378
run: |

.github/workflows/nightly-latest-runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
workflow_dispatch:
3333

3434
jobs:
35-
release:
35+
smoke-tests:
3636
strategy:
3737
fail-fast: false
3838
matrix:
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
--- # ---------------------------------------------------------------------------
2+
3+
# ---------------------------------------------------------------------------
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership.
7+
# The ASF licenses this file to You under the Apache License, Version 2.0
8+
# (the "License"); you may not use this file except in compliance with
9+
# the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
# ---------------------------------------------------------------------------
19+
20+
name: Nightly check against plain Quarkus runtime
21+
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
CAMEL_K_TEST_TIMEOUT_SHORT: 2m
25+
CAMEL_K_TEST_TIMEOUT_MEDIUM: 5m
26+
CAMEL_K_TEST_TIMEOUT_LONG: 10m
27+
CAMEL_K_TEST_TIMEOUT_VERY_LONG: 30m
28+
29+
on:
30+
schedule:
31+
- cron: "30 3 * * *"
32+
workflow_dispatch:
33+
34+
jobs:
35+
common:
36+
strategy:
37+
matrix:
38+
# We want to check this on latest development branch only
39+
ref-branch: [main]
40+
41+
if: github.repository == 'apache/camel-k'
42+
runs-on: ubuntu-latest
43+
steps:
44+
45+
- name: "Checkout code"
46+
uses: actions/checkout@v4
47+
with:
48+
ref: ${{ matrix.ref-branch }}
49+
persist-credentials: false
50+
submodules: recursive
51+
52+
- name: Infra setting
53+
uses: ./.github/actions/infra-setting
54+
55+
- name: Install operator
56+
shell: bash
57+
run: |
58+
kubectl create ns camel-k
59+
make install-k8s-global
60+
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
61+
kubectl patch itp camel-k -n camel-k -p '{"spec":{"traits":{"camel":{"runtimeProvider":"plain-quarkus"}}}}' --type=merge
62+
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
63+
64+
- name: Run test
65+
shell: bash
66+
run: |
67+
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-common
68+
69+
quarkus-native:
70+
strategy:
71+
matrix:
72+
# We want to check this on latest development branch only
73+
ref-branch: [main]
74+
75+
if: github.repository == 'apache/camel-k'
76+
runs-on: ubuntu-latest
77+
steps:
78+
79+
- name: "Checkout code"
80+
uses: actions/checkout@v4
81+
with:
82+
ref: ${{ matrix.ref-branch }}
83+
persist-credentials: false
84+
submodules: recursive
85+
86+
- name: Infra setting
87+
uses: ./.github/actions/infra-setting
88+
89+
- name: Install operator
90+
shell: bash
91+
run: |
92+
kubectl create ns camel-k
93+
make install-k8s-global
94+
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
95+
kubectl patch itp camel-k -n camel-k -p '{"spec":{"traits":{"camel":{"runtimeProvider":"plain-quarkus"}}}}' --type=merge
96+
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
97+
98+
- name: Run test
99+
shell: bash
100+
run: |
101+
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-quarkus-native
102+
103+
knative:
104+
strategy:
105+
matrix:
106+
# We want to check this on latest development branch only
107+
ref-branch: [main]
108+
109+
if: github.repository == 'apache/camel-k'
110+
runs-on: ubuntu-latest
111+
steps:
112+
113+
- name: "Checkout code"
114+
uses: actions/checkout@v4
115+
with:
116+
ref: ${{ matrix.ref-branch }}
117+
persist-credentials: false
118+
submodules: recursive
119+
120+
- name: Infra setting
121+
uses: ./.github/actions/infra-setting
122+
123+
- name: Install Knative
124+
shell: bash
125+
run: |
126+
./e2e/knative/files/setup.sh
127+
128+
- name: Install operator
129+
shell: bash
130+
run: |
131+
kubectl create ns camel-k
132+
make install-k8s-global
133+
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
134+
kubectl patch itp camel-k -n camel-k -p '{"spec":{"traits":{"camel":{"runtimeProvider":"plain-quarkus"}}}}' --type=merge
135+
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
136+
137+
- name: Run test
138+
shell: bash
139+
run: |
140+
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-knative

docs/modules/ROOT/partials/apis/camel-k-crds.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6497,14 +6497,21 @@ The Camel trait can be used to configure versions of Apache Camel K runtime and
64976497
64986498
64996499
6500+
|`runtimeProvider` +
6501+
string
6502+
|
6503+
6504+
6505+
The runtime provider to use for the integration. (Default, Camel K Runtime).
6506+
65006507
|`runtimeVersion` +
65016508
string
65026509
|
65036510
65046511
6505-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
6512+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
65066513
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
6507-
to the best matching Catalog existing on the cluster.
6514+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
65086515
65096516
|`properties` +
65106517
[]string

docs/modules/traits/pages/camel.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ The following configuration options are available:
2929
| bool
3030
| Deprecated: no longer in use.
3131

32+
| camel.runtime-provider
33+
| string
34+
| The runtime provider to use for the integration. (Default, Camel K Runtime).
35+
3236
| camel.runtime-version
3337
| string
34-
| The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
38+
| The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
3539
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
36-
to the best matching Catalog existing on the cluster.
40+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
3741

3842
| camel.properties
3943
| []string

helm/camel-k/crds/camel-k-crds.yaml

Lines changed: 72 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,11 +3023,18 @@ spec:
30233023
items:
30243024
type: string
30253025
type: array
3026+
runtimeProvider:
3027+
description: The runtime provider to use for the integration.
3028+
(Default, Camel K Runtime).
3029+
enum:
3030+
- quarkus
3031+
- plain-quarkus
3032+
type: string
30263033
runtimeVersion:
30273034
description: |-
3028-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
3035+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
30293036
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
3030-
to the best matching Catalog existing on the cluster.
3037+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
30313038
type: string
30323039
type: object
30333040
quarkus:
@@ -3965,11 +3972,18 @@ spec:
39653972
items:
39663973
type: string
39673974
type: array
3975+
runtimeProvider:
3976+
description: The runtime provider to use for the integration.
3977+
(Default, Camel K Runtime).
3978+
enum:
3979+
- quarkus
3980+
- plain-quarkus
3981+
type: string
39683982
runtimeVersion:
39693983
description: |-
3970-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
3984+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
39713985
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
3972-
to the best matching Catalog existing on the cluster.
3986+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
39733987
type: string
39743988
type: object
39753989
container:
@@ -6154,11 +6168,18 @@ spec:
61546168
items:
61556169
type: string
61566170
type: array
6171+
runtimeProvider:
6172+
description: The runtime provider to use for the integration.
6173+
(Default, Camel K Runtime).
6174+
enum:
6175+
- quarkus
6176+
- plain-quarkus
6177+
type: string
61576178
runtimeVersion:
61586179
description: |-
6159-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
6180+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
61606181
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
6161-
to the best matching Catalog existing on the cluster.
6182+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
61626183
type: string
61636184
type: object
61646185
container:
@@ -8246,11 +8267,18 @@ spec:
82468267
items:
82478268
type: string
82488269
type: array
8270+
runtimeProvider:
8271+
description: The runtime provider to use for the integration.
8272+
(Default, Camel K Runtime).
8273+
enum:
8274+
- quarkus
8275+
- plain-quarkus
8276+
type: string
82498277
runtimeVersion:
82508278
description: |-
8251-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
8279+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
82528280
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
8253-
to the best matching Catalog existing on the cluster.
8281+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
82548282
type: string
82558283
type: object
82568284
container:
@@ -10314,11 +10342,18 @@ spec:
1031410342
items:
1031510343
type: string
1031610344
type: array
10345+
runtimeProvider:
10346+
description: The runtime provider to use for the integration.
10347+
(Default, Camel K Runtime).
10348+
enum:
10349+
- quarkus
10350+
- plain-quarkus
10351+
type: string
1031710352
runtimeVersion:
1031810353
description: |-
10319-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
10354+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
1032010355
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
10321-
to the best matching Catalog existing on the cluster.
10356+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
1032210357
type: string
1032310358
type: object
1032410359
container:
@@ -18763,11 +18798,18 @@ spec:
1876318798
items:
1876418799
type: string
1876518800
type: array
18801+
runtimeProvider:
18802+
description: The runtime provider to use for the integration.
18803+
(Default, Camel K Runtime).
18804+
enum:
18805+
- quarkus
18806+
- plain-quarkus
18807+
type: string
1876618808
runtimeVersion:
1876718809
description: |-
18768-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
18810+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
1876918811
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
18770-
to the best matching Catalog existing on the cluster.
18812+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
1877118813
type: string
1877218814
type: object
1877318815
container:
@@ -20758,11 +20800,18 @@ spec:
2075820800
items:
2075920801
type: string
2076020802
type: array
20803+
runtimeProvider:
20804+
description: The runtime provider to use for the integration.
20805+
(Default, Camel K Runtime).
20806+
enum:
20807+
- quarkus
20808+
- plain-quarkus
20809+
type: string
2076120810
runtimeVersion:
2076220811
description: |-
20763-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
20812+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
2076420813
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
20765-
to the best matching Catalog existing on the cluster.
20814+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
2076620815
type: string
2076720816
type: object
2076820817
container:
@@ -30582,11 +30631,18 @@ spec:
3058230631
items:
3058330632
type: string
3058430633
type: array
30634+
runtimeProvider:
30635+
description: The runtime provider to use for the integration.
30636+
(Default, Camel K Runtime).
30637+
enum:
30638+
- quarkus
30639+
- plain-quarkus
30640+
type: string
3058530641
runtimeVersion:
3058630642
description: |-
30587-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
30643+
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
3058830644
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
30589-
to the best matching Catalog existing on the cluster.
30645+
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
3059030646
type: string
3059130647
type: object
3059230648
container:

pkg/apis/camel/v1/camelcatalog_types_support.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ func (c *CamelCatalogSpec) GetRuntimeVersion() string {
182182
return c.Runtime.Version
183183
}
184184

185+
// GetRuntimeVersion returns the Camel K runtime version of the catalog.
186+
func (c *CamelCatalogSpec) GetRuntimeProvider() RuntimeProvider {
187+
return c.Runtime.Provider
188+
}
189+
185190
// GetCamelVersion returns the Camel version the runtime is based on.
186191
func (c *CamelCatalogSpec) GetCamelVersion() string {
187192
return c.Runtime.Metadata["camel.version"]

0 commit comments

Comments
 (0)