Merge pull request #2730 from giuseppe/userns-take-rid-of-intermediate-mountns

userns: do not use an intermediate mount namespace
This commit is contained in:
OpenShift Merge Robot
2019-03-29 07:48:05 -07:00
committed by GitHub
9 changed files with 173 additions and 146 deletions

View File

@ -1274,6 +1274,28 @@ func WithVolumeName(name string) VolumeCreateOption {
}
}
// WithVolumeUID sets the uid of the owner.
func WithVolumeUID(uid int) VolumeCreateOption {
return func(volume *Volume) error {
if volume.valid {
return ErrVolumeFinalized
}
volume.config.UID = uid
return nil
}
}
// WithVolumeGID sets the gid of the owner.
func WithVolumeGID(gid int) VolumeCreateOption {
return func(volume *Volume) error {
if volume.valid {
return ErrVolumeFinalized
}
volume.config.GID = gid
return nil
}
}
// WithVolumeLabels sets the labels of the volume.
func WithVolumeLabels(labels map[string]string) VolumeCreateOption {
return func(volume *Volume) error {