Skip to content

Commit 3f2fc6d

Browse files
authored
Merge pull request #708 from l1b0k/feat/cni
fix: empty map assignment
2 parents cef1874 + 9f52395 commit 3f2fc6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/eni/crdv2.go

+3
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,9 @@ func (r *CRDV2) syncNodeRuntime(ctx context.Context) error {
456456
v = &networkv1beta1.RuntimePodStatus{
457457
PodID: pod.PodID,
458458
}
459+
if nodeRuntime.Status.Pods == nil {
460+
nodeRuntime.Status.Pods = make(map[string]*networkv1beta1.RuntimePodStatus)
461+
}
459462
nodeRuntime.Status.Pods[k] = v
460463
}
461464
// cni del is called

0 commit comments

Comments
 (0)