pkg/webhook/configmaps
Matt Moore e2ee5bed78
Start the webhook before informers sync. (#1180)
* Start the webhook before informers sync.

Some webhooks (e.g. conversion) are required to list resources, so by delaying those until after informers have synced, we create a deadlock when they run in the same process.  This change has two key parts:
1. Start the webhook immediately when our process starts, and issue a callback from sharedmain when the informers have synced.
2. Block `Admit` calls until informers have synced (all conversions are exempt), unless they have been designated by implementing `webhook.StatelessAdmissionController`.

Our built-in admission controllers (defaulting, validation, configmap validation) have all been marked as stateless, the main case where we want to block `Admit` calls is when we require the informer to have synchronized to populate indices for Bindings.

* Add missing err declaration
2020-03-30 18:14:50 -07:00
..
configmaps.go Start the webhook before informers sync. (#1180) 2020-03-30 18:14:50 -07:00
configmaps_test.go Scope the webhook secret informers to the system namespace. (#1158) 2020-03-12 18:29:29 -07:00
controller.go Scope the webhook secret informers to the system namespace. (#1158) 2020-03-12 18:29:29 -07:00
table_test.go Scope the webhook secret informers to the system namespace. (#1158) 2020-03-12 18:29:29 -07:00