-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add private network implementation for podman #9716
Conversation
args = append(args, "--icc") | ||
|
||
// adding MTU option because #9528 | ||
if mtu > 0 { |
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.
could podman network benefit from specifying the MTU ? (this fixed the issue of minikube in cloud shell not being able to pull large images like golang:1.15
due to different cloud shell MTUs
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.
It might, but it will not benefit from "com.docker.network.driver.mtu" at any rate.
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.
It will be available in the future (like podman 3.0 or so), with a similar option
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.
maybe add a comment, to remember TODO add mtu for podman 3 (with an issue liunk)
@@ -136,12 +138,16 @@ type netInfo struct { | |||
} | |||
|
|||
// if exists returns subnet, gateway and mtu | |||
func dockerNetworkInspect(name string) (netInfo, error) { | |||
func dockerNetworkInspect(ociBin string, name string) (netInfo, error) { |
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.
does this need to be renamed to networkInspect ? if it is working for both podman and docker ?
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.
There is "docker" all over the place, I didn't rename any functions.
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 mean if we are using it for both docker and podman now (unlike before) we should rename it to networkInspect
Currently it is not possible to configure MTU: // HostLocalBridge describes a configuration for a bridge plugin
// https://github.com/containernetworking/plugins/tree/master/plugins/main/bridge#network-configuration-reference
type HostLocalBridge struct {
PluginType string `json:"type"`
BrName string `json:"bridge,omitempty"`
IsGW bool `json:"isGateway"`
IsDefaultGW bool `json:"isDefaultGateway,omitempty"`
ForceAddress bool `json:"forceAddress,omitempty"`
IPMasq bool `json:"ipMasq,omitempty"`
MTU int `json:"mtu,omitempty"`
HairpinMode bool `json:"hairpinMode,omitempty"`
PromiscMode bool `json:"promiscMode,omitempty"`
Vlan int `json:"vlan,omitempty"`
IPAM IPAMHostLocalConf `json:"ipam"`
} // NewHostLocalBridge creates a new LocalBridge for host-local
func NewHostLocalBridge(name string, isGateWay, isDefaultGW, ipMasq bool, ipamConf IPAMHostLocalConf) *HostLocalBridge {
hostLocalBridge := HostLocalBridge{
PluginType: "bridge",
BrName: name,
IPMasq: ipMasq,
HairpinMode: true,
IPAM: ipamConf,
}
if isGateWay {
hostLocalBridge.IsGW = true
}
if isDefaultGW {
hostLocalBridge.IsDefaultGW = true
}
return &hostLocalBridge
} So the feature needs to be added to podman first. |
Most of it the same as docker, except for the options. i.e. libnetwork "bridge" plugin vs. cni "bridge" plugin
5195dd8
to
fee0f53
Compare
Another request for MTU: containers/podman#8454 See #9716 (comment) |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund, medyagh 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 |
kvm2 Driver |
Support for MTU will be available in Podman 3.0, can revisit it again then... |
Most of it the same as docker, except for the options.
i.e. libnetwork "bridge" plugin vs. cni "bridge" plugin
Does not remove the network when deleting
Closes #9714