karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [1/2] karaf-cellar git commit: [KARAF-4699] Check Kubernetes POD label value while discovering nodes
Date Tue, 06 Sep 2016 05:45:40 GMT
Repository: karaf-cellar
Updated Branches:
  refs/heads/master be64a7cf3 -> 355b714e1


[KARAF-4699] Check Kubernetes POD label value while discovering nodes


Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/17f60564
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/17f60564
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/17f60564

Branch: refs/heads/master
Commit: 17f605643f9813a5ae13f9ea8ed1d6a3195ac266
Parents: be64a7c
Author: Victor Antonovich <v.antonovich@gmail.com>
Authored: Mon Sep 5 15:18:58 2016 +0300
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Tue Sep 6 07:39:25 2016 +0200

----------------------------------------------------------------------
 .../apache/karaf/cellar/kubernetes/KubernetesDiscoveryService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/17f60564/kubernetes/src/main/java/org/apache/karaf/cellar/kubernetes/KubernetesDiscoveryService.java
----------------------------------------------------------------------
diff --git a/kubernetes/src/main/java/org/apache/karaf/cellar/kubernetes/KubernetesDiscoveryService.java
b/kubernetes/src/main/java/org/apache/karaf/cellar/kubernetes/KubernetesDiscoveryService.java
index 2873da2..e4f0890 100644
--- a/kubernetes/src/main/java/org/apache/karaf/cellar/kubernetes/KubernetesDiscoveryService.java
+++ b/kubernetes/src/main/java/org/apache/karaf/cellar/kubernetes/KubernetesDiscoveryService.java
@@ -74,7 +74,7 @@ public class KubernetesDiscoveryService implements DiscoveryService {
             PodList podList = kubernetesClient.pods().list();
             for (Pod pod : podList.getItems()) {
                 String value = pod.getMetadata().getLabels().get(kubernetesPodLabelKey);
-                if (value != null && !value.isEmpty()) {
+                if (value != null && !value.isEmpty() && value.equals(kubernetesPodLabelValue))
{
                     members.add(pod.getStatus().getPodIP());
                 }
             }


Mime
View raw message