fix: allow running cronjob tutorial w/o webhoooks
@@ -103,10 +103,6 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "CronJob")
os.Exit(1)
}
- if err = (&batchv1.CronJob{}).SetupWebhookWithManager(mgr); err != nil {
- setupLog.Error(err, "unable to create webhook", "webhook", "CronJob")
- os.Exit(1)
- }
/*
We'll also set up webhooks for our type, which we'll talk about next.
@@ -118,7 +114,7 @@ func main() {
*/
if os.Getenv("ENABLE_WEBHOOKS") != "false" {
if err = (&batchv1.CronJob{}).SetupWebhookWithManager(mgr); err != nil {
- setupLog.Error(err, "unable to create webhook", "webhook", "Captain")
+ setupLog.Error(err, "unable to create webhook", "webhook", "CronJob")
os.Exit(1)
}
}
