Skip to content

Commit 9b37ef3

Browse files
committed
mount by-path directories as read-only
Signed-off-by: Tuomas Katila <[email protected]>
1 parent d86fa40 commit 9b37ef3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/gpu_plugin/gpu_plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func (dp *devicePlugin) bypathMountsForPci(pciAddress, bypathDir string) []plugi
257257
mounts = append(mounts, pluginapi.Mount{
258258
ContainerPath: absPath,
259259
HostPath: absPath,
260-
ReadOnly: false,
260+
ReadOnly: true,
261261
})
262262
}
263263
}
@@ -529,7 +529,7 @@ func (dp *devicePlugin) createMountsAndCDIDevices(cardPath, name string, devSpec
529529
HostPath: mount.HostPath,
530530
ContainerPath: mount.ContainerPath,
531531
Type: "none",
532-
Options: []string{"bind", "rw"},
532+
Options: []string{"bind", "ro"},
533533
})
534534
}
535535

0 commit comments

Comments
 (0)