Skip to content

Commit

Permalink
Merge pull request #23444 from rhatdan/quadlet
Browse files Browse the repository at this point in the history
Use new syntax for selinux options in quadlet
  • Loading branch information
openshift-merge-bot[bot] authored Jul 30, 2024
2 parents b4d0c95 + 1c46686 commit 95c78b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/systemd/quadlet/quadlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,12 @@ func ConvertContainer(container *parser.UnitFile, names map[string]string, isUse

securityLabelDisable := container.LookupBooleanWithDefault(ContainerGroup, KeySecurityLabelDisable, false)
if securityLabelDisable {
podman.add("--security-opt", "label:disable")
podman.add("--security-opt", "label=disable")
}

securityLabelNested := container.LookupBooleanWithDefault(ContainerGroup, KeySecurityLabelNested, false)
if securityLabelNested {
podman.add("--security-opt", "label:nested")
podman.add("--security-opt", "label=nested")
}

pidsLimit, ok := container.Lookup(ContainerGroup, KeyPidsLimit)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/quadlet/disableselinux.container
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## assert-podman-final-args localhost/imagename
## assert-podman-args "--security-opt" "label:disable"
## assert-podman-args "--security-opt" "label=disable"

[Container]
Image=localhost/imagename
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/quadlet/nestedselinux.container
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## assert-podman-args "--security-opt" "label:nested"
## assert-podman-args "--security-opt" "label=nested"

[Container]
Image=localhost/imagename
Expand Down

0 comments on commit 95c78b2

Please sign in to comment.