Merge pull request #2658 from aledbf/initial-configuration

Do not wait informer initialization to read configuration
This commit is contained in:
k8s-ci-robot 2018-06-17 09:52:30 -07:00 committed by GitHub
commit da7bf10631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}