mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #54460 from yanxuean/cnibindir
Automatic merge from submit-queue (batch tested with PRs 54460, 55258, 54858, 55506, 55510). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. redendancy code and error log message in cni **What this PR does / why we need it**: redendancy code and error log message in cni **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` /sig-node
This commit is contained in:
commit
f14c0382e4
@ -903,14 +903,13 @@ func RunDockershim(f *options.KubeletFlags, c *kubeletconfiginternal.KubeletConf
|
|||||||
r.ImagePullProgressDeadline.Duration)
|
r.ImagePullProgressDeadline.Duration)
|
||||||
|
|
||||||
// Initialize network plugin settings.
|
// Initialize network plugin settings.
|
||||||
binDir := r.CNIBinDir
|
|
||||||
nh := &kubelet.NoOpLegacyHost{}
|
nh := &kubelet.NoOpLegacyHost{}
|
||||||
pluginSettings := dockershim.NetworkPluginSettings{
|
pluginSettings := dockershim.NetworkPluginSettings{
|
||||||
HairpinMode: kubeletconfiginternal.HairpinMode(c.HairpinMode),
|
HairpinMode: kubeletconfiginternal.HairpinMode(c.HairpinMode),
|
||||||
NonMasqueradeCIDR: f.NonMasqueradeCIDR,
|
NonMasqueradeCIDR: f.NonMasqueradeCIDR,
|
||||||
PluginName: r.NetworkPluginName,
|
PluginName: r.NetworkPluginName,
|
||||||
PluginConfDir: r.CNIConfDir,
|
PluginConfDir: r.CNIConfDir,
|
||||||
PluginBinDir: binDir,
|
PluginBinDir: r.CNIBinDir,
|
||||||
MTU: int(r.NetworkPluginMTU),
|
MTU: int(r.NetworkPluginMTU),
|
||||||
LegacyRuntimeHost: nh,
|
LegacyRuntimeHost: nh,
|
||||||
}
|
}
|
||||||
|
@ -577,13 +577,12 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: These need to become arguments to a standalone docker shim.
|
// TODO: These need to become arguments to a standalone docker shim.
|
||||||
binDir := crOptions.CNIBinDir
|
|
||||||
pluginSettings := dockershim.NetworkPluginSettings{
|
pluginSettings := dockershim.NetworkPluginSettings{
|
||||||
HairpinMode: hairpinMode,
|
HairpinMode: hairpinMode,
|
||||||
NonMasqueradeCIDR: nonMasqueradeCIDR,
|
NonMasqueradeCIDR: nonMasqueradeCIDR,
|
||||||
PluginName: crOptions.NetworkPluginName,
|
PluginName: crOptions.NetworkPluginName,
|
||||||
PluginConfDir: crOptions.CNIConfDir,
|
PluginConfDir: crOptions.CNIConfDir,
|
||||||
PluginBinDir: binDir,
|
PluginBinDir: crOptions.CNIBinDir,
|
||||||
MTU: int(crOptions.NetworkPluginMTU),
|
MTU: int(crOptions.NetworkPluginMTU),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ func (plugin *cniNetworkPlugin) deleteFromNetwork(network *cniNetwork, podName s
|
|||||||
|
|
||||||
func (plugin *cniNetworkPlugin) buildCNIRuntimeConf(podName string, podNs string, podSandboxID kubecontainer.ContainerID, podNetnsPath string) (*libcni.RuntimeConf, error) {
|
func (plugin *cniNetworkPlugin) buildCNIRuntimeConf(podName string, podNs string, podSandboxID kubecontainer.ContainerID, podNetnsPath string) (*libcni.RuntimeConf, error) {
|
||||||
glog.V(4).Infof("Got netns path %v", podNetnsPath)
|
glog.V(4).Infof("Got netns path %v", podNetnsPath)
|
||||||
glog.V(4).Infof("Using netns path %v", podNs)
|
glog.V(4).Infof("Using podns path %v", podNs)
|
||||||
|
|
||||||
rt := &libcni.RuntimeConf{
|
rt := &libcni.RuntimeConf{
|
||||||
ContainerID: podSandboxID.ID,
|
ContainerID: podSandboxID.ID,
|
||||||
|
Loading…
Reference in New Issue
Block a user