rkt: Refactoring the construction of the mount points.

So that at most one volume object will be created for every unique
host path. Also the volume's name is random generated UUID to avoid
collision since the mount point's name passed by kubelet is not
guaranteed to be unique when 'subpath' is specified.
This commit is contained in:
Yifan Gu
2016-08-16 18:18:36 -07:00
parent c8591c710b
commit ce15f0e831
3 changed files with 162 additions and 118 deletions

View File

@@ -342,6 +342,8 @@ type EnvVar struct {
type Mount struct {
// Name of the volume mount.
// TODO(yifan): Remove this field, as this is not representing the unique name of the mount,
// but the volume name only.
Name string
// Path of the mount within the container.
ContainerPath string