Merge pull request #2658 from aledbf/initial-configuration
Do not wait informer initialization to read configuration
This commit is contained in:
commit
da7bf10631
1 changed files with 7 additions and 0 deletions
|
@ -494,6 +494,13 @@ func New(checkOCSP bool,
|
|||
store.informers.ConfigMap.AddEventHandler(cmEventHandler)
|
||||
store.informers.Service.AddEventHandler(cache.ResourceEventHandlerFuncs{})
|
||||
|
||||
// do not wait for informers to read the configmap configuration
|
||||
cm, err := client.CoreV1().ConfigMaps(namespace).Get(configmap, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
glog.Warningf("Unexpected error reading configuration configmap: %v", err)
|
||||
}
|
||||
store.setConfig(cm)
|
||||
|
||||
return store
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue