camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-9683: A new toService EIP that uses a client discovery to lookup alive services and pick a service ip/port to use when calling the service from Camel route. Allows to plugin different providers.
Date Fri, 22 Apr 2016 18:36:56 GMT
Repository: camel
Updated Branches:
  refs/heads/kube-lb 14786f68e -> 7c9f11973


CAMEL-9683: A new toService EIP that uses a client discovery to lookup alive services and
pick a service ip/port to use when calling the service from Camel route. Allows to plugin
different providers.


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

Branch: refs/heads/kube-lb
Commit: 7c9f119730e6855f2ac582f344aa86fd59f1aa21
Parents: 14786f6
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Apr 22 20:36:47 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Apr 22 20:36:47 2016 +0200

----------------------------------------------------------------------
 .../kubernetes/processor/KubernetesProcessorFactory.java     | 2 ++
 .../kubernetes/processor/KubernetesServiceDiscovery.java     | 5 +++--
 .../kubernetes/processor/KubernetesServiceProcessor.java     | 8 ++++----
 3 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7c9f1197/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesProcessorFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesProcessorFactory.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesProcessorFactory.java
index 9ee2ca9..104ace7 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesProcessorFactory.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesProcessorFactory.java
@@ -71,6 +71,8 @@ public class KubernetesProcessorFactory implements ProcessorFactory {
             KubernetesConfiguration kc = new KubernetesConfiguration();
             IntrospectionSupport.setProperties(kc, parameters);
 
+            // TODO: allow to specify kubernetes/openshift etc
+
             // use namespace from config if not provided
             if (namespace == null) {
                 namespace = kc.getNamespace();

http://git-wip-us.apache.org/repos/asf/camel/blob/7c9f1197/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceDiscovery.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceDiscovery.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceDiscovery.java
index 574db72..42f7002 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceDiscovery.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceDiscovery.java
@@ -24,6 +24,7 @@ import io.fabric8.kubernetes.api.model.EndpointPort;
 import io.fabric8.kubernetes.api.model.EndpointSubset;
 import io.fabric8.kubernetes.api.model.Endpoints;
 import io.fabric8.kubernetes.client.KubernetesClient;
+import io.fabric8.openshift.client.OpenShiftClient;
 import org.apache.camel.support.ServiceSupport;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
@@ -38,9 +39,9 @@ public class KubernetesServiceDiscovery extends ServiceSupport {
     private String name;
     private String namespace;
     private String portName;
-    private KubernetesClient client;
+    private OpenShiftClient client;
 
-    public KubernetesServiceDiscovery(String name, String namespace, String portName, KubernetesClient
client) {
+    public KubernetesServiceDiscovery(String name, String namespace, String portName, OpenShiftClient
client) {
         this.name = name;
         this.namespace = namespace;
         this.portName = portName;

http://git-wip-us.apache.org/repos/asf/camel/blob/7c9f1197/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceProcessor.java
b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceProcessor.java
index 4307960..d9bfd5b 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceProcessor.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/processor/KubernetesServiceProcessor.java
@@ -22,8 +22,8 @@ import java.util.concurrent.RejectedExecutionException;
 
 import io.fabric8.kubernetes.client.Config;
 import io.fabric8.kubernetes.client.ConfigBuilder;
-import io.fabric8.kubernetes.client.DefaultKubernetesClient;
-import io.fabric8.kubernetes.client.KubernetesClient;
+import io.fabric8.openshift.client.DefaultOpenShiftClient;
+import io.fabric8.openshift.client.OpenShiftClient;
 import org.apache.camel.AsyncCallback;
 import org.apache.camel.AsyncProcessor;
 import org.apache.camel.Exchange;
@@ -135,7 +135,7 @@ public class KubernetesServiceProcessor extends ServiceSupport implements
AsyncP
         ServiceHelper.stopService(discovery);
     }
 
-    private KubernetesClient createKubernetesClient() {
+    private OpenShiftClient createKubernetesClient() {
         LOG.debug("Create Kubernetes client with the following Configuration: " + configuration.toString());
 
         ConfigBuilder builder = new ConfigBuilder();
@@ -180,7 +180,7 @@ public class KubernetesServiceProcessor extends ServiceSupport implements
AsyncP
         }
 
         Config conf = builder.build();
-        return new DefaultKubernetesClient(conf);
+        return new DefaultOpenShiftClient(conf);
     }
 
 }


Mime
View raw message