retain read only root file system in determineEffectiveSecurityContext

pull/6/head
Paul Weil 2016-05-05 19:25:58 -04:00
parent e0f7de94f5
commit 04dc71f959
1 changed files with 5 additions and 0 deletions

View File

@ -159,6 +159,11 @@ func DetermineEffectiveSecurityContext(pod *api.Pod, container *api.Container) *
*effectiveSc.RunAsNonRoot = *containerSc.RunAsNonRoot
}
if containerSc.ReadOnlyRootFilesystem != nil {
effectiveSc.ReadOnlyRootFilesystem = new(bool)
*effectiveSc.ReadOnlyRootFilesystem = *containerSc.ReadOnlyRootFilesystem
}
return effectiveSc
}