Added support for pods and replication controllers to watchers (#216)

This commit is contained in:
Javier Castellanos
2017-06-01 10:49:57 -07:00
committed by Soam Vasani
parent 75d65adcc0
commit cde2f26a9d
+4
View File
@@ -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)