mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #108147 from tallclair/audit
Don't decorate admission for audit when audit is disabled
This commit is contained in:
commit
0874cfddda
@ -43,7 +43,7 @@ var _ ValidationInterface = &auditHandler{}
|
||||
// Validate function must be instance of privateAnnotationsGetter or
|
||||
// AnnotationsGetter, otherwise an error is returned.
|
||||
func WithAudit(i Interface, ae *auditinternal.Event) Interface {
|
||||
if i == nil {
|
||||
if i == nil || ae == nil {
|
||||
return i
|
||||
}
|
||||
return &auditHandler{Interface: i, ae: ae}
|
||||
|
Loading…
Reference in New Issue
Block a user