camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] 01/07: CAMEL-12328 - Headers getting lost after calling kubernetes-services API
Date Wed, 07 Mar 2018 12:51:22 GMT
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 692ea5ad156a47dec696dbfc63958bb7f3ad47b6
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Wed Mar 7 13:35:27 2018 +0100

    CAMEL-12328 - Headers getting lost after calling kubernetes-services API
---
 .../component/kubernetes/services/KubernetesServicesProducer.java   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/services/KubernetesServicesProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/services/KubernetesServicesProducer.java
index 19e65b4..75ea760 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/services/KubernetesServicesProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/services/KubernetesServicesProducer.java
@@ -35,6 +35,7 @@ import org.apache.camel.component.kubernetes.AbstractKubernetesEndpoint;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesOperations;
 import org.apache.camel.impl.DefaultProducer;
+import org.apache.camel.util.MessageHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -105,6 +106,7 @@ public class KubernetesServicesProducer extends DefaultProducer {
             servicesList = getEndpoint().getKubernetesClient().services().inAnyNamespace()
                     .list();
         }
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(servicesList.getItems());
     }
 
@@ -131,6 +133,7 @@ public class KubernetesServicesProducer extends DefaultProducer {
             }
             servicesList = services.list();
         }
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(servicesList.getItems());
     }
 
@@ -153,6 +156,7 @@ public class KubernetesServicesProducer extends DefaultProducer {
         }
         service = getEndpoint().getKubernetesClient().services()
                 .inNamespace(namespaceName).withName(serviceName).get();
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(service);
     }
 
@@ -187,6 +191,7 @@ public class KubernetesServicesProducer extends DefaultProducer {
                 .endMetadata().withSpec(serviceSpec).build();
         service = getEndpoint().getKubernetesClient().services()
                 .inNamespace(namespaceName).create(serviceCreating);
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(service);
     }
 
@@ -208,6 +213,7 @@ public class KubernetesServicesProducer extends DefaultProducer {
         }
         boolean serviceDeleted = getEndpoint().getKubernetesClient().services()
                 .inNamespace(namespaceName).withName(serviceName).delete();
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(serviceDeleted);
     }
 }

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.

Mime
View raw message