gaborgsomogyi commented on code in PR #512:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/512#discussion_r1098528981


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/health/HealthProbe.java:
##########
@@ -17,19 +17,42 @@
 
 package org.apache.flink.kubernetes.operator.health;
 
+import io.javaoperatorsdk.operator.RuntimeInfo;
+import lombok.Getter;
+import lombok.Setter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.util.concurrent.atomic.AtomicBoolean;
 
 /** Flink operator health probe. */
 public enum HealthProbe {
     INSTANCE;
 
+    private static final Logger LOG = 
LoggerFactory.getLogger(HealthProbe.class);
+
     private final AtomicBoolean isHealthy = new AtomicBoolean(true);
 
+    @Setter @Getter private RuntimeInfo runtimeInfo;
+
     public void markUnhealthy() {
         isHealthy.set(false);
     }
 
     public boolean isHealthy() {
-        return isHealthy.get();
+        if (!isHealthy.get()) {
+            return false;
+        }
+
+        if (runtimeInfo != null) {
+            LOG.debug("Checking operator health");
+            if (runtimeInfo.allEventSourcesAreHealthy()) {

Review Comment:
   I'm fine if say exception triggers unhealthy action, but it would be good to 
know what happens.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to