1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix: dump admission response (#6349)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-02-20 11:06:46 +01:00 committed by GitHub
parent 5f9aec162f
commit 695e9b116d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,10 @@ func dumpPayload(
if err != nil {
logger.Error(err, "Failed to extract resources")
} else {
logger.Info("Logging admission request and response payload ", "AdmissionRequest", reqPayload, "AdmissionResponse", response)
if response != nil {
logger = logger.WithValues("AdmissionResponse", *response)
}
logger.Info("Logging admission request and response payload ", "AdmissionRequest", reqPayload)
}
}