Merge pull request #118504 from jsafrane/fix-selinux-contexts

Fix SELinux contexts used in e2e tests
This commit is contained in:
Kubernetes Prow Robot 2023-06-06 11:18:50 -07:00 committed by GitHub
commit 901edb5a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,15 +49,15 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount", func() {
// Make sure all options are set so system specific defaults are not used. // Make sure all options are set so system specific defaults are not used.
seLinuxOpts1 := v1.SELinuxOptions{ seLinuxOpts1 := v1.SELinuxOptions{
User: "system_u", User: "system_u",
Role: "object_r", Role: "system_r",
Type: "container_file_t", Type: "container_t",
Level: "s0:c0,c1", Level: "s0:c0,c1",
} }
seLinuxMountOption1 := "context=\"system_u:object_r:container_file_t:s0:c0,c1\"" seLinuxMountOption1 := "context=\"system_u:object_r:container_file_t:s0:c0,c1\""
seLinuxOpts2 := v1.SELinuxOptions{ seLinuxOpts2 := v1.SELinuxOptions{
User: "system_u", User: "system_u",
Role: "object_r", Role: "system_r",
Type: "container_file_t", Type: "container_t",
Level: "s0:c98,c99", Level: "s0:c98,c99",
} }
seLinuxMountOption2 := "context=\"system_u:object_r:container_file_t:s0:c98,c99\"" seLinuxMountOption2 := "context=\"system_u:object_r:container_file_t:s0:c98,c99\""
@ -267,14 +267,14 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics", func() {
// Make sure all options are set so system specific defaults are not used. // Make sure all options are set so system specific defaults are not used.
seLinuxOpts1 := v1.SELinuxOptions{ seLinuxOpts1 := v1.SELinuxOptions{
User: "system_u", User: "system_u",
Role: "object_r", Role: "system_r",
Type: "container_file_t", Type: "container_t",
Level: "s0:c0,c1", Level: "s0:c0,c1",
} }
seLinuxOpts2 := v1.SELinuxOptions{ seLinuxOpts2 := v1.SELinuxOptions{
User: "system_u", User: "system_u",
Role: "object_r", Role: "system_r",
Type: "container_file_t", Type: "container_t",
Level: "s0:c98,c99", Level: "s0:c98,c99",
} }