• Kubernetes Submit Queue's avatar
    Merge pull request #40385 from ncdc/shared-informers-02-swap-existing · 9abfa6b4
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Replace hand-written informers with generated ones
    
    Replace existing uses of hand-written informers with generated ones.
    Follow-up commits will switch the use of one-off informers to shared
    informers.
    
    This is a precursor to #40097. That PR will switch one-off informers to shared informers for the majority of the code base (but not quite all of it...).
    
    NOTE: this does create a second set of shared informers in the kube-controller-manager. This will be resolved back down to a single factory once #40097 is reviewed and merged.
    
    There are a couple of places where I expanded the # of caches we wait for in the calls to `WaitForCacheSync` - please pay attention to those. I also added in a commented-out wait in the attach/detach controller. If @kubernetes/sig-storage-pr-reviews is ok with enabling the waiting, I'll do it (I'll just need to tweak an integration test slightly).
    
    @deads2k @sttts @smarterclayton @liggitt @soltysh @timothysc @lavalamp @wojtek-t @gmarek @sjenning @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
    9abfa6b4
controller_utils.go 9.75 KB