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 cd3cadb4fa86 Fix camel-jbang-kubernetes spring-boot property for 
probes (#21436)
cd3cadb4fa86 is described below

commit cd3cadb4fa86b6e1cc8fa9c468544ee619500d5c
Author: Claudio Miranda <[email protected]>
AuthorDate: Thu Feb 12 18:23:31 2026 -0300

    Fix camel-jbang-kubernetes spring-boot property for probes (#21436)
    
    As https://github.com/eclipse-jkube/jkube/issues/3690 was fixed
    use the property management.endpoint.health.probes.enabled=true
    so jkube can correctly generate the container probes paths
---
 .../modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc            | 7 -------
 .../camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java | 6 ++----
 .../dsl/jbang/core/commands/kubernetes/KubernetesExportTest.java   | 6 +++---
 .../dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java      | 4 ++--
 4 files changed, 7 insertions(+), 16 deletions(-)

diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
index 9cb83ffa87f6..0e791b5b5122 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc
@@ -23,13 +23,6 @@ The *simple* language has deprecated binary operators that 
uses space in the nam
 - `starts with` use `startsWith` instead
 - `ends with` use `endsWith` instead
 
-=== camel-jbang
-
-JKube has been upgraded from 1.8.1 to 1.9.0 which has changed the default path 
for
-Spring Boot health checks from `/observe/health/liveness` & 
`/observe/health/readiness` to a combined path `/observe/health`.
-
-This can affect users that are using `camel kubernetes export` to export to 
Spring Boot applications.
-
 === camel-file
 
 The `org.apache.camel.component.file.GenericFileOperations` has added method 
`storeFileDirectly`.
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 037f919e6795..20aa42601d9d 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
@@ -533,14 +533,12 @@ public class KubernetesExport extends Export {
             
buildProperties.add("quarkus.smallrye-health.root-path=/observe/health");
             addToApplicationProperties("quarkus.management.port=" + probePort);
         } else if (RuntimeType.springBoot == runtime) {
-            // 
addDependencies("org.springframework.boot:spring-boot-starter-actuator");
             // jkube reads spring-boot properties to set the kubernetes 
container health probes path
             // in this case, jkube reads from the application.properties and 
not from the build properties in pom.xml
             
addToApplicationProperties("management.endpoints.web.base-path=/observe",
                     "management.server.port=" + probePort,
-                    // jkube uses the old property to enable the 
readiness/liveness probes
-                    // TODO: rename this property once 
https://github.com/eclipse-jkube/jkube/issues/3690 is fixed
-                    "management.health.probes.enabled=true");
+                    // jkube inspects this property to enable the 
readiness/liveness probes
+                    "management.endpoint.health.probes.enabled=true");
         } else if (RuntimeType.main == runtime) {
             addToApplicationProperties("camel.management.port=" + probePort);
         }
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExportTest.java
 
b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExportTest.java
index 5895247c8b85..e2e182c91912 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExportTest.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExportTest.java
@@ -90,7 +90,7 @@ class KubernetesExportTest extends 
KubernetesExportBaseTestSupport {
         } else if (RuntimeType.springBoot == 
RuntimeType.fromValue(rt.runtime())) {
             Assertions.assertEquals("9876", 
applicationProperties.get("management.server.port"));
             Assertions.assertEquals("/observe", 
applicationProperties.get("management.endpoints.web.base-path"));
-            Assertions.assertEquals("true", 
applicationProperties.get("management.health.probes.enabled"));
+            Assertions.assertEquals("true", 
applicationProperties.get("management.endpoint.health.probes.enabled"));
         } else if (RuntimeType.main == RuntimeType.fromValue(rt.runtime())) {
             Assertions.assertEquals("9876", 
applicationProperties.get("camel.management.port"));
         }
@@ -274,7 +274,7 @@ class KubernetesExportTest extends 
KubernetesExportBaseTestSupport {
         } else if (RuntimeType.springBoot == 
RuntimeType.fromValue(rt.runtime())) {
             
Assertions.assertNull(applicationProperties.get("management.server.port"));
             
Assertions.assertNull(applicationProperties.get("management.endpoints.web.base-path"));
-            
Assertions.assertNull(applicationProperties.get("management.health.probes.enabled"));
+            
Assertions.assertNull(applicationProperties.get("management.endpoint.health.probes.enabled"));
         } else if (RuntimeType.main == RuntimeType.fromValue(rt.runtime())) {
             
Assertions.assertNull(applicationProperties.get("camel.management.port"));
         }
@@ -320,7 +320,7 @@ class KubernetesExportTest extends 
KubernetesExportBaseTestSupport {
 
         if (RuntimeType.springBoot == RuntimeType.fromValue(rt.runtime())) {
             Assertions.assertEquals("/observe", 
applicationProperties.get("management.endpoints.web.base-path"));
-            Assertions.assertEquals("true", 
applicationProperties.get("management.health.probes.enabled"));
+            Assertions.assertEquals("true", 
applicationProperties.get("management.endpoint.health.probes.enabled"));
         }
     }
 
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java
 
b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java
index b61ec98ca3fe..96dcd56ff601 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java
@@ -145,8 +145,8 @@ class KubernetesRunTest extends KubernetesBaseTestSupport {
             Assertions.assertEquals(9876, 
containers.get(0).getStartupProbe().getHttpGet().getPort().getIntVal());
         } else if (RuntimeType.springBoot == 
RuntimeType.fromValue(rt.runtime())) {
             // spring-boot doesn't set the startup probe
-            Assertions.assertEquals("/observe/health", 
containers.get(0).getLivenessProbe().getHttpGet().getPath());
-            Assertions.assertEquals("/observe/health", 
containers.get(0).getReadinessProbe().getHttpGet().getPath());
+            Assertions.assertEquals("/observe/health/liveness", 
containers.get(0).getLivenessProbe().getHttpGet().getPath());
+            Assertions.assertEquals("/observe/health/readiness", 
containers.get(0).getReadinessProbe().getHttpGet().getPath());
             Assertions.assertEquals(9876, 
containers.get(0).getReadinessProbe().getHttpGet().getPort().getIntVal());
             Assertions.assertEquals(9876, 
containers.get(0).getLivenessProbe().getHttpGet().getPort().getIntVal());
         }

Reply via email to