mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Log a warning when --audit-policy-file not passed to apiserver
This commit is contained in:
parent
8ed63636f1
commit
3b91f1cc0d
@ -22,6 +22,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
"gopkg.in/natefinch/lumberjack.v2"
|
||||
|
||||
@ -164,6 +165,10 @@ func (o *AuditOptions) ApplyTo(c *server.Config) error {
|
||||
if err := o.WebhookOptions.applyTo(c); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if c.AuditBackend != nil && c.AuditPolicyChecker == nil {
|
||||
glog.V(2).Info("No audit policy file provided for AdvancedAuditing, no events will be recorded.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user