diff --git a/Makefile b/Makefile index 81e29d040..0ee9da656 100644 --- a/Makefile +++ b/Makefile @@ -320,7 +320,7 @@ test.integration: test.integration_bluegreen: @$(MAKE) _test.integration \ GATEWAY_OPERATOR_BLUEGREEN_CONTROLLER="true" \ - GOTESTFLAGS="-run=BlueGreen $(GOTESTFLAGS)" \ + GOTESTFLAGS="-run='BlueGreen|TestDataPlane' $(GOTESTFLAGS)" \ COVERPROFILE="coverage.integration-bluegreen.out" \ .PHONY: test.integration_provision_dataplane_fail diff --git a/controllers/dataplane/bluegreen_controller.go b/controllers/dataplane/bluegreen_controller.go index 4d0b59aa7..02252e50d 100644 --- a/controllers/dataplane/bluegreen_controller.go +++ b/controllers/dataplane/bluegreen_controller.go @@ -68,6 +68,11 @@ type BlueGreenReconciler struct { // SetupWithManager sets up the controller with the Manager. func (r *BlueGreenReconciler) SetupWithManager(mgr ctrl.Manager) error { + delegate, ok := r.DataPlaneController.(*Reconciler) + if !ok { + return fmt.Errorf("incorrect delegate controller type: %T", r.DataPlaneController) + } + delegate.eventRecorder = mgr.GetEventRecorderFor("dataplane") return DataPlaneWatchBuilder(mgr). Complete(r) }