From df4f4ad0d870e3ce393af4a490032f313a1ecb46 Mon Sep 17 00:00:00 2001 From: Oleksii Nadtochyi Date: Sun, 18 Jun 2017 11:46:26 +0300 Subject: [PATCH] NullPointerException while getting list of services has been fixed. (cherry picked from commit 170a481) --- .../io/fabric8/kubeflix/examples/hellohystrix/HelloCommand.java | 2 +- .../java/io/fabric8/kubeflix/ribbon/KubernetesServerList.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/hello-world/hello-hystrix/src/main/java/io/fabric8/kubeflix/examples/hellohystrix/HelloCommand.java b/examples/hello-world/hello-hystrix/src/main/java/io/fabric8/kubeflix/examples/hellohystrix/HelloCommand.java index ca4c159..0f1bd1f 100644 --- a/examples/hello-world/hello-hystrix/src/main/java/io/fabric8/kubeflix/examples/hellohystrix/HelloCommand.java +++ b/examples/hello-world/hello-hystrix/src/main/java/io/fabric8/kubeflix/examples/hellohystrix/HelloCommand.java @@ -25,7 +25,7 @@ public class HelloCommand extends HystrixCommand { protected HelloCommand() { - super(HystrixCommandGroupKey.Factory.asKey("HelloGroup")); + super(HystrixCommandGroupKey.Factory.asKey("HelloRibbonGroup")); } @Override diff --git a/ribbon-discovery/src/main/java/io/fabric8/kubeflix/ribbon/KubernetesServerList.java b/ribbon-discovery/src/main/java/io/fabric8/kubeflix/ribbon/KubernetesServerList.java index ae87994..ba3003f 100644 --- a/ribbon-discovery/src/main/java/io/fabric8/kubeflix/ribbon/KubernetesServerList.java +++ b/ribbon-discovery/src/main/java/io/fabric8/kubeflix/ribbon/KubernetesServerList.java @@ -61,6 +61,7 @@ public KubernetesServerList(IClientConfig clientConfig, KubernetesClient client) } public void initWithNiwsConfig(IClientConfig clientConfig) { + this.client = new DefaultKubernetesClient(); this.clientConfig = clientConfig; this.name = clientConfig.getClientName(); this.namespace = clientConfig.getPropertyAsString(KubernetesConfigKey.Namespace, client.getNamespace());