Skip to content

Commit

Permalink
Add SELinux mount option to NewMounter() and MountDevice()
Browse files Browse the repository at this point in the history
Let volume plugins decide if they want to mount volumes with "-o
context=XYZ" or let the container runtime relabel the volume on container
startup.

Using NewMounter, as it's the call where a volume plugin gets the other MountOptions.
  • Loading branch information
jsafrane committed Aug 4, 2022
1 parent f2fd9c1 commit f99cf51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/volume/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ type MounterArgs struct {
FsGroup *int64
FSGroupChangePolicy *v1.PodFSGroupChangePolicy
DesiredSize *resource.Quantity
SELinuxLabel string
}

// Mounter interface provides methods to set up/mount the volume.
Expand Down Expand Up @@ -262,7 +263,8 @@ type Attacher interface {

// DeviceMounterArgs provides auxiliary, optional arguments to DeviceMounter.
type DeviceMounterArgs struct {
FsGroup *int64
FsGroup *int64
SELinuxLabel string
}

// DeviceMounter can mount a block volume to a global path.
Expand Down

0 comments on commit f99cf51

Please sign in to comment.