Skip to content

Commit 27808b5

Browse files
authored
fix: Added error check while writing the base NNC to the cluster
1 parent 1dd2949 commit 27808b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cns/service/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,9 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
13081308
// Create Node Network Config CRD and update the Home Az field with the cache value from the HomeAz Monitor
13091309
nnc = createBaseNNC(node)
13101310
}
1311-
directcli.Create(ctx, &nnc)
1311+
if err := directcli.Create(ctx, &nnc); err != nil {
1312+
return errors.Wrap(err, "failed to create base NNC")
1313+
}
13121314

13131315
logger.Printf("Reconciling initial CNS state")
13141316
// apiserver nnc might not be registered or api server might be down and crashloop backof puts us outside of 5-10 minutes we have for

0 commit comments

Comments
 (0)