1- // Copyright (c) 2022, Oracle and/or its affiliates.
1+ // Copyright (c) 2022, 2024, Oracle and/or its affiliates.
22// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
44package oracle .kubernetes .operator .helpers ;
@@ -263,7 +263,8 @@ protected NextAction onFailureNoRetry(Packet packet,
263263 CallResponse <V1ValidatingWebhookConfiguration > callResponse ) {
264264 LOGGER .info (MessageKeys .READ_VALIDATING_WEBHOOK_CONFIGURATION_FAILED ,
265265 VALIDATING_WEBHOOK_NAME , callResponse .getE ().getResponseBody ());
266- return super .onFailureNoRetry (packet , callResponse );
266+ return isNotAuthorizedOrForbidden (callResponse )
267+ ? doNext (packet ) : super .onFailureNoRetry (packet , callResponse );
267268 }
268269 }
269270
@@ -284,7 +285,8 @@ protected NextAction onFailureNoRetry(Packet packet,
284285 CallResponse <V1ValidatingWebhookConfiguration > callResponse ) {
285286 LOGGER .info (MessageKeys .CREATE_VALIDATING_WEBHOOK_CONFIGURATION_FAILED ,
286287 VALIDATING_WEBHOOK_NAME , callResponse .getE ().getResponseBody ());
287- return super .onFailureNoRetry (packet , callResponse );
288+ return isNotAuthorizedOrForbidden (callResponse )
289+ ? doNext (packet ) : super .onFailureNoRetry (packet , callResponse );
288290 }
289291 }
290292
@@ -318,7 +320,8 @@ protected NextAction onFailureNoRetry(Packet packet,
318320 CallResponse <V1ValidatingWebhookConfiguration > callResponse ) {
319321 LOGGER .info (MessageKeys .REPLACE_VALIDATING_WEBHOOK_CONFIGURATION_FAILED ,
320322 VALIDATING_WEBHOOK_NAME , callResponse .getE ().getResponseBody ());
321- return super .onFailureNoRetry (packet , callResponse );
323+ return isNotAuthorizedOrForbidden (callResponse )
324+ ? doNext (packet ) : super .onFailureNoRetry (packet , callResponse );
322325 }
323326 }
324327
0 commit comments