mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Don't decorate admission for audit when audit is disabled
This commit is contained in:
parent
a37b6fc8b4
commit
1b529d4f0b
@ -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