Skip to content

Commit fbd980a

Browse files
authored
Operator fails with nil pointer dereference when CR validation is not passed (zalando#1697)
1 parent a6d4f23 commit fbd980a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/controller/controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ func NewController(controllerConfig *spec.ControllerConfig, controllerId string)
9595
// disabling the sending of events also to the logoutput
9696
// the operator currently duplicates a lot of log entries with this setup
9797
// eventBroadcaster.StartLogging(logger.Infof)
98-
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: myComponentName})
98+
scheme := scheme.Scheme
99+
acidv1.AddToScheme(scheme)
100+
recorder := eventBroadcaster.NewRecorder(scheme, v1.EventSource{Component: myComponentName})
99101

100102
c := &Controller{
101103
config: *controllerConfig,

0 commit comments

Comments
 (0)