mirror of https://github.com/kubernetes/kops.git
Don't mount volume for auditLog when STDOUT is configured as path
Fixes #4202
This commit is contained in:
parent
498b5d72b6
commit
581eec3eca
|
|
@ -434,7 +434,9 @@ func (b *KubeAPIServerBuilder) buildPod() (*v1.Pod, error) {
|
|||
}
|
||||
|
||||
auditLogPath := b.Cluster.Spec.KubeAPIServer.AuditLogPath
|
||||
if auditLogPath != nil {
|
||||
// Don't mount a volume if the mount path is set to '-' for stdout logging
|
||||
// See https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-backends
|
||||
if auditLogPath != nil && *auditLogPath != "-" {
|
||||
// Mount the directory of the path instead, as kube-apiserver rotates the log by renaming the file.
|
||||
// Renaming is not possible when the file is mounted as the host path, and will return a
|
||||
// 'Device or resource busy' error
|
||||
|
|
|
|||
Loading…
Reference in New Issue