detect ENABLE_WEBHOOKS!=false
This commit is contained in:
parent
561e7fcc3a
commit
ac68889024
9
main.go
9
main.go
|
@ -75,9 +75,12 @@ 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 err = (&seaweedv1.Seaweed{}).SetupWebhookWithManager(mgr); err != nil {
|
|
||||||
setupLog.Error(err, "unable to create webhook", "webhook", "Seaweed")
|
if os.Getenv("ENABLE_WEBHOOKS") != "false" {
|
||||||
os.Exit(1)
|
if err = (&seaweedv1.Seaweed{}).SetupWebhookWithManager(mgr); err != nil {
|
||||||
|
setupLog.Error(err, "unable to create webhook", "webhook", "Seaweed")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// +kubebuilder:scaffold:builder
|
// +kubebuilder:scaffold:builder
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue