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 <brad.davidson@rancher.com>
(cherry picked from commit 76974f2)
  • Loading branch information
brandond committed Jul 8, 2023
1 parent 094b3e5 commit 6f5fabe
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 @@ -275,10 +275,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...)
}

files := []string{}
Expand Down

0 comments on commit 6f5fabe

Please sign in to comment.