From 5bff02977a4fce4ca37490233686405ac8648e48 Mon Sep 17 00:00:00 2001 From: Nick Hirakawa Date: Thu, 16 Jun 2022 13:08:28 -0400 Subject: [PATCH] Log DeleteOptions body --- .../fabric8/kubernetes/client/dsl/base/OperationSupport.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java index 0da343199c2..fcb5a68602c 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/base/OperationSupport.java @@ -282,9 +282,10 @@ protected void handleDelete(URL requestUrl, long gracePeriodSeconds, DeletionPro deleteOptions.setDryRun(Collections.singletonList("All")); } - LOG.debug("Executing delete for {} with {} grace period seconds", requestUrl, gracePeriodSeconds); + String deleteOptionsBody = JSON_MAPPER.writeValueAsString(deleteOptions); + LOG.debug("Executing delete for {} with body {}", requestUrl, deleteOptionsBody); - HttpRequest.Builder requestBuilder = httpClient.newHttpRequestBuilder().delete(JSON, JSON_MAPPER.writeValueAsString(deleteOptions)).url(requestUrl); + HttpRequest.Builder requestBuilder = httpClient.newHttpRequestBuilder().delete(JSON, deleteOptionsBody).url(requestUrl); handleResponse(requestBuilder, null, Collections.emptyMap()); }