Skip to content

Commit 75bf4df

Browse files
authored
Merge pull request #610 from oracle/delete-processing
Register on domain up and down
2 parents 94694d9 + 6bd2e2d commit 75bf4df

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

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

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ public StartPlanStep(DomainPresenceInfo info, Step next) {
687687

688688
@Override
689689
public NextAction apply(Packet packet) {
690+
registerDomainPresenceInfo(info);
690691
Step strategy = getNext();
691692
if (!info.isPopulated()) {
692693
strategy = Step.chain(readExistingPods(info), readExistingServices(info), strategy);
@@ -695,21 +696,6 @@ public NextAction apply(Packet packet) {
695696
}
696697
}
697698

698-
private static class RegisterStep extends Step {
699-
private final DomainPresenceInfo info;
700-
701-
public RegisterStep(DomainPresenceInfo info, Step next) {
702-
super(next);
703-
this.info = info;
704-
}
705-
706-
@Override
707-
public NextAction apply(Packet packet) {
708-
registerDomainPresenceInfo(info);
709-
return doNext(packet);
710-
}
711-
}
712-
713699
private static class UnregisterStep extends Step {
714700
private final DomainPresenceInfo info;
715701

@@ -896,7 +882,7 @@ static Step createDomainUpPlan(DomainPresenceInfo info) {
896882
return Step.chain(
897883
new UpHeadStep(info),
898884
ConfigMapHelper.readExistingSituConfigMap(info.getNamespace(), info.getDomainUID()),
899-
new RegisterStep(info, strategy));
885+
strategy);
900886
}
901887

902888
static Step createDomainDownPlan(DomainPresenceInfo info) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ public void receivedResponse(Watch.Response<V1Pod> item) {
111111
}
112112

113113
static boolean isTerminating(V1Pod pod) {
114-
return pod.getMetadata().getDeletionTimestamp() != null;
114+
return pod.getMetadata().getDeletionTimestamp() != null
115+
|| pod.getMetadata().getDeletionGracePeriodSeconds() != null;
115116
}
116117

117118
static boolean isReady(V1Pod pod) {

0 commit comments

Comments
 (0)