You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/03/22 14:04:10 UTC
[camel-k-runtime] branch main updated (30e84af5 -> 221253bf)
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
from 30e84af5 build(deps): bump maven-deploy-plugin from 3.0.0 to 3.1.0
new 3874f255 Revert "Remove camel-k-master, replacement is camel-quarkus-kubernetes"
new 221253bf chore: align version
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../deployment/pom.xml | 12 ++-
.../k/quarkus/master/deployment/MasterFeature.java | 6 +-
.../impl/pom.xml | 17 ++-
.../camel/k/master/MasterContextCustomizer.java | 117 +++++++++++++++++++++
{camel-k-cron => camel-k-master}/pom.xml | 3 +-
.../runtime/pom.xml | 12 ++-
.../pom.xml | 23 +---
.../camel/k/quarkus/master/Application.java} | 16 +--
.../src/main/resources/application.properties | 7 +-
.../apache/camel/k/quarkus/master/MasterIT.java} | 4 +-
.../apache/camel/k/quarkus/master/MasterTest.java} | 32 +++---
itests/pom.xml | 1 +
pom.xml | 16 +++
.../it/generate-catalog-with-exclusions/pom.xml | 1 +
.../generate-catalog-with-exclusions/verify.groovy | 2 +
.../src/it/generate-catalog/verify.groovy | 5 +
.../camel/k/tooling/maven/GenerateCatalogMojo.java | 13 +++
support/camel-k-runtime-bom/pom.xml | 10 ++
18 files changed, 223 insertions(+), 74 deletions(-)
copy {camel-k-webhook => camel-k-master}/deployment/pom.xml (84%)
copy camel-k-runtime/deployment/src/main/java/org/apache/camel/k/quarkus/deployment/RuntimeFeature.java => camel-k-master/deployment/src/main/java/org/apache/camel/k/quarkus/master/deployment/MasterFeature.java (87%)
copy {camel-k-resume-kafka => camel-k-master}/impl/pom.xml (91%)
create mode 100644 camel-k-master/impl/src/main/java/org/apache/camel/k/master/MasterContextCustomizer.java
copy {camel-k-cron => camel-k-master}/pom.xml (96%)
copy {camel-k-webhook => camel-k-master}/runtime/pom.xml (89%)
copy itests/{camel-k-itests-cron => camel-k-itests-master}/pom.xml (89%)
copy itests/{camel-k-itests-knative/src/main/java/org/apache/camel/k/quarkus/it/KnativeApplication.java => camel-k-itests-master/src/main/java/org/apache/camel/k/quarkus/master/Application.java} (69%)
copy itests/{camel-k-itests-webhook => camel-k-itests-master}/src/main/resources/application.properties (90%)
copy itests/{camel-k-itests-runtime/src/test/java/org/apache/camel/k/quarkus/it/RuntimeIT.java => camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterIT.java} (90%)
copy itests/{camel-k-itests-core/src/test/java/org/apache/camel/k/core/quarkus/deployment/CoreTest.java => camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterTest.java} (58%)
[camel-k-runtime] 01/02: Revert "Remove camel-k-master, replacement is camel-quarkus-kubernetes"
Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
commit 3874f255190f1337ad36e99e7de593a05d241254
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Mar 22 12:46:31 2023 +0100
Revert "Remove camel-k-master, replacement is camel-quarkus-kubernetes"
This reverts commit 715e3ca08f494ad9fba310bf306d3c5c81c2edfb.
---
camel-k-master/deployment/pom.xml | 66 ++++++++++
.../k/quarkus/master/deployment/MasterFeature.java | 23 ++--
camel-k-master/impl/pom.xml | 79 ++++++++++++
.../camel/k/master/MasterContextCustomizer.java | 117 +++++++++++++++++
camel-k-master/pom.xml | 36 ++++++
camel-k-master/runtime/pom.xml | 93 ++++++++++++++
itests/camel-k-itests-master/pom.xml | 142 +++++++++++++++++++++
.../apache/camel/k/quarkus/master/Application.java | 50 ++++++++
.../src/main/resources/application.properties | 33 +++++
.../apache/camel/k/quarkus/master/MasterIT.java | 21 +--
.../apache/camel/k/quarkus/master/MasterTest.java | 32 +++--
itests/pom.xml | 1 +
pom.xml | 16 +++
.../it/generate-catalog-with-exclusions/pom.xml | 1 +
.../generate-catalog-with-exclusions/verify.groovy | 2 +
.../src/it/generate-catalog/verify.groovy | 5 +
.../camel/k/tooling/maven/GenerateCatalogMojo.java | 13 ++
support/camel-k-runtime-bom/pom.xml | 10 ++
18 files changed, 697 insertions(+), 43 deletions(-)
diff --git a/camel-k-master/deployment/pom.xml b/camel-k-master/deployment/pom.xml
new file mode 100644
index 00000000..3a32f275
--- /dev/null
+++ b/camel-k-master/deployment/pom.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-parent</artifactId>
+ <version>1.18.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-k-master-deployment</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-core-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-master-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-kubernetes-deployment</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${quarkus-version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy b/camel-k-master/deployment/src/main/java/org/apache/camel/k/quarkus/master/deployment/MasterFeature.java
similarity index 55%
copy from support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
copy to camel-k-master/deployment/src/main/java/org/apache/camel/k/quarkus/master/deployment/MasterFeature.java
index b35925c4..d6af5f17 100644
--- a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
+++ b/camel-k-master/deployment/src/main/java/org/apache/camel/k/quarkus/master/deployment/MasterFeature.java
@@ -14,21 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package org.apache.camel.k.quarkus.master.deployment;
-new File(basedir, "catalog.yaml").withReader {
- def catalog = new groovy.yaml.YamlSlurper().parse(it)
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
- assert catalog.spec.loaders['jsh'] == null
- assert catalog.spec.loaders['kts'] == null
- assert catalog.spec.loaders['js'] == null
- assert catalog.spec.loaders['groovy'] == null
-
- assert catalog.spec.loaders['java'] != null
- assert catalog.spec.loaders['xml'] != null
- assert catalog.spec.loaders['yaml'] != null
-
- assert catalog.spec.artifacts['camel-quarkus-jackson-avro'] != null
- assert catalog.spec.artifacts['camel-quarkus-csimple'] == null
- assert catalog.spec.artifacts['camel-quarkus-disruptor'] == null
+public class MasterFeature {
+ private static final String FEATURE = "camel-k-master";
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
}
diff --git a/camel-k-master/impl/pom.xml b/camel-k-master/impl/pom.xml
new file mode 100644
index 00000000..1edb47e8
--- /dev/null
+++ b/camel-k-master/impl/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-parent</artifactId>
+ <version>1.18.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-k-master-impl</artifactId>
+
+ <dependencies>
+
+ <!-- ****************************** -->
+ <!-- -->
+ <!-- RUNTIME -->
+ <!-- -->
+ <!-- ****************************** -->
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core-engine</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-kubernetes</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-core-support</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-apt</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.jandex</groupId>
+ <artifactId>jandex-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-index</id>
+ <goals>
+ <goal>jandex</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/camel-k-master/impl/src/main/java/org/apache/camel/k/master/MasterContextCustomizer.java b/camel-k-master/impl/src/main/java/org/apache/camel/k/master/MasterContextCustomizer.java
new file mode 100644
index 00000000..cc0a887a
--- /dev/null
+++ b/camel-k-master/impl/src/main/java/org/apache/camel/k/master/MasterContextCustomizer.java
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+package org.apache.camel.k.master;
+
+import java.util.Collections;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.kubernetes.cluster.KubernetesClusterService;
+import org.apache.camel.component.kubernetes.cluster.LeaseResourceType;
+import org.apache.camel.k.ContextCustomizer;
+import org.apache.camel.k.annotation.Customizer;
+import org.apache.camel.support.cluster.RebalancingCamelClusterService;
+import org.apache.camel.util.ObjectHelper;
+
+@Customizer("master")
+public class MasterContextCustomizer implements ContextCustomizer {
+ @Deprecated
+ private String configMapName;
+ private String kubernetesResourceName;
+ private LeaseResourceType leaseResourceType;
+ private Boolean rebalancing;
+ private String labelKey;
+ private String labelValue;
+
+ @Override
+ public void apply(CamelContext camelContext) {
+ try {
+ KubernetesClusterService clusterService = new KubernetesClusterService();
+ String resourceName = this.kubernetesResourceName;
+ if (ObjectHelper.isEmpty(resourceName)) {
+ resourceName = this.configMapName;
+ }
+ if (ObjectHelper.isNotEmpty(resourceName)) {
+ clusterService.setKubernetesResourceName(resourceName);
+ }
+ if (ObjectHelper.isNotEmpty(this.labelKey) && ObjectHelper.isNotEmpty(this.labelValue)) {
+ clusterService.setClusterLabels(Collections.singletonMap(this.labelKey, this.labelValue));
+ }
+ if (this.leaseResourceType != null) {
+ clusterService.setLeaseResourceType(this.leaseResourceType);
+ }
+
+ if (this.rebalancing == null || this.rebalancing) {
+ RebalancingCamelClusterService rebalancingService = new RebalancingCamelClusterService(clusterService, clusterService.getRenewDeadlineMillis());
+ camelContext.addService(rebalancingService);
+ } else {
+ camelContext.addService(clusterService);
+ }
+ } catch (Exception ex) {
+ throw new RuntimeCamelException(ex);
+ }
+ }
+
+ public String getKubernetesResourceName() {
+ return kubernetesResourceName;
+ }
+
+ public void setKubernetesResourceName(String kubernetesResourceName) {
+ this.kubernetesResourceName = kubernetesResourceName;
+ }
+
+ public LeaseResourceType getLeaseResourceType() {
+ return leaseResourceType;
+ }
+
+ public void setLeaseResourceType(LeaseResourceType leaseResourceType) {
+ this.leaseResourceType = leaseResourceType;
+ }
+
+ public Boolean getRebalancing() {
+ return rebalancing;
+ }
+
+ public void setRebalancing(Boolean rebalancing) {
+ this.rebalancing = rebalancing;
+ }
+
+ public String getConfigMapName() {
+ return configMapName;
+ }
+
+ public void setConfigMapName(String configMapName) {
+ this.configMapName = configMapName;
+ }
+
+ public String getLabelKey() {
+ return labelKey;
+ }
+
+ public void setLabelKey(String labelKey) {
+ this.labelKey = labelKey;
+ }
+
+ public String getLabelValue() {
+ return labelValue;
+ }
+
+ public void setLabelValue(String labelValue) {
+ this.labelValue = labelValue;
+ }
+
+}
diff --git a/camel-k-master/pom.xml b/camel-k-master/pom.xml
new file mode 100644
index 00000000..e7f839a5
--- /dev/null
+++ b/camel-k-master/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime-project</artifactId>
+ <version>1.18.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+
+ <artifactId>camel-k-master-parent</artifactId>
+
+ <modules>
+ <module>impl</module>
+ <module>runtime</module>
+ <module>deployment</module>
+ </modules>
+</project>
diff --git a/camel-k-master/runtime/pom.xml b/camel-k-master/runtime/pom.xml
new file mode 100644
index 00000000..16d8c4ba
--- /dev/null
+++ b/camel-k-master/runtime/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-parent</artifactId>
+ <version>1.18.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-k-master</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-master</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-kubernetes</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-maven-plugin</artifactId>
+ <version>${quarkus-version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>extension-descriptor</goal>
+ </goals>
+ <configuration>
+ <deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${quarkus-version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.jandex</groupId>
+ <artifactId>jandex-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-index</id>
+ <goals>
+ <goal>jandex</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/itests/camel-k-itests-master/pom.xml b/itests/camel-k-itests-master/pom.xml
new file mode 100644
index 00000000..b9fb248e
--- /dev/null
+++ b/itests/camel-k-itests-master/pom.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-itests</artifactId>
+ <version>1.18.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>camel-k-itests-master</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master</artifactId>
+ </dependency>
+
+ <!-- quarkus dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jsonb</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jsonb</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+
+ <!-- The following dependencies guarantee that this module is built after them. -->
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-runtime-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ <quarkus.native.additional-build-args>--language:js</quarkus.native.additional-build-args>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <systemProperties>
+ <quarkus.http.test-port>${test.http.port.native}</quarkus.http.test-port>
+ <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/itests/camel-k-itests-master/src/main/java/org/apache/camel/k/quarkus/master/Application.java b/itests/camel-k-itests-master/src/main/java/org/apache/camel/k/quarkus/master/Application.java
new file mode 100644
index 00000000..b90a67c3
--- /dev/null
+++ b/itests/camel-k-itests-master/src/main/java/org/apache/camel/k/quarkus/master/Application.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+package org.apache.camel.k.quarkus.master;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.json.Json;
+import javax.json.JsonObject;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.kubernetes.cluster.KubernetesClusterService;
+import org.apache.camel.support.cluster.RebalancingCamelClusterService;
+
+@Path("/test")
+@ApplicationScoped
+public class Application {
+ @Inject
+ CamelContext context;
+
+ @GET
+ @Path("/inspect")
+ @Produces(MediaType.APPLICATION_JSON)
+ public JsonObject inspect() {
+ var rebalancingService = context.hasService(RebalancingCamelClusterService.class);
+ var service = (KubernetesClusterService) rebalancingService.getDelegate();
+
+ return Json.createObjectBuilder()
+ .add("cluster-service", service != null ? rebalancingService.getClass().getName() : "")
+ .add("cluster-service-res", service != null ? service.getKubernetesResourceName() : "")
+ .build();
+ }
+}
diff --git a/itests/camel-k-itests-master/src/main/resources/application.properties b/itests/camel-k-itests-master/src/main/resources/application.properties
new file mode 100644
index 00000000..c1a9aba2
--- /dev/null
+++ b/itests/camel-k-itests-master/src/main/resources/application.properties
@@ -0,0 +1,33 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#
+# Quarkus
+#
+quarkus.log.console.enable = false
+quarkus.banner.enabled = false
+
+#
+# Quarkus :: Camel
+#
+quarkus.camel.routes-discovery.enabled = false
+
+#
+# Camel K
+#
+camel.k.customizer.master.enabled = true
+camel.k.customizer.master.kubernetes-resource-name = camel-k-res
diff --git a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy b/itests/camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterIT.java
similarity index 55%
copy from support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
copy to itests/camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterIT.java
index b35925c4..97a79250 100644
--- a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
+++ b/itests/camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterIT.java
@@ -14,21 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package org.apache.camel.k.quarkus.master;
-new File(basedir, "catalog.yaml").withReader {
- def catalog = new groovy.yaml.YamlSlurper().parse(it)
+import io.quarkus.test.junit.NativeImageTest;
- assert catalog.spec.loaders['jsh'] == null
- assert catalog.spec.loaders['kts'] == null
- assert catalog.spec.loaders['js'] == null
- assert catalog.spec.loaders['groovy'] == null
-
- assert catalog.spec.loaders['java'] != null
- assert catalog.spec.loaders['xml'] != null
- assert catalog.spec.loaders['yaml'] != null
-
- assert catalog.spec.artifacts['camel-quarkus-jackson-avro'] != null
- assert catalog.spec.artifacts['camel-quarkus-csimple'] == null
- assert catalog.spec.artifacts['camel-quarkus-disruptor'] == null
-
-}
+@NativeImageTest
+public class MasterIT extends MasterTest {
+}
\ No newline at end of file
diff --git a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy b/itests/camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterTest.java
similarity index 51%
copy from support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
copy to itests/camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterTest.java
index b35925c4..fe5a5c66 100644
--- a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
+++ b/itests/camel-k-itests-master/src/test/java/org/apache/camel/k/quarkus/master/MasterTest.java
@@ -14,21 +14,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package org.apache.camel.k.quarkus.master;
-new File(basedir, "catalog.yaml").withReader {
- def catalog = new groovy.yaml.YamlSlurper().parse(it)
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.path.json.JsonPath;
+import org.apache.camel.support.cluster.RebalancingCamelClusterService;
+import org.junit.jupiter.api.Test;
- assert catalog.spec.loaders['jsh'] == null
- assert catalog.spec.loaders['kts'] == null
- assert catalog.spec.loaders['js'] == null
- assert catalog.spec.loaders['groovy'] == null
+import static io.restassured.RestAssured.when;
+import static org.assertj.core.api.Assertions.assertThat;
- assert catalog.spec.loaders['java'] != null
- assert catalog.spec.loaders['xml'] != null
- assert catalog.spec.loaders['yaml'] != null
-
- assert catalog.spec.artifacts['camel-quarkus-jackson-avro'] != null
- assert catalog.spec.artifacts['camel-quarkus-csimple'] == null
- assert catalog.spec.artifacts['camel-quarkus-disruptor'] == null
+@QuarkusTest
+public class MasterTest {
+ @Test
+ public void hasClusterService() {
+ JsonPath path = when()
+ .get("/test/inspect")
+ .then()
+ .statusCode(200)
+ .extract().jsonPath();
+ assertThat(path.getString("cluster-service")).isEqualTo(RebalancingCamelClusterService.class.getName());
+ assertThat(path.getString("cluster-service-res")).isEqualTo("camel-k-res");
+ }
}
diff --git a/itests/pom.xml b/itests/pom.xml
index c6bde020..270d1502 100644
--- a/itests/pom.xml
+++ b/itests/pom.xml
@@ -45,6 +45,7 @@
<module>camel-k-itests-runtime-yaml</module>
<module>camel-k-itests-cron</module>
+ <module>camel-k-itests-master</module>
<module>camel-k-itests-knative</module>
<module>camel-k-itests-knative-env-from-registry</module>
<module>camel-k-itests-knative-env-from-properties</module>
diff --git a/pom.xml b/pom.xml
index bc6a51f2..7090d530 100644
--- a/pom.xml
+++ b/pom.xml
@@ -381,6 +381,7 @@
<module>camel-k-cron</module>
<module>camel-k-cloudevents</module>
<module>camel-k-knative</module>
+ <module>camel-k-master</module>
<module>camel-k-webhook</module>
<module>camel-k-runtime</module>
<module>camel-k-resume-kafka</module>
@@ -453,6 +454,21 @@
<artifactId>camel-k-cloudevents-deployment</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-deployment</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
diff --git a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/pom.xml b/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/pom.xml
index 48341dd9..b0cfd144 100644
--- a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/pom.xml
+++ b/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/pom.xml
@@ -37,6 +37,7 @@
<dataformats.exclusion.list>avro-jackson</dataformats.exclusion.list>
<languages.exclusion.list>csimple</languages.exclusion.list>
<components.exclusion.list>disruptor,disruptor-vm</components.exclusion.list>
+ <capabilities.exclusion.list>master</capabilities.exclusion.list>
</properties>
<build>
diff --git a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy b/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
index b35925c4..9cc16de6 100644
--- a/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
+++ b/support/camel-k-maven-plugin/src/it/generate-catalog-with-exclusions/verify.groovy
@@ -31,4 +31,6 @@ new File(basedir, "catalog.yaml").withReader {
assert catalog.spec.artifacts['camel-quarkus-csimple'] == null
assert catalog.spec.artifacts['camel-quarkus-disruptor'] == null
+ assert catalog.spec.runtime.capabilities['master'] == null
+ assert catalog.spec.artifacts['camel-k-master'] == null
}
diff --git a/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy b/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy
index 9204353b..6e3ae149 100644
--- a/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy
+++ b/support/camel-k-maven-plugin/src/it/generate-catalog/verify.groovy
@@ -44,6 +44,8 @@ new File(basedir, "catalog.yaml").withReader {
assert catalog.spec.runtime.capabilities['tracing'].dependencies[0].artifactId == 'camel-quarkus-opentracing'
assert catalog.spec.runtime.capabilities['telemetry'].dependencies[0].groupId == 'org.apache.camel.quarkus'
assert catalog.spec.runtime.capabilities['telemetry'].dependencies[0].artifactId == 'camel-quarkus-opentelemetry'
+ assert catalog.spec.runtime.capabilities['master'].dependencies[0].groupId == 'org.apache.camel.k'
+ assert catalog.spec.runtime.capabilities['master'].dependencies[0].artifactId == 'camel-k-master'
assert catalog.spec.loaders['groovy'].groupId == 'org.apache.camel.quarkus'
assert catalog.spec.loaders['groovy'].artifactId == 'camel-quarkus-groovy-dsl'
@@ -83,6 +85,9 @@ new File(basedir, "catalog.yaml").withReader {
assert catalog.metadata.labels['camel.apache.org/runtime.version'] == runtimeVersion
+ catalog.spec.artifacts['camel-k-master'].with {
+ schemes == null
+ }
catalog.spec.artifacts['camel-k-cron'].with {
schemes == null
}
diff --git a/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java b/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java
index e2a02168..498bca32 100644
--- a/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java
+++ b/support/camel-k-maven-plugin/src/main/java/org/apache/camel/k/tooling/maven/GenerateCatalogMojo.java
@@ -234,6 +234,19 @@ public class GenerateCatalogMojo extends AbstractMojo {
CamelCapability.forArtifact(
"org.apache.camel.quarkus", "camel-quarkus-opentelemetry"));
}
+ if (capabilitiesExclusionList != null && !capabilitiesExclusionList.contains("master")) {
+ runtimeSpec.putCapability(
+ "master",
+ CamelCapability.forArtifact(
+ "org.apache.camel.k", "camel-k-master"));
+
+ catalogSpec.putArtifact(
+ new CamelArtifact.Builder()
+ .groupId("org.apache.camel.k")
+ .artifactId("camel-k-master")
+ .build()
+ );
+ }
if (capabilitiesExclusionList != null && !capabilitiesExclusionList.contains("resume-kafka")) {
runtimeSpec.putCapability(
"resume-kafka",
diff --git a/support/camel-k-runtime-bom/pom.xml b/support/camel-k-runtime-bom/pom.xml
index 2f9bda4b..31ddf979 100644
--- a/support/camel-k-runtime-bom/pom.xml
+++ b/support/camel-k-runtime-bom/pom.xml
@@ -160,6 +160,16 @@
<artifactId>camel-k-cron</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-master</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-knative-impl</artifactId>
[camel-k-runtime] 02/02: chore: align version
Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
commit 221253bf7464ba0141d3d28859248e9613370016
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Mar 22 12:52:53 2023 +0100
chore: align version
---
camel-k-master/deployment/pom.xml | 2 +-
camel-k-master/impl/pom.xml | 2 +-
camel-k-master/pom.xml | 2 +-
camel-k-master/runtime/pom.xml | 2 +-
itests/camel-k-itests-master/pom.xml | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/camel-k-master/deployment/pom.xml b/camel-k-master/deployment/pom.xml
index 3a32f275..3e259ac1 100644
--- a/camel-k-master/deployment/pom.xml
+++ b/camel-k-master/deployment/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-master-parent</artifactId>
- <version>1.18.0-SNAPSHOT</version>
+ <version>3.20.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/camel-k-master/impl/pom.xml b/camel-k-master/impl/pom.xml
index 1edb47e8..6c14b8e8 100644
--- a/camel-k-master/impl/pom.xml
+++ b/camel-k-master/impl/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-master-parent</artifactId>
- <version>1.18.0-SNAPSHOT</version>
+ <version>3.20.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/camel-k-master/pom.xml b/camel-k-master/pom.xml
index e7f839a5..c5304999 100644
--- a/camel-k-master/pom.xml
+++ b/camel-k-master/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-runtime-project</artifactId>
- <version>1.18.0-SNAPSHOT</version>
+ <version>3.20.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
diff --git a/camel-k-master/runtime/pom.xml b/camel-k-master/runtime/pom.xml
index 16d8c4ba..94d98770 100644
--- a/camel-k-master/runtime/pom.xml
+++ b/camel-k-master/runtime/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-master-parent</artifactId>
- <version>1.18.0-SNAPSHOT</version>
+ <version>3.20.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/itests/camel-k-itests-master/pom.xml b/itests/camel-k-itests-master/pom.xml
index b9fb248e..54c306b7 100644
--- a/itests/camel-k-itests-master/pom.xml
+++ b/itests/camel-k-itests-master/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-itests</artifactId>
- <version>1.18.0-SNAPSHOT</version>
+ <version>3.20.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>