davsclaus commented on code in PR #30559:
URL: https://github.com/apache/camel/pull/30559#discussion_r4655027524


##########
dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java:
##########
@@ -336,9 +336,23 @@ public Integer export() throws Exception {
             
buildProperties.add("jkube.maven.plugin=%s".formatted("kubernetes-maven-plugin"));
         }
 
+        if (runtime == RuntimeType.tomcat && !"docker".equals(imageBuilder) && 
!"jib".equals(imageBuilder)) {
+            printer().printErr(
+                    "The Tomcat Kubernetes target supports the docker and jib 
image builders. "
+                               + "Use --image-builder=docker or 
--image-builder=jib.");
+            return 1;
+        }
+
         if (baseImage == null) {
-            // use default base image with java version
-            baseImage = 
"mirror.gcr.io/library/eclipse-temurin:%s".formatted(javaVersion);
+            if (runtime == RuntimeType.tomcat) {
+                // Boot 4 uses Tomcat 11; Boot 3 uses Tomcat 10.1.
+                String tomcatVersion = springBootVersion != null && 
springBootVersion.startsWith("3.")
+                        ? "10.1" : "11.0";
+                baseImage = "tomcat:%s-jdk%s-temurin".formatted(tomcatVersion, 
javaVersion);

Review Comment:
   `tomcat:...` is pulled from Docker Hub, which has pull rate limits. The 
other runtimes default to `mirror.gcr.io/library/eclipse-temurin:%s` (a few 
lines below), and the project prefers `mirror.gcr.io` over Docker Hub for 
images. Could this be the mirror too?
   
   ```java
   baseImage = 
"mirror.gcr.io/library/tomcat:%s-jdk%s-temurin".formatted(tomcatVersion, 
javaVersion);
   ```
   
   Both `11.0-jdk21-temurin` and `10.1-jdk21-temurin` exist on 
`mirror.gcr.io/library/tomcat`, for amd64, arm64, ppc64le and s390x.
   
   The same applies to:
   - the default `tomcat.test.image` in `TomcatExportITCase` (line 111) and 
`Tomcat10ExportITCase` (line 111)
   - the expected images in `KubernetesExportTest` (lines 1055 and 1061)
   - the `tomcat:...` image names in the docs, if any
   
   _Claude Code on behalf of davsclaus_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to