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:
@@ -17,6 +17,8 @@ limitations under the License.
|
||||
package timer
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/fission/fission/crd"
|
||||
"github.com/fission/fission/publisher"
|
||||
)
|
||||
@@ -27,6 +29,11 @@ func Start(routerUrl string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = fissionClient.WaitForCRDs()
|
||||
if err != nil {
|
||||
log.Fatalf("Error waiting for CRDs: %v", err)
|
||||
}
|
||||
|
||||
poster := publisher.MakeWebhookPublisher(routerUrl)
|
||||
MakeTimerSync(fissionClient, MakeTimer(poster))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user