diff --git a/cmd/gardener-extension-cri-resmgr/app/app.go b/cmd/gardener-extension-cri-resmgr/app/app.go index 1ddf78f..e1ec088 100644 --- a/cmd/gardener-extension-cri-resmgr/app/app.go +++ b/cmd/gardener-extension-cri-resmgr/app/app.go @@ -18,14 +18,11 @@ import ( "context" "fmt" - controllerconfig "sigs.k8s.io/controller-runtime/pkg/config" - // Local "github.com/intel/gardener-extension-cri-resmgr/pkg/controller/healthcheck" "github.com/intel/gardener-extension-cri-resmgr/pkg/controller/lifecycle" "github.com/intel/gardener-extension-cri-resmgr/pkg/options" - "k8s.io/utils/ptr" // Gardener extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller" @@ -53,7 +50,7 @@ func NewExtensionControllerCommand(ctx context.Context) *cobra.Command { } mgroptions := options.MgrOpts.Completed().Options() // For debugging purposes, do not recover from panics from Reconciller - mgroptions.Controller = controllerconfig.Controller{RecoverPanic: ptr.To(false)} + //mgroptions.Controller = controllerconfig.Controller{RecoverPanic: ptr.To(false)} mgr, err := manager.New(options.RestOptions.Completed().Config, mgroptions) if err != nil { return fmt.Errorf("could not instantiate controller-manager: %s", err) diff --git a/pkg/controller/lifecycle/add.go b/pkg/controller/lifecycle/add.go index c971635..8d992ef 100644 --- a/pkg/controller/lifecycle/add.go +++ b/pkg/controller/lifecycle/add.go @@ -112,7 +112,7 @@ func AddConfigMapWatchingControllerToManager(ctx context.Context, mgr manager.Ma FinalizerSuffix: consts.ExtensionType, // We're using the same finalizer as the original controller on purpose to "delete" only once without a need to wait for another "configs" controller } controllerOptions.Reconciler = extension.NewReconciler(mgr, configReconcilerArgs) - recoverPanic := false // TODO: make it configurable for debugging purposes !!?!? + recoverPanic := true // TODO: make it configurable for debugging purposes !!?!? controllerOptions.RecoverPanic = &recoverPanic controllerName := consts.ControllerName + consts.ConfigsSuffix