fixes the way the informers are started in sample controller pkg
This commit is contained in:
parent
77742ea94c
commit
e55ca64dbd
@ -65,8 +65,10 @@ func main() {
|
|||||||
kubeInformerFactory.Apps().V1().Deployments(),
|
kubeInformerFactory.Apps().V1().Deployments(),
|
||||||
exampleInformerFactory.Samplecontroller().V1alpha1().Foos())
|
exampleInformerFactory.Samplecontroller().V1alpha1().Foos())
|
||||||
|
|
||||||
go kubeInformerFactory.Start(stopCh)
|
// notice that there is no need to run Start methods in a separate goroutine. (i.e. go kubeInformerFactory.Start(stopCh)
|
||||||
go exampleInformerFactory.Start(stopCh)
|
// Start method is non-blocking and runs all registered informers in a dedicated goroutine.
|
||||||
|
kubeInformerFactory.Start(stopCh)
|
||||||
|
exampleInformerFactory.Start(stopCh)
|
||||||
|
|
||||||
if err = controller.Run(2, stopCh); err != nil {
|
if err = controller.Run(2, stopCh); err != nil {
|
||||||
glog.Fatalf("Error running controller: %s", err.Error())
|
glog.Fatalf("Error running controller: %s", err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user