Skip to content

Commit 581eec3

Browse files
committedJul 16, 2018
Don't mount volume for auditLog when STDOUT is configured as path
Fixes kubernetes#4202
1 parent 498b5d7 commit 581eec3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎nodeup/pkg/model/kube_apiserver.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ func (b *KubeAPIServerBuilder) buildPod() (*v1.Pod, error) {
434434
}
435435

436436
auditLogPath := b.Cluster.Spec.KubeAPIServer.AuditLogPath
437-
if auditLogPath != nil {
437+
// Don't mount a volume if the mount path is set to '-' for stdout logging
438+
// See https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-backends
439+
if auditLogPath != nil && *auditLogPath != "-" {
438440
// Mount the directory of the path instead, as kube-apiserver rotates the log by renaming the file.
439441
// Renaming is not possible when the file is mounted as the host path, and will return a
440442
// 'Device or resource busy' error

0 commit comments

Comments
 (0)