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

feat(runtime): enable plain Quarkus runtime #5991

Merged
merged 1 commit into from
Dec 14, 2024
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
5 changes: 0 additions & 5 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ jobs:
- name: Infra setting
uses: ./.github/actions/infra-setting

- name: Install Knative
shell: bash
run: |
./e2e/knative/files/setup.sh

- name: Install operator
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-latest-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
workflow_dispatch:

jobs:
release:
smoke-tests:
strategy:
fail-fast: false
matrix:
Expand Down
140 changes: 140 additions & 0 deletions .github/workflows/nightly-quarkus-plain-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
--- # ---------------------------------------------------------------------------

# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

name: Nightly check against plain Quarkus runtime

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CAMEL_K_TEST_TIMEOUT_SHORT: 2m
CAMEL_K_TEST_TIMEOUT_MEDIUM: 5m
CAMEL_K_TEST_TIMEOUT_LONG: 10m
CAMEL_K_TEST_TIMEOUT_VERY_LONG: 30m

on:
schedule:
- cron: "30 3 * * *"
workflow_dispatch:

jobs:
common:
strategy:
matrix:
# We want to check this on latest development branch only
ref-branch: [main]

if: github.repository == 'apache/camel-k'
runs-on: ubuntu-latest
steps:

- name: "Checkout code"
uses: actions/checkout@v4
with:
ref: ${{ matrix.ref-branch }}
persist-credentials: false
submodules: recursive

- name: Infra setting
uses: ./.github/actions/infra-setting

- name: Install operator
shell: bash
run: |
kubectl create ns camel-k
make install-k8s-global
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
kubectl patch itp camel-k -n camel-k -p '{"spec":{"traits":{"camel":{"runtimeProvider":"plain-quarkus"}}}}' --type=merge
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s

- name: Run test
shell: bash
run: |
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-common

quarkus-native:
strategy:
matrix:
# We want to check this on latest development branch only
ref-branch: [main]

if: github.repository == 'apache/camel-k'
runs-on: ubuntu-latest
steps:

- name: "Checkout code"
uses: actions/checkout@v4
with:
ref: ${{ matrix.ref-branch }}
persist-credentials: false
submodules: recursive

- name: Infra setting
uses: ./.github/actions/infra-setting

- name: Install operator
shell: bash
run: |
kubectl create ns camel-k
make install-k8s-global
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
kubectl patch itp camel-k -n camel-k -p '{"spec":{"traits":{"camel":{"runtimeProvider":"plain-quarkus"}}}}' --type=merge
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s

- name: Run test
shell: bash
run: |
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-quarkus-native

knative:
strategy:
matrix:
# We want to check this on latest development branch only
ref-branch: [main]

if: github.repository == 'apache/camel-k'
runs-on: ubuntu-latest
steps:

- name: "Checkout code"
uses: actions/checkout@v4
with:
ref: ${{ matrix.ref-branch }}
persist-credentials: false
submodules: recursive

- name: Infra setting
uses: ./.github/actions/infra-setting

- name: Install Knative
shell: bash
run: |
./e2e/knative/files/setup.sh

- name: Install operator
shell: bash
run: |
kubectl create ns camel-k
make install-k8s-global
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s
kubectl patch itp camel-k -n camel-k -p '{"spec":{"traits":{"camel":{"runtimeProvider":"plain-quarkus"}}}}' --type=merge
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=60s

- name: Run test
shell: bash
run: |
DO_TEST_PREBUILD=false GOTESTFMT="-json 2>&1 | gotestfmt" make test-knative
11 changes: 9 additions & 2 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6497,14 +6497,21 @@ The Camel trait can be used to configure versions of Apache Camel K runtime and



|`runtimeProvider` +
string
|


The runtime provider to use for the integration. (Default, Camel K Runtime).

|`runtimeVersion` +
string
|


The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).

|`properties` +
[]string
Expand Down
8 changes: 6 additions & 2 deletions docs/modules/traits/pages/camel.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ The following configuration options are available:
| bool
| Deprecated: no longer in use.

| camel.runtime-provider
| string
| The runtime provider to use for the integration. (Default, Camel K Runtime).

| camel.runtime-version
| string
| The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
| The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).

| camel.properties
| []string
Expand Down
88 changes: 72 additions & 16 deletions helm/camel-k/crds/camel-k-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3023,11 +3023,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
quarkus:
Expand Down Expand Up @@ -3965,11 +3972,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
container:
Expand Down Expand Up @@ -6154,11 +6168,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
container:
Expand Down Expand Up @@ -8246,11 +8267,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
container:
Expand Down Expand Up @@ -10314,11 +10342,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
container:
Expand Down Expand Up @@ -18763,11 +18798,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
container:
Expand Down Expand Up @@ -20758,11 +20800,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
container:
Expand Down Expand Up @@ -30582,11 +30631,18 @@ spec:
items:
type: string
type: array
runtimeProvider:
description: The runtime provider to use for the integration.
(Default, Camel K Runtime).
enum:
- quarkus
- plain-quarkus
type: string
runtimeVersion:
description: |-
The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
The runtime version to use for the integration. It overrides the default version set in the Integration Platform.
You can use a fixed version (for example "3.2.3") or a semantic version (for example "3.x") which will try to resolve
to the best matching Catalog existing on the cluster.
to the best matching Catalog existing on the cluster (Default, the one provided by the operator version).
type: string
type: object
container:
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/camel/v1/camelcatalog_types_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ func (c *CamelCatalogSpec) GetRuntimeVersion() string {
return c.Runtime.Version
}

// GetRuntimeVersion returns the Camel K runtime version of the catalog.
func (c *CamelCatalogSpec) GetRuntimeProvider() RuntimeProvider {
return c.Runtime.Provider
}

// GetCamelVersion returns the Camel version the runtime is based on.
func (c *CamelCatalogSpec) GetCamelVersion() string {
return c.Runtime.Metadata["camel.version"]
Expand Down
Loading
Loading