Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for AddEventHandler (0.34 sec)

  1. cni/pkg/nodeagent/informers.go

    		controllers.WithMaxAttempts(5),
    	)
    	// We only need to handle pods on our node
    	s.pods = kclient.NewFiltered[*corev1.Pod](kubeClient, kclient.Filter{FieldSelector: "spec.nodeName=" + NodeName})
    	s.pods.AddEventHandler(controllers.FromEventHandler(func(o controllers.Event) {
    		s.queue.Add(o)
    	}))
    
    	// Namespaces could be anything though, so we watch all of those
    	//
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  2. architecture/networking/controllers.md

    Construction should create informers (via `kclient.New`), setup a queue (via `controllers.NewQueue`), and register event handlers on the informers.
    Often, these handlers are adding something to the queue like `client.AddEventHandler(controllers.ObjectHandler(queue.AddObject))`.
    Construction should NOT actually start running all of these things, do I/O, or block in anyway.
    
    Running the controller actually starts processing things.
    Plain Text
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Feb 09 17:41:25 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  3. cni/pkg/repair/repaircontroller.go

    		FieldSelector: strings.Join(fieldSelectors, ","),
    	})
    	c.queue = controllers.NewQueue("repair pods",
    		controllers.WithReconciler(c.Reconcile),
    		controllers.WithMaxAttempts(5))
    	c.pods.AddEventHandler(controllers.ObjectHandler(c.queue.AddObject))
    
    	return c, nil
    }
    
    func (c *Controller) Run(stop <-chan struct{}) {
    	kube.WaitForCacheSync("repair controller", stop, c.pods.HasSynced)
    	c.queue.Run(stop)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  4. CHANGELOG/CHANGELOG-1.9.md

        * authenticates the kubelet to the API server.
    * change AddEventHandlerWithResyncPeriod to AddEventHandler in factory.go ([#51582](https://github.com/kubernetes/kubernetes/pull/51582), [@jiulongzaitian](https://github.com/jiulongzaitian))
    Plain Text
    - Registered: Fri Apr 26 09:05:10 GMT 2024
    - Last Modified: Tue Nov 16 10:46:27 GMT 2021
    - 313.7K bytes
    - Viewed (0)
Back to top