hashicorp / nomad-driver-podman

A nomad task driver plugin for sandboxing workloads in podman containers
https://developer.hashicorp.com/nomad/plugins/drivers/podman
Mozilla Public License 2.0
225 stars 63 forks source link

Add granular control of SELinux labels for host mounts #321

Closed Juanadelacuesta closed 3 months ago

Juanadelacuesta commented 7 months ago

Currently when using the podman task driver plugin if the selinuxlabel = "z" option is present in the volume configuration, all the host volume mounts will be forced to use SELinux shared volume context.

There is no way for operators to use the csi-hostpath plugin or any type of mount that is not compliant with the SELinux security, or mount a private volume. This PR introduces a new configuration option that can be set per volume mount, allowing to set different SELinux context to different volumes.

There will also be a PR on nomad to read and pass the new configuration.

Closes:

https://github.com/hashicorp/nomad-driver-podman/issues/184 https://github.com/hashicorp/nomad-driver-podman/issues/185 https://github.com/hashicorp/nomad-driver-podman/pull/208