Documentation
¶
Overview ¶
Package namespaces controller
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller struct for informers
func NewController ¶
func NewController( namespaceInformer corev1informers.NamespaceInformer, sync namespaceSyncCallback, ) *Controller
NewController func for event handlers
func (*Controller) EnqueueNamespace ¶
func (c *Controller) EnqueueNamespace(obj interface{})
EnqueueNamespace takes a Namespace resource and converts it into a namespace/name string which is then put onto the work queue. This method should *not* be passed resources of any type other than Namespace.
func (*Controller) HandleObject ¶
func (c *Controller) HandleObject(obj interface{})
HandleObject will take any resource implementing metav1.Object and attempt to find the Namespace resource that 'owns' it. It does this by looking at the objects metadata.ownerReferences field for an appropriate OwnerReference. It then enqueues that Namespace resource to be processed. If the object does not have an appropriate OwnerReference, it will simply be skipped.
func (*Controller) Run ¶
func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error
Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.