detect ENABLE_WEBHOOKS!=false
This commit is contained in:
parent
561e7fcc3a
commit
ac68889024
3
main.go
3
main.go
|
@ -75,10 +75,13 @@ func main() {
|
||||||
setupLog.Error(err, "unable to create controller", "controller", "Seaweed")
|
setupLog.Error(err, "unable to create controller", "controller", "Seaweed")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if os.Getenv("ENABLE_WEBHOOKS") != "false" {
|
||||||
if err = (&seaweedv1.Seaweed{}).SetupWebhookWithManager(mgr); err != nil {
|
if err = (&seaweedv1.Seaweed{}).SetupWebhookWithManager(mgr); err != nil {
|
||||||
setupLog.Error(err, "unable to create webhook", "webhook", "Seaweed")
|
setupLog.Error(err, "unable to create webhook", "webhook", "Seaweed")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// +kubebuilder:scaffold:builder
|
// +kubebuilder:scaffold:builder
|
||||||
|
|
||||||
setupLog.Info("starting manager")
|
setupLog.Info("starting manager")
|
||||||
|
|
Loading…
Reference in New Issue