File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,14 @@ func (rm *resourceManager) syncRoutes(
62
62
63
63
// Get the routes that need to be added and deleted, by checking for
64
64
// differences between desired and latest.
65
- toAdd , toDelete := getRoutesDifference (desired .ko .Spec .Routes , latest .ko .Spec .Routes )
65
+ var toAdd , toDelete []* svcapitypes.CreateRouteInput
66
+ if latest != nil {
67
+ toAdd , toDelete = getRoutesDifference (desired .ko .Spec .Routes , latest .ko .Spec .Routes )
68
+ } else {
69
+ // If method is called from the createRoutes method, then latest is nil
70
+ // and all routes must be added, as non exist yet.
71
+ toAdd = desired .ko .Spec .Routes
72
+ }
66
73
67
74
// Delete and add the routes that were found to be different between desired
68
75
// and latest.
You can’t perform that action at this time.
0 commit comments