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 ae5866eaee3 CAMEL-22144: camel-jbang: Kubernetes plugin management
port for liveness/readiness
ae5866eaee3 is described below
commit ae5866eaee3e9278dbf747b0ade56b05a95fc2e5
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jul 23 16:27:27 2025 +0200
CAMEL-22144: camel-jbang: Kubernetes plugin management port for
liveness/readiness
---
.../jbang/core/commands/kubernetes/KubernetesExport.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
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 749b5ff7c2f..0585c6a6711 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
@@ -493,17 +493,20 @@ public class KubernetesExport extends Export {
if (RuntimeType.quarkus == runtime) {
// jkube reads quarkus properties to set the container health
probes path
buildProperties.add("quarkus.smallrye-health.root-path=/observe/health");
- if (buildProperties.stream().noneMatch(l ->
l.startsWith("quarkus.management.port"))) {
- buildProperties.add("quarkus.management.port=" + (port > 0 ?
"" + port : "9876"));
+ List<String> newProps = new ArrayList<>();
+ newProps.add("quarkus.management.port=" + (port > 0 ? "" + port :
"9876"));
+ if (applicationProperties == null) {
+ applicationProperties = newProps.toArray(new
String[newProps.size()]);
+ } else {
+ newProps.addAll(Arrays.asList(applicationProperties));
+ applicationProperties = newProps.toArray(new
String[newProps.size()]);
}
} else if (RuntimeType.springBoot == runtime) {
List<String> newProps = new ArrayList<>();
// 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
newProps.add("management.endpoints.web.base-path=/observe");
- if (newProps.stream().noneMatch(l ->
l.startsWith("management.server.port"))) {
- newProps.add("management.server.port=" + (port > 0 ? "" + port
: "9876"));
- }
+ newProps.add("management.server.port=" + (port > 0 ? "" + port :
"9876"));
// 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
newProps.add("management.health.probes.enabled=true");