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

pkg/config: new fields for better pasta integration #1464

Merged
merged 2 commits into from
May 23, 2023

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented May 10, 2023

pkg/config: add pasta_options field

Users way wish to configure a set of default options that should be used
when running pasta. Options that are given on the cli will be appended,
however the implementation of this needs to happen in podman.

For slirp4netns we already support the network_cmd_options field.

pkg/config: add default_rootless_network_cmd field

Add a new field to the network section to allow users to set the default
network program which is used when running rootless containers.
This should be used when you run something like --network private or
--network default as rootless user.

The current default is slirp4netns so we keep that for now. Once I
integrate pasta in the rootless netns then we can consider switching the
default to pasta.

This setting will also be useful then for distros who may not ship pasta
so that they could set it back to slirp if needed.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented May 10, 2023

LGTM

Users way wish to configure a set of default options that should be used
when running pasta. Options that are given on the cli will be appended,
however the implementation of this needs to happen in podman.

For slirp4netns we already support the network_cmd_options field.

Signed-off-by: Paul Holzinger <[email protected]>
Add a new field to the network section to allow users to set the default
network program which is used when running rootless containers.
This should be used when you run something like --network private or
--network default as rootless user.

The current default is slirp4netns so we keep that for now. Once I
integrate pasta in the rootless netns then we can consider switching the
default to pasta.

This setting will also be useful then for distros who may not ship pasta
so that they could set it back to slirp if needed.

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member Author

Luap99 commented May 23, 2023

@vrothberg PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

@Luap99 can you elaborate why sharing network_cmd_options doesn't work? If I set default_rootless_network_cmd="pasta", I would expect network_cmd_options to work.

@Luap99
Copy link
Member Author

Luap99 commented May 23, 2023

@Luap99 can you elaborate why sharing network_cmd_options doesn't work? If I set default_rootless_network_cmd="pasta", I would expect network_cmd_options to work.

Sure you could reuse it but that just breaks completely if users want to use both --network slirp4netns and --network pasta for different containers at the same time.

@vrothberg
Copy link
Member

Thanks, sounds like a legit use case!

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit 53220b2 into containers:main May 23, 2023
6 checks passed
@Luap99 Luap99 deleted the pasta-config branch May 23, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants