Skip to content

Commit 251e820

Browse files
authored
Return when NC is nil (#673)
1 parent 51a8884 commit 251e820

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cns/requestcontroller/kubecontroller/crdrequestcontroller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ func (crdRC *crdRequestController) initCNS() error {
189189
os.Exit(1)
190190
}
191191

192+
if nodeNetConfig == nil {
193+
logger.Errorf("NodeNetworkConfig is not present on cluster")
194+
return nil
195+
}
196+
192197
// If instance of crd is not found, pass nil to CNSClient
193198
if client.IgnoreNotFound(err) == nil {
194199
return crdRC.CNSClient.ReconcileNCState(nil, nil, nodeNetConfig.Status.Scaler, nodeNetConfig.Spec)

0 commit comments

Comments
 (0)