From cde2f26a9d4442384a1e8f1419cc7aa6bdfd88bf Mon Sep 17 00:00:00 2001 From: Javier Castellanos Date: Thu, 1 Jun 2017 10:49:57 -0700 Subject: [PATCH] Added support for pods and replication controllers to watchers (#216) --- kubewatcher/kubewatcher.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kubewatcher/kubewatcher.go b/kubewatcher/kubewatcher.go index c7198257..97e39c14 100644 --- a/kubewatcher/kubewatcher.go +++ b/kubewatcher/kubewatcher.go @@ -161,6 +161,10 @@ func createKubernetesWatch(kubeClient *kubernetes.Clientset, w *fission.Watch, r wi, err = kubeClient.Core().Pods(w.Namespace).Watch(listOptions) case "SERVICE": wi, err = kubeClient.Core().Services(w.Namespace).Watch(listOptions) + case "REPLICATIONCONTROLLER": + wi, err = kubeClient.Core().ReplicationControllers(w.Namespace).Watch(listOptions) + case "JOB": + wi, err = kubeClient.Batch().Jobs(w.Namespace).Watch(listOptions) default: msg := fmt.Sprintf("Error: unknown obj type '%v'", w.ObjType) log.Println(msg)