From 9c24131b4e256cb27c307680de2aad44a82a6cf6 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Mon, 21 Sep 2015 14:25:35 +0200 Subject: [PATCH] Remove unused Watch code in executor --- contrib/mesos/pkg/executor/executor.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/contrib/mesos/pkg/executor/executor.go b/contrib/mesos/pkg/executor/executor.go index 0c3be6bcf2c..5668a79e201 100644 --- a/contrib/mesos/pkg/executor/executor.go +++ b/contrib/mesos/pkg/executor/executor.go @@ -42,7 +42,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/util" - "k8s.io/kubernetes/pkg/watch" ) const ( @@ -109,7 +108,6 @@ type KubernetesExecutor struct { lock sync.RWMutex sourcename string client *client.Client - events <-chan watch.Event done chan struct{} // signals shutdown outgoing chan func() (mesos.Status, error) // outgoing queue to the mesos driver dockerClient dockertools.DockerInterface @@ -131,7 +129,6 @@ type Config struct { Updates chan<- interface{} // to send pod config updates to the kubelet SourceName string APIClient *client.Client - Watch watch.Interface Docker dockertools.DockerInterface ShutdownAlert func() SuicideTimeout time.Duration @@ -169,20 +166,6 @@ func New(config Config) *KubernetesExecutor { staticPodsConfigPath: config.StaticPodsConfigPath, } - //TODO(jdef) do something real with these events.. - if config.Watch != nil { - events := config.Watch.ResultChan() - if events != nil { - go func() { - for e := range events { - // e ~= watch.Event { ADDED, *api.Event } - log.V(1).Info(e) - } - }() - k.events = events - } - } - // watch pods from the given pod ListWatch _, k.podController = framework.NewInformer(config.PodLW, &api.Pod{}, podRelistPeriod, &framework.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) {