File tree 1 file changed +6
-2
lines changed
internal/controllers/topology/cluster
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,12 @@ type Reconciler struct {
94
94
}
95
95
96
96
func (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" )
99
103
}
100
104
101
105
r .predicateLog = ctrl .LoggerFrom (ctx ).WithValues ("controller" , "topology/cluster" )
You can’t perform that action at this time.
0 commit comments