Skip to content

Commit 4f79647

Browse files
committed
Only clear status on lack of ready when was previously ready
1 parent 308685a commit 4f79647

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

operator/src/main/java/oracle/kubernetes/operator/PodWatcher.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,17 @@ public void receivedResponse(Watch.Response<V1Pod> item) {
9191
sko.getLastKnownStatus().set(isReady ? WebLogicConstants.RUNNING_STATE : null);
9292
}
9393
if (isReady) {
94+
if (sko != null) {
95+
sko.getLastKnownStatus().set(WebLogicConstants.RUNNING_STATE);
96+
}
9497
OnReady ready = readyCallbackRegistrations.remove(podName);
9598
if (ready != null) {
9699
ready.onReady();
97100
}
101+
} else {
102+
if (sko != null) {
103+
sko.getLastKnownStatus().compareAndSet(WebLogicConstants.RUNNING_STATE, null);
104+
}
98105
}
99106
break;
100107
case "DELETED":

0 commit comments

Comments
 (0)