Provisioning: discontinue use of service identity based background tasks when onlyApiServer is true (#112634)
* Skip informers if Provisioning disable controllers is enabled * Hydrate requester correctly for Grafana Live * revert to old code because eventualRestConfig provider issues --------- Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
This commit is contained in:
co-authored by
Charandas Batra
parent
fbc81d2fd0
commit
c9daec7b6d
@@ -648,11 +648,6 @@ func (b *APIBuilder) GetPostStartHooks() (map[string]genericapiserver.PostStartH
|
||||
return err
|
||||
}
|
||||
|
||||
// Informer with resync interval used for health check and reconciliation
|
||||
sharedInformerFactory := informers.NewSharedInformerFactory(c, 60*time.Second)
|
||||
repoInformer := sharedInformerFactory.Provisioning().V0alpha1().Repositories()
|
||||
jobInformer := sharedInformerFactory.Provisioning().V0alpha1().Jobs()
|
||||
|
||||
b.client = c.ProvisioningV0alpha1()
|
||||
|
||||
// Initialize the API client-based job store
|
||||
@@ -669,6 +664,10 @@ func (b *APIBuilder) GetPostStartHooks() (map[string]genericapiserver.PostStartH
|
||||
return nil
|
||||
}
|
||||
|
||||
// Informer with resync interval used for health check and reconciliation
|
||||
sharedInformerFactory := informers.NewSharedInformerFactory(c, 60*time.Second)
|
||||
repoInformer := sharedInformerFactory.Provisioning().V0alpha1().Repositories()
|
||||
jobInformer := sharedInformerFactory.Provisioning().V0alpha1().Jobs()
|
||||
go repoInformer.Informer().Run(postStartHookCtx.Done())
|
||||
go jobInformer.Informer().Run(postStartHookCtx.Done())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user