From a2f78d6c63155036d397093f2cfc4d90c16bd4fa Mon Sep 17 00:00:00 2001 From: Michal Cwienczek Date: Fri, 22 Nov 2019 15:12:22 +0100 Subject: [PATCH] Exiting the application when there was Kubernetes exception in fabric8 library, see https://github.com/fabric8io/kubernetes-client/issues/1318 for more info --- .../github/containersolutions/operator/EventDispatcher.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/operator-framework/src/main/java/com/github/containersolutions/operator/EventDispatcher.java b/operator-framework/src/main/java/com/github/containersolutions/operator/EventDispatcher.java index efca2c3d36..2a74d3544d 100644 --- a/operator-framework/src/main/java/com/github/containersolutions/operator/EventDispatcher.java +++ b/operator-framework/src/main/java/com/github/containersolutions/operator/EventDispatcher.java @@ -111,6 +111,9 @@ private boolean markedForDeletion(R resource) { public void onClose(KubernetesClientException e) { if (e != null) { log.error("Error: ", e); + // we will exit the application if there was a watching exception, because of the bug in fabric8 client + // see https://github.com/fabric8io/kubernetes-client/issues/1318 + System.exit(1); } } }