Skip to content

Commit 0214ea5

Browse files
committed
Fix use of pod awaiter
1 parent 4c94793 commit 0214ea5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ public NextAction apply(Packet packet) {
595595
.getComponents()
596596
.put(
597597
ProcessingConstants.DOMAIN_COMPONENT_NAME,
598-
Component.createFor(info, Main.getVersion(), pw));
598+
Component.createFor(info, Main.getVersion(), PodAwaiterStepFactory.class, pw));
599599
packet.put(ProcessingConstants.PRINCIPAL, Main.getPrincipal());
600600
scheduleDomainStatusUpdating(info);
601601
return doNext(packet);
@@ -619,7 +619,7 @@ public NextAction apply(Packet packet) {
619619
.getComponents()
620620
.put(
621621
ProcessingConstants.DOMAIN_COMPONENT_NAME,
622-
Component.createFor(info, Main.getVersion(), pw));
622+
Component.createFor(info, Main.getVersion(), PodAwaiterStepFactory.class, pw));
623623
packet.put(ProcessingConstants.PRINCIPAL, Main.getPrincipal());
624624
return doNext(packet);
625625
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
import oracle.kubernetes.operator.work.Step;
3535

3636
/** Watches for Pods to become Ready or leave Ready state */
37-
public class PodWatcher extends Watcher<V1Pod> implements WatchListener<V1Pod> {
37+
public class PodWatcher extends Watcher<V1Pod>
38+
implements WatchListener<V1Pod>, PodAwaiterStepFactory {
3839
private static final LoggingFacade LOGGER = LoggingFactory.getLogger("Operator", "Operator");
3940

4041
private final String ns;

operator/src/main/java/oracle/kubernetes/operator/steps/WatchPodReadyAdminStep.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import io.kubernetes.client.models.V1Pod;
88
import java.util.Map;
9+
import oracle.kubernetes.operator.PodAwaiterStepFactory;
910
import oracle.kubernetes.operator.PodWatcher;
1011
import oracle.kubernetes.operator.ProcessingConstants;
1112
import oracle.kubernetes.operator.helpers.DomainPresenceInfo;
@@ -30,7 +31,9 @@ public NextAction apply(Packet packet) {
3031
PodWatcher pw = podWatchers.get(adminPod.getMetadata().getNamespace());
3132
packet
3233
.getComponents()
33-
.put(ProcessingConstants.PODWATCHER_COMPONENT_NAME, Component.createFor(pw));
34+
.put(
35+
ProcessingConstants.PODWATCHER_COMPONENT_NAME,
36+
Component.createFor(PodAwaiterStepFactory.class, pw));
3437

3538
return doNext(pw.waitForReady(adminPod, getNext()), packet);
3639
}

0 commit comments

Comments
 (0)