-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Split up create config handling of namespaces and security #4265
Split up create config handling of namespaces and security #4265
Conversation
|
||
cgroup := cc.CgroupConfig{ | ||
Cgroups: c.String("cgroups"), | ||
Cgroupns: c.String("cgroupns"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to put all namespace configuration together if we can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we do i'd still like proceessing of them to be separated so if a pod only shares a couple of namespaces, all fields don't have to be configured fully
I'm in the planning stages of related refactoring, so we might want to sync on this tomorrow |
Sgtm, i'm second half day PTO but on PST, maybe sync around watercooler? |
6a1cddc
to
700f004
Compare
Alright, this PR as is is ready to be merged PTAL @mheon @baude @rhatdan @TomSweeneyRedHat @QiWang19 @jwhonce @vrothberg |
One thing I'd really like to do is have a unified, sane type for namespaces. Podman should probably allow |
@mheon the problem about that is where the options diverge. net has like a thousand options. We could create an interface for the shared ones, but we couldn't use that interface in a very generic way, so the added benefit is not clear to me |
☔ The latest upstream changes (presumably #4310) made this pull request unmergeable. Please resolve the merge conflicts. |
@haircommander Could you rebase? |
700f004
to
17d61fb
Compare
@rhatdan done |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work @haircommander
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
☔ The latest upstream changes (presumably #4374) made this pull request unmergeable. Please resolve the merge conflicts. |
17d61fb
to
f413c7f
Compare
rebased to resolve conflicts |
/lgtm |
/hold cancel |
/retest |
/test images |
☔ The latest upstream changes (presumably #4447) made this pull request unmergeable. Please resolve the merge conflicts. |
@haircommander needs a rebase. |
As it stands, createconfig is a huge struct. This works fine when the only caller is when we create a container with a fully created config. However, if we wish to share code for security and namespace configuration, a single large struct becomes unweildy, as well as difficult to configure with the single createConfigToOCISpec function. This PR breaks up namespace and security configuration into their own structs, with the eventual goal of allowing the namespace/security fields to be configured by the pod create cli, and allow the infra container to share this with the pod's containers. Signed-off-by: Peter Hunt <[email protected]>
f413c7f
to
dcf3c74
Compare
/lgtm |
As it stands, createconfig is a huge struct. This works fine when the only caller is when we create a container with a fully created config. However, if we wish to share code for security and namespace configuration, a single large struct becomes unweildy, as well as difficult to configure with the single createConfigToOCISpec function.
This PR breaks up namespace and security configuration into their own structs, with the eventual goal of allowing the namespace/security fields to be configured by the pod create cli, and allow the infra container to share this with the pod's containers. This will solve many requests (#3837, #2957, #2808) of further customizing pod creation.
This is NOT DONE AT ALL. but, I am putting the beginnings here for people to tell me their thoughts about the design, approach etc. The next steps include: