diff --git a/cmd/k8s.go b/cmd/k8s.go index e23cedab..adc95432 100644 --- a/cmd/k8s.go +++ b/cmd/k8s.go @@ -30,11 +30,7 @@ func (k8s *k8s) watchForPods(podManager kcache.ResourceEventHandler) kcache.Stor k8s.createPodLW(), &api.Pod{}, resyncPeriod, - kcache.ResourceEventHandlerFuncs{ - AddFunc: podManager.OnAdd, - DeleteFunc: podManager.OnDelete, - UpdateFunc: podManager.OnUpdate, - }, + podManager, ) go podController.Run(wait.NeverStop) return podStore @@ -50,11 +46,7 @@ func (k8s *k8s) watchForNamespaces(nsManager kcache.ResourceEventHandler) kcache k8s.createNamespaceLW(), &api.Namespace{}, resyncPeriod, - kcache.ResourceEventHandlerFuncs{ - AddFunc: nsManager.OnAdd, - DeleteFunc: nsManager.OnDelete, - UpdateFunc: nsManager.OnUpdate, - }, + nsManager, ) go nsController.Run(wait.NeverStop) return nsStore diff --git a/cmd/server.go b/cmd/server.go index a03eb3dd..e0c059ec 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -93,6 +93,7 @@ func (s *Server) debugStoreHandler(w http.ResponseWriter, r *http.Request) { if err != nil { log.Errorf("Error converting debug map to json: %+v", err) http.Error(w, err.Error(), http.StatusInternalServerError) + return } w.Write(o)