Adding informers to support HPA,PDB and Jobs (#159)
* Adding informers to support HPA,PDB and Jobs * remove blines
This commit is contained in:
Родитель
3e081f1d33
Коммит
b9cd2e2989
|
@ -104,20 +104,20 @@ func (i *kubeWatcherImpl) startWellKnownInformers(kubeclient kubernetes.Interfac
|
|||
i.informerFactory.Apps().V1().Deployments().Informer().AddEventHandler(i.getEventHandlerForResource("Deployment"))
|
||||
i.informerFactory.Apps().V1().ReplicaSets().Informer().AddEventHandler(i.getEventHandlerForResource("ReplicaSet"))
|
||||
i.informerFactory.Apps().V1().StatefulSets().Informer().AddEventHandler(i.getEventHandlerForResource("StatefulSet"))
|
||||
|
||||
i.informerFactory.Core().V1().ConfigMaps().Informer().AddEventHandler(i.getEventHandlerForResource("ConfigMap"))
|
||||
i.informerFactory.Core().V1().Endpoints().Informer().AddEventHandler(i.getEventHandlerForResource("Endpoint"))
|
||||
i.informerFactory.Core().V1().Events().Informer().AddEventHandler(i.getEventHandlerForResource("Event"))
|
||||
i.informerFactory.Autoscaling().V1().HorizontalPodAutoscalers().Informer().AddEventHandler(i.getEventHandlerForResource("HorizontalPodAutoscaler"))
|
||||
i.informerFactory.Batch().V1().Jobs().Informer().AddEventHandler(i.getEventHandlerForResource("Job"))
|
||||
i.informerFactory.Core().V1().Namespaces().Informer().AddEventHandler(i.getEventHandlerForResource("Namespace"))
|
||||
i.informerFactory.Core().V1().Nodes().Informer().AddEventHandler(i.getEventHandlerForResource("Node"))
|
||||
i.informerFactory.Core().V1().PersistentVolumeClaims().Informer().AddEventHandler(i.getEventHandlerForResource("PersistentVolumeClaim"))
|
||||
i.informerFactory.Core().V1().PersistentVolumes().Informer().AddEventHandler(i.getEventHandlerForResource("PersistentVolume"))
|
||||
i.informerFactory.Core().V1().Pods().Informer().AddEventHandler(i.getEventHandlerForResource("Pod"))
|
||||
i.informerFactory.Policy().V1beta1().PodDisruptionBudgets().Informer().AddEventHandler(i.getEventHandlerForResource("PodDisruptionBudget"))
|
||||
i.informerFactory.Core().V1().Services().Informer().AddEventHandler(i.getEventHandlerForResource("Service"))
|
||||
i.informerFactory.Core().V1().ReplicationControllers().Informer().AddEventHandler(i.getEventHandlerForResource("ReplicationController"))
|
||||
|
||||
i.informerFactory.Storage().V1().StorageClasses().Informer().AddEventHandler(i.getEventHandlerForResource("StorageClass"))
|
||||
|
||||
i.informerFactory.Start(i.stopChan)
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ func (i *kubeWatcherImpl) getResourceAsJsonString(kind string, obj interface{})
|
|||
}
|
||||
|
||||
func (i *kubeWatcherImpl) refreshCrdInformers(masterURL string, kubeContext string) {
|
||||
for _ = range i.refreshCrd.C {
|
||||
for range i.refreshCrd.C {
|
||||
glog.Infof("Starting to refresh CRD informers")
|
||||
err := i.startCustomInformers(masterURL, kubeContext)
|
||||
if err != nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче