Skip to content
Snippets Groups Projects
Commit dfc5b8fc authored by Arran Walker's avatar Arran Walker
Browse files

Merge branch 'overlay-mount-support' into 'main'

Add support for Overlay Volume Mounts when Podman is used with Docker Executor

Closes #31095 and #29304

See merge request gitlab-org/gitlab-runner!5522



Merged-by: default avatarArran Walker <ajwalker@gitlab.com>
Approved-by: default avatarArran Walker <ajwalker@gitlab.com>
Co-authored-by: default avatarSanteri Kääriäinen <santeri.kaariainen@iki.fi>
parents 3e6a79ba 4613d3bb
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ const (
linuxSource = `((?P<source>((` + linuxDir + `)|(` + linuxVolumeName + `))):)?`
linuxDestination = `(?P<destination>(?:` + linuxDir + `))`
linuxMode = `(:(?P<mode>(?i)ro|rw))?`
linuxMode = `(:(?P<mode>(?i)(ro|rw|O)))?`
linuxLabel = `((:|,)(?P<label>(?i)z))?`
linuxBindPropagation = `((:|,)(?P<bindPropagation>(?i)shared|slave|private|rshared|rslave|rprivate))?`
)
......
......@@ -51,6 +51,18 @@ func TestLinuxParser_ParseVolume(t *testing.T) {
volumeSpec: "/Source:/Destination:rw",
expectedParts: &Volume{Source: "/Source", Destination: "/Destination", Mode: "rw"},
},
"overlay mount": {
volumeSpec: "/source:/destination:O",
expectedParts: &Volume{Source: "/source", Destination: "/destination", Mode: "O"},
},
"overlay mount with SELinux label shared among multiple containers": {
volumeSpec: "/source:/destination:O,z",
expectedParts: &Volume{Source: "/source", Destination: "/destination", Mode: "O", Label: "z"},
},
"overlay mount with SELinux label private": {
volumeSpec: "/source:/destination:O,Z",
expectedParts: &Volume{Source: "/source", Destination: "/destination", Mode: "O", Label: "Z"},
},
"support SELinux label bind mount content is shared among multiple containers": {
volumeSpec: "/source:/destination:z",
expectedParts: &Volume{Source: "/source", Destination: "/destination", Mode: "", Label: "z"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment