Standardize creation of dynamichelper.Interface in pkg/operator
nilsanderselde opened this issue · 1 comments
nilsanderselde commented
Most of the controllers in the ARO operator that use dynamichelper.Interface
use one that is passed in from cmd/aro/operator.go
.
However, there are a couple places where dh
is created later:
- pkg/operator/controllers/genevalogging/genevalogging_controller.go in
Reconcile
function, with comment that it "currently saves us in the case that the controller runs before the SCC API is registered." - pkg/operator/controllers/routefix/routefix_controller.go in
deploy
function, with comment that it "currently saves us in the case that the controller runs before the SCC API is registered." - pkg/operator/controllers/workaround/workaround_controller.go in
NewReconciler
function. No comment indicating why.
In these places, if we ever really had to create dh
later (might have been copy/paste or just inconsistency), do we still have to?
Or, conversely, should we always create dh
at the lowest scope possible?