mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-15 22:08:47 +00:00
proto: fsGroup support for direct-assigned volume
This change adds two fields to the Storage pb FSGroup which is a group id that the runtime specifies to indicate to the agent to perform a chown of the mounted volume to the specified group id after mounting is complete in the guest. FSGroupChangePolicy which is a policy to indicate whether to always perform the group id ownership change or only if the root directory group id does not match with the desired group id. These two fields will allow CSI plugins to indicate to Kata that after the block device is mounted in the guest, group id ownership change should be performed on that volume. Fixes #4018 Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
This commit is contained in:
@@ -399,6 +399,17 @@ message SetGuestDateTimeRequest {
|
||||
int64 Usec = 2;
|
||||
}
|
||||
|
||||
// FSGroup consists of the group id and group ownership change policy
|
||||
// that a volume should have its ownership changed to.
|
||||
message FSGroup {
|
||||
// GroupID is the ID that the group ownership of the
|
||||
// files in the mounted volume will need to be changed to.
|
||||
uint32 group_id = 2;
|
||||
// GroupChangePolicy specifies the policy for applying group id
|
||||
// ownership change on a mounted volume.
|
||||
types.FSGroupChangePolicy group_change_policy = 3;
|
||||
}
|
||||
|
||||
// Storage represents both the rootfs of the container, and any volume that
|
||||
// could have been defined through the Mount list of the OCI specification.
|
||||
message Storage {
|
||||
@@ -422,11 +433,14 @@ message Storage {
|
||||
// device, "9p" for shared filesystem, or "tmpfs" for shared /dev/shm.
|
||||
string fstype = 4;
|
||||
// Options describes the additional options that might be needed to
|
||||
// mount properly the storage filesytem.
|
||||
// mount properly the storage filesystem.
|
||||
repeated string options = 5;
|
||||
// MountPoint refers to the path where the storage should be mounted
|
||||
// inside the VM.
|
||||
string mount_point = 6;
|
||||
// FSGroup consists of the group ID and group ownership change policy
|
||||
// that the mounted volume must have its group ID changed to when specified.
|
||||
FSGroup fs_group = 7;
|
||||
}
|
||||
|
||||
// Device represents only the devices that could have been defined through the
|
||||
|
Reference in New Issue
Block a user