camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: CAMEL-10514: Camel-Kubernetes: Copy headers from in to out in producer operations
Date Wed, 23 Nov 2016 08:33:42 GMT
Repository: camel
Updated Branches:
  refs/heads/master afced0dea -> a52ab3cdc


CAMEL-10514: Camel-Kubernetes: Copy headers from in to out in producer operations


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a52ab3cd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a52ab3cd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a52ab3cd

Branch: refs/heads/master
Commit: a52ab3cdcd05c53818fe8c5ba0c71212dd7c5a3b
Parents: afced0d
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Wed Nov 23 09:26:22 2016 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Wed Nov 23 09:26:22 2016 +0100

----------------------------------------------------------------------
 .../producer/KubernetesBuildConfigsProducer.java        |  4 ++++
 .../kubernetes/producer/KubernetesBuildsProducer.java   |  5 ++++-
 .../producer/KubernetesConfigMapsProducer.java          |  8 ++++++++
 .../producer/KubernetesNamespacesProducer.java          |  9 +++++++++
 .../kubernetes/producer/KubernetesNodesProducer.java    |  6 ++++++
 .../KubernetesPersistentVolumesClaimsProducer.java      |  9 +++++++++
 .../producer/KubernetesPersistentVolumesProducer.java   |  7 +++++++
 .../kubernetes/producer/KubernetesPodsProducer.java     | 11 +++++++++++
 .../KubernetesReplicationControllersProducer.java       | 12 ++++++++++++
 .../producer/KubernetesResourcesQuotaProducer.java      |  9 +++++++++
 .../kubernetes/producer/KubernetesSecretsProducer.java  |  9 +++++++++
 .../producer/KubernetesServiceAccountsProducer.java     |  9 +++++++++
 12 files changed, 97 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildConfigsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildConfigsProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildConfigsProducer.java
index 39b5e5f..0033f99 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildConfigsProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildConfigsProducer.java
@@ -31,6 +31,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -106,6 +107,7 @@ public class KubernetesBuildConfigsProducer extends DefaultProducer {
             }
             buildConfigsList = buildConfigs.list();
         }
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(buildConfigsList.getItems());
     }
 
@@ -124,6 +126,8 @@ public class KubernetesBuildConfigsProducer extends DefaultProducer {
         }
         buildConfig = getEndpoint().getKubernetesClient().adapt(OpenShiftClient.class).buildConfigs()
                 .inNamespace(namespaceName).withName(buildConfigName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(buildConfig);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildsProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildsProducer.java
index f9c5a10..7083e0b 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildsProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesBuildsProducer.java
@@ -20,7 +20,6 @@ import java.util.Map;
 
 import io.fabric8.kubernetes.client.dsl.ClientMixedOperation;
 import io.fabric8.kubernetes.client.dsl.ClientNonNamespaceOperation;
-import io.fabric8.kubernetes.client.dsl.ClientResource;
 import io.fabric8.kubernetes.client.dsl.LogWatch;
 import io.fabric8.openshift.api.model.Build;
 import io.fabric8.openshift.api.model.BuildList;
@@ -32,6 +31,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -104,6 +104,7 @@ public class KubernetesBuildsProducer extends DefaultProducer {
             }
             buildList = builds.list();
         }
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(buildList.getItems());
     }
 
@@ -121,6 +122,8 @@ public class KubernetesBuildsProducer extends DefaultProducer {
         }
         build = getEndpoint().getKubernetesClient().adapt(OpenShiftClient.class).builds().inNamespace(namespaceName)
                 .withName(buildName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(build);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesConfigMapsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesConfigMapsProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesConfigMapsProducer.java
index 2909912..54e78a5 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesConfigMapsProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesConfigMapsProducer.java
@@ -30,6 +30,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -97,6 +98,8 @@ public class KubernetesConfigMapsProducer extends DefaultProducer {
             configMaps.withLabel(entry.getKey(), entry.getValue());
         }
         configMapsList = configMaps.list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(configMapsList.getItems());
     }
 
@@ -109,6 +112,7 @@ public class KubernetesConfigMapsProducer extends DefaultProducer {
         }
         configMap = getEndpoint().getKubernetesClient().configMaps().withName(cfMapName).get();
 
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(configMap);
     }
     
@@ -141,6 +145,8 @@ public class KubernetesConfigMapsProducer extends DefaultProducer {
                 .withLabels(labels).endMetadata().withData(configMapData).build();
         configMap = getEndpoint().getKubernetesClient().configMaps()
                 .inNamespace(namespaceName).create(cfMapCreating);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(configMap);
     }
     
@@ -161,6 +167,8 @@ public class KubernetesConfigMapsProducer extends DefaultProducer {
         }
         boolean cfMapDeleted = getEndpoint().getKubernetesClient().configMaps()
                 .inNamespace(namespaceName).withName(configMapName).delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(cfMapDeleted);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNamespacesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNamespacesProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNamespacesProducer.java
index 0be2584..b065cfb 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNamespacesProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNamespacesProducer.java
@@ -29,6 +29,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -107,6 +108,8 @@ public class KubernetesNamespacesProducer extends DefaultProducer {
             namespaces.withLabel(entry.getKey(), entry.getValue());
         }
         NamespaceList namespace = namespaces.list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(namespace.getItems());
     }
 
@@ -120,6 +123,8 @@ public class KubernetesNamespacesProducer extends DefaultProducer {
         }
         Namespace namespace = getEndpoint().getKubernetesClient().namespaces()
                 .withName(namespaceName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(namespace);
     }
 
@@ -138,6 +143,8 @@ public class KubernetesNamespacesProducer extends DefaultProducer {
                 .build();
         Namespace namespace = getEndpoint().getKubernetesClient().namespaces()
                 .create(ns);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(namespace);
     }
 
@@ -151,6 +158,8 @@ public class KubernetesNamespacesProducer extends DefaultProducer {
         }
         Boolean namespace = getEndpoint().getKubernetesClient().namespaces()
                 .withName(namespaceName).delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(namespace);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNodesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNodesProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNodesProducer.java
index 3bfeb87..e7fa563 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNodesProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesNodesProducer.java
@@ -28,6 +28,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -76,6 +77,8 @@ public class KubernetesNodesProducer extends DefaultProducer {
 
     protected void doList(Exchange exchange, String operation) throws Exception {
         NodeList nodeList = getEndpoint().getKubernetesClient().nodes().list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(nodeList.getItems());
     }
 
@@ -87,6 +90,8 @@ public class KubernetesNodesProducer extends DefaultProducer {
             nodes.withLabel(entry.getKey(), entry.getValue());
         }
         nodeList = nodes.list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(nodeList.getItems());
     }
 
@@ -99,6 +104,7 @@ public class KubernetesNodesProducer extends DefaultProducer {
         }
         node = getEndpoint().getKubernetesClient().nodes().withName(pvName).get();
 
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(node);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesClaimsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesClaimsProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesClaimsProducer.java
index c05a02d..2b574a4 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesClaimsProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesClaimsProducer.java
@@ -31,6 +31,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -122,6 +123,8 @@ public class KubernetesPersistentVolumesClaimsProducer extends DefaultProducer
{
             }
             pvcList = pvcs.list();
         }
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pvcList.getItems());
     }
 
@@ -145,6 +148,8 @@ public class KubernetesPersistentVolumesClaimsProducer extends DefaultProducer
{
         }
         pvc = getEndpoint().getKubernetesClient().persistentVolumeClaims()
                 .inNamespace(namespaceName).withName(pvcName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pvc);
     }
 
@@ -184,6 +189,8 @@ public class KubernetesPersistentVolumesClaimsProducer extends DefaultProducer
{
                 .endMetadata().withSpec(pvcSpec).build();
         pvc = getEndpoint().getKubernetesClient().persistentVolumeClaims()
                 .inNamespace(namespaceName).create(pvcCreating);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pvc);
     }
 
@@ -207,6 +214,8 @@ public class KubernetesPersistentVolumesClaimsProducer extends DefaultProducer
{
         boolean pvcDeleted = getEndpoint().getKubernetesClient()
                 .persistentVolumeClaims().inNamespace(namespaceName)
                 .withName(pvcName).delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pvcDeleted);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesProducer.java
index 6037206..325701b 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPersistentVolumesProducer.java
@@ -28,6 +28,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -82,6 +83,8 @@ public class KubernetesPersistentVolumesProducer extends DefaultProducer
{
     protected void doList(Exchange exchange, String operation) throws Exception {
         PersistentVolumeList persistentVolumeList = getEndpoint()
                 .getKubernetesClient().persistentVolumes().list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(persistentVolumeList.getItems());
     }
 
@@ -97,6 +100,8 @@ public class KubernetesPersistentVolumesProducer extends DefaultProducer
{
             pvs.withLabel(entry.getKey(), entry.getValue());
         }
         pvList = pvs.list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pvList.getItems());
     }
 
@@ -112,6 +117,8 @@ public class KubernetesPersistentVolumesProducer extends DefaultProducer
{
                     "Get a specific Persistent Volume require specify a Persistent Volume
name");
         }
         pv = getEndpoint().getKubernetesClient().persistentVolumes().withName(pvName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pv);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPodsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPodsProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPodsProducer.java
index 1c61e72..814034b 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPodsProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesPodsProducer.java
@@ -30,6 +30,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -91,6 +92,8 @@ public class KubernetesPodsProducer extends DefaultProducer {
 
     protected void doList(Exchange exchange, String operation) throws Exception {
         PodList podList = getEndpoint().getKubernetesClient().pods().list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(podList.getItems());
     }
 
@@ -108,6 +111,8 @@ public class KubernetesPodsProducer extends DefaultProducer {
             pods.withLabel(entry.getKey(), entry.getValue());
         }
         PodList podList = pods.list();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(podList.getItems());
     }
 
@@ -130,6 +135,8 @@ public class KubernetesPodsProducer extends DefaultProducer {
         }
         pod = getEndpoint().getKubernetesClient().pods()
                 .inNamespace(namespaceName).withName(podName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pod);
     }
 
@@ -164,6 +171,8 @@ public class KubernetesPodsProducer extends DefaultProducer {
                 .withSpec(podSpec).build();
         pod = getEndpoint().getKubernetesClient().pods()
                 .inNamespace(namespaceName).create(podCreating);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(pod);
     }
 
@@ -185,6 +194,8 @@ public class KubernetesPodsProducer extends DefaultProducer {
         }
         boolean podDeleted = getEndpoint().getKubernetesClient().pods()
                 .inNamespace(namespaceName).withName(podName).delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(podDeleted);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesReplicationControllersProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesReplicationControllersProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesReplicationControllersProducer.java
index dd48b79..5d5ab99 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesReplicationControllersProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesReplicationControllersProducer.java
@@ -31,6 +31,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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,8 @@ public class KubernetesReplicationControllersProducer extends DefaultProducer
{
             rcList = getEndpoint().getKubernetesClient()
                     .replicationControllers().list();
         }
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rcList.getItems());
     }
 
@@ -138,6 +141,8 @@ public class KubernetesReplicationControllersProducer extends DefaultProducer
{
             }
             rcList = replicationControllers.list();
         }
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rcList.getItems());
         
     }
@@ -162,6 +167,8 @@ public class KubernetesReplicationControllersProducer extends DefaultProducer
{
         }
         rc = getEndpoint().getKubernetesClient().replicationControllers()
                 .inNamespace(namespaceName).withName(rcName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rc);
     }
 
@@ -199,6 +206,8 @@ public class KubernetesReplicationControllersProducer extends DefaultProducer
{
                 .endMetadata().withSpec(rcSpec).build();
         rc = getEndpoint().getKubernetesClient().replicationControllers()
                 .inNamespace(namespaceName).create(rcCreating);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rc);
     }
 
@@ -222,6 +231,8 @@ public class KubernetesReplicationControllersProducer extends DefaultProducer
{
         boolean rcDeleted = getEndpoint().getKubernetesClient()
                 .replicationControllers().inNamespace(namespaceName)
                 .withName(rcName).delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rcDeleted);
     }
     
@@ -253,6 +264,7 @@ public class KubernetesReplicationControllersProducer extends DefaultProducer
{
                 .replicationControllers().inNamespace(namespaceName)
                 .withName(rcName).scale(replicasNumber, true);
         
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rcScaled.getStatus().getReplicas());
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesResourcesQuotaProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesResourcesQuotaProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesResourcesQuotaProducer.java
index a9afe3f..891b13b 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesResourcesQuotaProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesResourcesQuotaProducer.java
@@ -31,6 +31,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -120,6 +121,8 @@ public class KubernetesResourcesQuotaProducer extends DefaultProducer
{
             }
             resList = resQuota.list();
         }
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(resList.getItems());
     }
 
@@ -143,6 +146,8 @@ public class KubernetesResourcesQuotaProducer extends DefaultProducer
{
         }
         rq = getEndpoint().getKubernetesClient().resourceQuotas()
                 .inNamespace(namespaceName).withName(rqName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rq);
     }
 
@@ -180,6 +185,8 @@ public class KubernetesResourcesQuotaProducer extends DefaultProducer
{
                 .endMetadata().withSpec(rqSpec).build();
         rq = getEndpoint().getKubernetesClient().resourceQuotas()
                 .inNamespace(namespaceName).create(rqCreating);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rq);
     }
 
@@ -203,6 +210,8 @@ public class KubernetesResourcesQuotaProducer extends DefaultProducer
{
         boolean rqDeleted = getEndpoint().getKubernetesClient()
                 .resourceQuotas().inNamespace(namespaceName).withName(rqName)
                 .delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(rqDeleted);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesSecretsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesSecretsProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesSecretsProducer.java
index 0006927..c15a860 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesSecretsProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesSecretsProducer.java
@@ -29,6 +29,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -117,6 +118,8 @@ public class KubernetesSecretsProducer extends DefaultProducer {
             }
             secretsList = secrets.list();
         }
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(secretsList.getItems());
     }
 
@@ -139,6 +142,8 @@ public class KubernetesSecretsProducer extends DefaultProducer {
         }
         secret = getEndpoint().getKubernetesClient().secrets()
                 .inNamespace(namespaceName).withName(secretName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(secret);
     }
 
@@ -163,6 +168,8 @@ public class KubernetesSecretsProducer extends DefaultProducer {
                 KubernetesConstants.KUBERNETES_SECRETS_LABELS, Map.class);
         secret = getEndpoint().getKubernetesClient().secrets()
                 .inNamespace(namespaceName).create(secretToCreate);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(secret);
     }
 
@@ -184,6 +191,8 @@ public class KubernetesSecretsProducer extends DefaultProducer {
         }
         boolean secretDeleted = getEndpoint().getKubernetesClient().secrets()
                 .inNamespace(namespaceName).withName(secretName).delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(secretDeleted);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a52ab3cd/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesServiceAccountsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesServiceAccountsProducer.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesServiceAccountsProducer.java
index 36fa58c..5663ebb 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesServiceAccountsProducer.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/producer/KubernetesServiceAccountsProducer.java
@@ -29,6 +29,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.component.kubernetes.KubernetesConstants;
 import org.apache.camel.component.kubernetes.KubernetesEndpoint;
 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;
@@ -117,6 +118,8 @@ public class KubernetesServiceAccountsProducer extends DefaultProducer
{
             }
             saList = serviceAccounts.list();
         }
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(saList.getItems());
     }
 
@@ -139,6 +142,8 @@ public class KubernetesServiceAccountsProducer extends DefaultProducer
{
         }
         sa = getEndpoint().getKubernetesClient().serviceAccounts()
                 .inNamespace(namespaceName).withName(saName).get();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(sa);
     }
 
@@ -163,6 +168,8 @@ public class KubernetesServiceAccountsProducer extends DefaultProducer
{
                 KubernetesConstants.KUBERNETES_SERVICE_ACCOUNTS_LABELS, Map.class);
         sa = getEndpoint().getKubernetesClient().serviceAccounts()
                 .inNamespace(namespaceName).create(saToCreate);
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(sa);
     }
 
@@ -184,6 +191,8 @@ public class KubernetesServiceAccountsProducer extends DefaultProducer
{
         }
         boolean saDeleted = getEndpoint().getKubernetesClient().serviceAccounts()
                 .inNamespace(namespaceName).withName(saName).delete();
+        
+        MessageHelper.copyHeaders(exchange.getIn(), exchange.getOut(), true);
         exchange.getOut().setBody(saDeleted);
     }
 }


Mime
View raw message