Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #46 Support for volumes with 3 parts #47

Closed
wants to merge 2 commits into from

Conversation

rh-tguittet
Copy link
Contributor

Changes introduced with this PR

Fix for issue #46, this is needed for selinux enabled distros.

This enables support for 2 and 3 parts volumes:

  • 2 parts: ./local:/in-container
  • 3 parts, 3rd part being security options: ./local:/in-container:z

By contributing to this repository, I agree to the contribution guidelines.

Signed-off-by: Thibault Guittet <88336850+rh-tguittet@users.noreply.github.com>
Copy link
Contributor

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that the three-token case works like the two-token case, this seems fine.

@rh-tguittet
Copy link
Contributor Author

Bump, would love to be able to run this locally for testing :)

@webbnh
Copy link
Contributor

webbnh commented Mar 19, 2024

Hi Thibault, I think this PR is waiting for someone to write some tests for it. I don't think we were going to ask you to do it, but none of us have gotten around to it, yet, either...so, this PR is languishing. Sorry!

Adding `:Z` to the volume definition seems to work for both SELinux and
non-SELinux systems. It turns out this allows to simplify the test.

On Fedora (SELinux: Enforcing):

	$ go test -run TestSimpleVolume
	PASS
	ok      go.flow.arcalot.io/podmandeployer       0.404s

On Ubuntu (Apparmor disabled):

	$ go test -run TestSimpleVolume
	PASS
	ok  	go.flow.arcalot.io/podmandeployer	1.346s
@rh-tguittet
Copy link
Contributor Author

@webbnh I have no issues on testing when adding :Z to the volumes list. I cannot test on MacOS (so let me know if it's different).

Copy link
Contributor

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rh-tguittet, thanks for the update!

However, we should retain the old test (without the :Z) and add a new test for that case.

Also, are there other cases we should test (like :z, :ro, and/or multiple options, like :z,ro,noexec)?

I'll take care of these if you want. (I'm currently doing other work in that file.)

@webbnh
Copy link
Contributor

webbnh commented Mar 27, 2024

#52 now supersedes this PR -- I've rebased this branch on the end of main and piled a bunch of commits on top of it. 🙂

@webbnh webbnh closed this Mar 27, 2024
@webbnh webbnh reopened this Mar 28, 2024
@webbnh webbnh closed this Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants