mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 19:28:55 +00:00
fix: skip admission in dry run requests (#4994)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
This commit is contained in:
parent
aedaa412a0
commit
ea1b64ab08
1 changed files with 3 additions and 0 deletions
|
@ -164,6 +164,9 @@ func (v *validationHandler) handleAudit(
|
|||
if !v.admissionReports {
|
||||
return
|
||||
}
|
||||
if request.DryRun != nil && *request.DryRun {
|
||||
return
|
||||
}
|
||||
// we don't need reports for deletions and when it's about sub resources
|
||||
if request.Operation == admissionv1.Delete || request.SubResource != "" {
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue