Skip to content

Commit

Permalink
Fix webhook setup error in restricted-mode (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
cagric0 committed May 2, 2024
1 parent 3a562b5 commit 79a0181
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ func main() {

setupWithWebhookOrDie(mgr)

if err = (&hazelcastcomv1alpha1.UserCodeNamespace{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "UserCodeNamespace")
os.Exit(1)
}
//+kubebuilder:scaffold:builder

if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
Expand Down Expand Up @@ -396,6 +392,10 @@ func setupWithWebhookOrDie(mgr ctrl.Manager) {
setupLog.Error(err, "unable to create webhook", "webhook", "WanSync")
os.Exit(1)
}
if err := (&hazelcastcomv1alpha1.UserCodeNamespace{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "UserCodeNamespace")
os.Exit(1)
}
}

func setManagerWatchedNamespaces(mgrOptions *ctrl.Options, operatorNamespace string) util.WatchedNsType {
Expand Down

0 comments on commit 79a0181

Please sign in to comment.