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
Refactor of taking container creation pieces from server to internal/factory #7275
Comments
similar to #4868, we would like more of the container and sandbox container creation to be moved to the respective factory package and unit tested. Ideally this would also involve less code duplication |
/assign |
Have skimmed through the code & also the reference PR and here is what I've decided to do. I'm planning to move the code parts which are related to namespaces like mount/process/nw/..etc to |
yup that sounds good @hasan4791 . I would say a goal is to be able to remove the call to c.Spec() in server/container_create_linux.go and have all of the spec generation operations go through the container factory object |
@dfr Can you take a look at the above approach inorder to avoid rework of segregating platform specific stuffs. |
Looking at #4645 and comparing my container_create_freebsd.go with container_create_linux.go, it seems clear that at least for mounts, we will need some parts to be linux only - anything involving sysfs or cgroupfs for instance. For mounting files and directories from the host into the container, I use nullfs on FreeBSD - to improve sharing for this kind of thing in buildah and podman I used platform-specific types to avoid using "bind" in the code, e.g. https://github.com/containers/podman/blob/main/libpod/define/mount_freebsd.go |
Other platform-specific things being added to the OCI spec include the apparmor profile, blockio and other resources, cgroups path, capabilities and anything else which touches specgen.Config.Linux |
A friendly reminder that this issue had no activity for 30 days. |
/remove-lifecycle stale |
Unit test cases needs to be moved. WIP |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
/remove-lifecycle stale |
A friendly reminder that this issue had no activity for 30 days. |
@haircommander can provide more input about this refactoring item. Feel free to edit the description of this roadmap topic.
The text was updated successfully, but these errors were encountered: