Operator fails with nil pointer dereference when CR validation is not passed (#1697)

This commit is contained in:
Dmitry Volodin 2021-11-24 14:19:30 +03:00 committed by GitHub
parent a6d4f23f90
commit fbd980af78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,9 @@ func NewController(controllerConfig *spec.ControllerConfig, controllerId string)
// disabling the sending of events also to the logoutput
// the operator currently duplicates a lot of log entries with this setup
// eventBroadcaster.StartLogging(logger.Infof)
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: myComponentName})
scheme := scheme.Scheme
acidv1.AddToScheme(scheme)
recorder := eventBroadcaster.NewRecorder(scheme, v1.EventSource{Component: myComponentName})
c := &Controller{
config: *controllerConfig,