From f21d2dde5a0b7b124407ab504c289c6a36f2f3d7 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 28 Jul 2016 12:34:21 +0100 Subject: [PATCH] Add comment per review feedback --- pkg/kubelet/kubelet.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 4672f9c2636..79c02cfde1d 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -428,6 +428,12 @@ func NewMainKubelet( imageBackOff, serializeImagePulls, enableCustomMetrics, + // If using "kubenet", the Kubernetes network plugin that wraps + // CNI's bridge plugin, it knows how to set the hairpin veth flag + // so we tell the container runtime to back away from setting it. + // If the kubelet is started with any other plugin we can't be + // sure it handles the hairpin case so we instruct the docker + // runtime to set the flag instead. klet.hairpinMode == componentconfig.HairpinVeth && networkPluginName != "kubenet", seccompProfileRoot, containerRuntimeOptions...,