Skip to content

Commit

Permalink
Merge pull request AliyunContainerService#708 from l1b0k/feat/cni
Browse files Browse the repository at this point in the history
fix: empty map assignment
  • Loading branch information
l1b0k authored Oct 28, 2024
2 parents cef1874 + 9f52395 commit 3f2fc6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/eni/crdv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ func (r *CRDV2) syncNodeRuntime(ctx context.Context) error {
v = &networkv1beta1.RuntimePodStatus{
PodID: pod.PodID,
}
if nodeRuntime.Status.Pods == nil {
nodeRuntime.Status.Pods = make(map[string]*networkv1beta1.RuntimePodStatus)
}
nodeRuntime.Status.Pods[k] = v
}
// cni del is called
Expand Down

0 comments on commit 3f2fc6d

Please sign in to comment.