Skip to content

Commit

Permalink
Fix failure to set default audit-log-path
Browse files Browse the repository at this point in the history
If audit-log-path is not set when audit-policy-file is set, use default value

Signed-off-by: Brad Davidson <[email protected]>
(cherry picked from commit 76974f2)
  • Loading branch information
brandond committed Jul 8, 2023
1 parent 6ff9fea commit e46e53d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/podexecutor/staticpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,11 @@ func (s *StaticPodConfig) APIServer(_ context.Context, etcdReady <-chan struct{}
"--audit-log-maxbackup=10",
"--audit-log-maxsize=100",
}
args = append(extraArgs, args...)
if auditLogFile == "" {
auditLogFile = filepath.Join(s.DataDir, "server/logs/audit.log")
extraArgs = append(extraArgs, "--audit-log-path="+auditLogFile)
}
args = append(extraArgs, args...)
}

args = append([]string{"--admission-control-config-file=" + s.PSAConfigFile}, args...)
Expand Down

0 comments on commit e46e53d

Please sign in to comment.