File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
internal/controllers/topology/cluster Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,12 @@ type Reconciler struct {
9494}
9595
9696func (r * Reconciler ) SetupWithManager (ctx context.Context , mgr ctrl.Manager , options controller.Options ) error {
97- if r .Client == nil || r .APIReader == nil || r .ClusterCache == nil || r .RuntimeClient == nil {
98- return errors .New ("Client, APIReader, ClusterCache and RuntimeClient must not be nil" )
97+ if r .Client == nil || r .APIReader == nil || r .ClusterCache == nil {
98+ return errors .New ("Client, APIReader and ClusterCache must not be nil" )
99+ }
100+
101+ if feature .Gates .Enabled (feature .RuntimeSDK ) && r .RuntimeClient == nil {
102+ return errors .New ("RuntimeClient must not be nil" )
99103 }
100104
101105 r .predicateLog = ctrl .LoggerFrom (ctx ).WithValues ("controller" , "topology/cluster" )
You can’t perform that action at this time.
0 commit comments