Commit 9c24131b authored by Dr. Stefan Schimanski's avatar Dr. Stefan Schimanski

Remove unused Watch code in executor

parent 039acb8c
...@@ -42,7 +42,6 @@ import ( ...@@ -42,7 +42,6 @@ import (
"k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/container"
"k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/dockertools"
"k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/watch"
) )
const ( const (
...@@ -109,7 +108,6 @@ type KubernetesExecutor struct { ...@@ -109,7 +108,6 @@ type KubernetesExecutor struct {
lock sync.RWMutex lock sync.RWMutex
sourcename string sourcename string
client *client.Client client *client.Client
events <-chan watch.Event
done chan struct{} // signals shutdown done chan struct{} // signals shutdown
outgoing chan func() (mesos.Status, error) // outgoing queue to the mesos driver outgoing chan func() (mesos.Status, error) // outgoing queue to the mesos driver
dockerClient dockertools.DockerInterface dockerClient dockertools.DockerInterface
...@@ -131,7 +129,6 @@ type Config struct { ...@@ -131,7 +129,6 @@ type Config struct {
Updates chan<- interface{} // to send pod config updates to the kubelet Updates chan<- interface{} // to send pod config updates to the kubelet
SourceName string SourceName string
APIClient *client.Client APIClient *client.Client
Watch watch.Interface
Docker dockertools.DockerInterface Docker dockertools.DockerInterface
ShutdownAlert func() ShutdownAlert func()
SuicideTimeout time.Duration SuicideTimeout time.Duration
...@@ -169,20 +166,6 @@ func New(config Config) *KubernetesExecutor { ...@@ -169,20 +166,6 @@ func New(config Config) *KubernetesExecutor {
staticPodsConfigPath: config.StaticPodsConfigPath, 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 // watch pods from the given pod ListWatch
_, k.podController = framework.NewInformer(config.PodLW, &api.Pod{}, podRelistPeriod, &framework.ResourceEventHandlerFuncs{ _, k.podController = framework.NewInformer(config.PodLW, &api.Pod{}, podRelistPeriod, &framework.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) { AddFunc: func(obj interface{}) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment