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 df2218d035e CAMEL-18171: camel-kubernetes - Allow to configure k8s 
client from application.properties.
df2218d035e is described below

commit df2218d035e63f90214c1edada3b8881001d56f1
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jun 24 21:00:16 2022 +0200

    CAMEL-18171: camel-kubernetes - Allow to configure k8s client from 
application.properties.
---
 .../camel/component/kubernetes/properties/BasePropertiesFunction.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java
 
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java
index 196c4ceecc5..ab8255f9de3 100644
--- 
a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java
+++ 
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/properties/BasePropertiesFunction.java
@@ -82,7 +82,8 @@ abstract class BasePropertiesFunction extends ServiceSupport 
implements Properti
             // try to auto-configure via properties
             PropertiesComponent pc = camelContext.getPropertiesComponent();
             OrderedLocationProperties properties = (OrderedLocationProperties) 
pc
-                    .loadProperties(k -> 
k.startsWith("camel.kubernetes-client.") || 
k.startsWith("camel.kubernetesClient."));
+                    .loadProperties(k -> 
k.startsWith("camel.kubernetes-client.") || 
k.startsWith("camel.kubernetesClient."),
+                            k -> k.replace("camel.kubernetes-client.", 
"").replace("camel.kubernetesClient.", ""));
             if (!properties.isEmpty()) {
                 ConfigBuilder config = new ConfigBuilder();
                 PropertyBindingSupport.build()

Reply via email to