• k8s-merge-robot's avatar
    Merge pull request #28379 from deads2k/allow-late-joins · 4ee877c2
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    allow handler to join after the informer has started
    
    This allows an event handler to join after a SharedInformer has started.  It can't add any indexes, but it can add its reaction functions.
    
    This works by 
     1. stopping the flow of events from the reflector (thus stopping updates to our store)
     1. registering the new handler
     1. sending synthetic "add" events to the new handler only
     1. unblocking the flow of events
    
    It would be possible to 
     1. block
     1. list
     1. add recorder
     1. unblock
     1. play list to as-yet unregistered handler
     1. block
     1. remove recorder
     1. play recording
     1. add new handler
     1. unblock
    
    But that is considerably more complicated.  I'd rather not start there since this ought to be the exception rather than the rule.
    
    @wojtek-t who requested this power in the initial review
    @smarterclayton @liggitt I think this resolves our all-in-one ordering problem.
    @hongchaodeng since this came up on the call
    4ee877c2
Name
Last commit
Last update
..
daemon Loading commit data...
deployment Loading commit data...
endpoint Loading commit data...
framework Loading commit data...
garbagecollector Loading commit data...
job Loading commit data...
namespace Loading commit data...
node Loading commit data...
petset Loading commit data...
podautoscaler Loading commit data...
podgc Loading commit data...
replicaset Loading commit data...
replication Loading commit data...
resourcequota Loading commit data...
route Loading commit data...
service Loading commit data...
serviceaccount Loading commit data...
volume Loading commit data...
OWNERS Loading commit data...
controller_utils.go Loading commit data...
controller_utils_test.go Loading commit data...
doc.go Loading commit data...
lookup_cache.go Loading commit data...