1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 15:37:19 +00:00

754 ensuring CRD syncs before kyverno starts

This commit is contained in:
shravan 2020-03-25 02:20:04 +05:30
parent a369675e08
commit 63e7533a49

View file

@ -52,6 +52,9 @@ func (c *crdSync) Run(workers int, stopCh <-chan struct{}) {
glog.V(4).Infof("Could not set custom OpenApi document: %v\n", err) glog.V(4).Infof("Could not set custom OpenApi document: %v\n", err)
} }
// Sync CRD before kyverno starts
c.sync()
for i := 0; i < workers; i++ { for i := 0; i < workers; i++ {
go wait.Until(c.sync, time.Second*10, stopCh) go wait.Until(c.sync, time.Second*10, stopCh)
} }