<p dir="auto">To work around <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="128599581" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/20096" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/20096/hovercard" href="https://github.com/kubernetes/kubernetes/issues/20096">#20096</a> we introduced a --hairpin-mode flag that flips cbr0 to promiscuous mode. Users of kubenet run with --configure-cbr0=false, so before we push kubenet to production we need to decide how to handle this.</p>
<p dir="auto">If we decided to stick with promiscuous mode, kubenet should set it on whatever bridge it creates. We will (hopefully) not have to continue relying on promiscuous mode on newer kernel versions. Maybe it still makes sense to do in the interim? or maybe we can push it down into the CNI bridge driver (unsure of a valid generic use case to make a bridge promiscuous)?</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yifan-gu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yifan-gu">@yifan-gu</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dcbw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dcbw">@dcbw</a> @kubernetes/sig-network</p>
<p dir="auto">This block of code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    klet.volumePluginMgr, err =
        NewInitializedVolumePluginMgr(klet, volumePlugins)
    if err != nil {
        return nil, err
    }

    klet.volumeManager, err = volumemanager.NewVolumeManager(
        enableControllerAttachDetach,
        hostname,
        klet.podManager,
        klet.kubeClient,
        klet.volumePluginMgr,
        klet.containerRuntime,
        mounter)"><pre class="notranslate"><code class="notranslate">    klet.volumePluginMgr, err =
        NewInitializedVolumePluginMgr(klet, volumePlugins)
    if err != nil {
        return nil, err
    }

    klet.volumeManager, err = volumemanager.NewVolumeManager(
        enableControllerAttachDetach,
        hostname,
        klet.podManager,
        klet.kubeClient,
        klet.volumePluginMgr,
        klet.containerRuntime,
        mounter)
</code></pre></div>
<p dir="auto">Appears twice in <code class="notranslate">NewMainKubelet</code>, in <code class="notranslate">pkg/kubelet/kubelet.go</code>. This seems wrong.<br>
Most-likely, the duplicate before <code class="notranslate">switch containerRuntime</code> is the one that should be removed, because that switch statement is where <code class="notranslate">klet.containerRuntime</code> is set.</p>