From fef621a2541080cb9ab8f381394204c60d22daa6 Mon Sep 17 00:00:00 2001 From: Rajat Chopra Date: Wed, 23 Sep 2015 09:19:31 -0700 Subject: [PATCH] TODO added to optimize Status call to plugin --- pkg/kubelet/network/cni/cni.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kubelet/network/cni/cni.go b/pkg/kubelet/network/cni/cni.go index ff92a59ff4d..8eda34971dd 100644 --- a/pkg/kubelet/network/cni/cni.go +++ b/pkg/kubelet/network/cni/cni.go @@ -128,6 +128,8 @@ func (plugin *cniNetworkPlugin) TearDownPod(namespace string, name string, id ku return plugin.defaultNetwork.deleteFromNetwork(name, namespace, string(id), netns) } +// TODO: Use the addToNetwork function to obtain the IP of the Pod. That will assume idempotent ADD call to the plugin. +// Also fix the runtime's call to Status function to be done only in the case that the IP is lost, no need to do periodic calls func (plugin *cniNetworkPlugin) Status(namespace string, name string, id kubeletTypes.DockerID) (*network.PodNetworkStatus, error) { runtime, ok := plugin.host.GetRuntime().(*dockertools.DockerManager) if !ok {