Fix components crash before crds creation (#602)
* Wait for CRDs creation for 30 sec when component start * Fix ensureCRD return nil while the error is not empty
This commit is contained in:
@@ -82,6 +82,11 @@ func Start(port int, executorUrl string) {
|
||||
log.Fatalf("Error connecting to kubernetes API: %v", err)
|
||||
}
|
||||
|
||||
err = fissionClient.WaitForCRDs()
|
||||
if err != nil {
|
||||
log.Fatalf("Error waiting for CRDs: %v", err)
|
||||
}
|
||||
|
||||
restClient := fissionClient.GetCrdClient()
|
||||
|
||||
executor := executorClient.MakeClient(executorUrl)
|
||||
|
||||
Reference in New Issue
Block a user