You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/01/23 06:29:18 UTC
(camel) branch main updated: CAMEL-21613: camel-jbang - Allow to choose (multiple) image platform options (#16887)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 6e57b504edb CAMEL-21613: camel-jbang - Allow to choose (multiple) image platform options (#16887)
6e57b504edb is described below
commit 6e57b504edbb46da7201e16c40d0914bc1ed973d
Author: Thomas Diesler <td...@redhat.com>
AuthorDate: Thu Jan 23 07:29:12 2025 +0100
CAMEL-21613: camel-jbang - Allow to choose (multiple) image platform options (#16887)
---
.../src/main/resources/templates/main-kubernetes-pom.tmpl | 5 -----
.../src/main/resources/templates/quarkus-kubernetes-pom.tmpl | 5 -----
.../main/resources/templates/spring-boot-kubernetes-pom.tmpl | 5 -----
.../dsl/jbang/core/commands/kubernetes/KubernetesExport.java | 12 +-----------
4 files changed, 1 insertion(+), 26 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/main-kubernetes-pom.tmpl b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/main-kubernetes-pom.tmpl
index 9cff5a43b69..09c96929a06 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/main-kubernetes-pom.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/main-kubernetes-pom.tmpl
@@ -133,11 +133,6 @@
<image>
<build>
<from>eclipse-temurin:{{ .JavaVersion }}</from>
- <!-- Supported only when using the jib build strategy -->
- <createImageOptions>
- <platform>linux/amd64</platform>
- <platform>linux/arm64</platform>
- </createImageOptions>
<entryPoint>
<exec>
<arg>java</arg>
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-kubernetes-pom.tmpl b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-kubernetes-pom.tmpl
index 31fffd46ec0..fc2057b2089 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-kubernetes-pom.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-kubernetes-pom.tmpl
@@ -98,11 +98,6 @@
<image>
<build>
<from>eclipse-temurin:{{ .JavaVersion }}</from>
- <!-- Supported only when using the jib build strategy -->
- <createImageOptions>
- <platform>linux/amd64</platform>
- <platform>linux/arm64</platform>
- </createImageOptions>
<assembly>
<layers>
<layer>
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl
index 422e52b50a2..576068d33f5 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/spring-boot-kubernetes-pom.tmpl
@@ -84,11 +84,6 @@
<image>
<build>
<from>eclipse-temurin:{{ .JavaVersion }}</from>
- <!-- Supported only when using the jib build strategy -->
- <createImageOptions>
- <platform>linux/amd64</platform>
- <platform>linux/arm64</platform>
- </createImageOptions>
<entryPoint>
<exec>
<arg>java</arg>
diff --git a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java
index cf28668bb55..d187e0c181e 100644
--- a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java
+++ b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java
@@ -178,15 +178,6 @@ public class KubernetesExport extends Export {
printer().printf("--build-tool=%s is not yet supported%n", buildTool);
}
- String propPrefix;
- if (runtime == RuntimeType.springBoot) {
- propPrefix = "camel.springboot";
- } else if (runtime == RuntimeType.main) {
- propPrefix = "camel.main";
- } else {
- propPrefix = runtime.runtime();
- }
-
// Resolve image group and registry
String resolvedImageGroup = resolveImageGroup();
String resolvedImageRegistry = resolveImageRegistry();
@@ -270,9 +261,8 @@ public class KubernetesExport extends Export {
buildProperties.add("jkube.container-image.name=%s".formatted(container.getImage()));
- // Need to set quarkus.container properties, otherwise these settings get overwritten by Quarkus
if (container.getName() != null && !container.getName().equals(projectName)) {
- buildProperties.add("%s.kubernetes.container-name=%s".formatted(propPrefix, container.getName()));
+ printer().printf("Custom container name '%s' not supported%n".formatted(container.getName()));
}
if (container.getImagePullPolicy() != null) {