@@ -242,6 +242,7 @@ private ResponseStep<Domain> createResponseStep(DomainStatusUpdaterContext conte
242
242
return new StatusReplaceResponseStep (this ,
243
243
/* MARKER-2.6.0-ONLY */
244
244
newStatus ,
245
+ useDomainStatusEndpoint ,
245
246
/* END-2.6.0-ONLY */
246
247
context , next );
247
248
}
@@ -252,18 +253,21 @@ static class StatusReplaceResponseStep extends DefaultResponseStep<Domain> {
252
253
private final DomainStatusUpdaterContext context ;
253
254
/* MARKER-2.6.0-ONLY */
254
255
private final DomainStatus newStatus ;
256
+ private final boolean useDomainStatusEndpoint ;
255
257
/* END-2.6.0-ONLY */
256
258
257
259
public StatusReplaceResponseStep (DomainStatusUpdaterStep updaterStep ,
258
260
/* MARKER-2.6.0-ONLY */
259
261
DomainStatus newStatus ,
262
+ boolean useDomainStatusEndpoint ,
260
263
/* END-2.6.0-ONLY */
261
264
DomainStatusUpdaterContext context , Step nextStep ) {
262
265
super (nextStep );
263
266
this .updaterStep = updaterStep ;
264
267
this .context = context ;
265
268
/* MARKER-2.6.0-ONLY */
266
269
this .newStatus = newStatus ;
270
+ this .useDomainStatusEndpoint = useDomainStatusEndpoint ;
267
271
/* END-2.6.0-ONLY */
268
272
}
269
273
@@ -273,15 +277,9 @@ public NextAction onSuccess(Packet packet, CallResponse<Domain> callResponse) {
273
277
// If the 3.0.0 operator updated the CRD to use status endpoint while this operator is running
274
278
// then these domain replace calls will succeed, but the proposed domain status will have been
275
279
// ignored. Check if the status on the returned domain is expected
276
- if (callResponse .getResult () == null || !newStatus .equals (callResponse .getResult ().getStatus ())) {
280
+ if (!useDomainStatusEndpoint
281
+ && (callResponse .getResult () == null || !newStatus .equals (callResponse .getResult ().getStatus ()))) {
277
282
LOGGER .info (MessageKeys .DOMAIN_STATUS_IGNORED );
278
-
279
- // TEST
280
- if (callResponse .getResult () != null ) {
281
- System .out .println ("response status: " + callResponse .getResult ().getStatus ());
282
- }
283
- System .out .println ("expected newStatus: " + newStatus );
284
-
285
283
return doNext (CrdHelper .createDomainCrdStep (packet .getSpi (KubernetesVersion .class ),
286
284
createRetry (context , getNext ())), packet );
287
285
}
0 commit comments