Skip to content

Commit

Permalink
fix ips CR not found due to etcd error (#2472)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Mar 13, 2023
1 parent e06f2b2 commit bfa779d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,9 @@ func (c *Controller) handleAddPod(key string) error {
podType := getPodType(pod)
podName := c.getNameByPod(pod)
if err := c.createOrUpdateCrdIPs(podName, ipStr, mac, subnet.Name, pod.Namespace, pod.Spec.NodeName, podNet.ProviderName, podType, nil); err != nil {
klog.Errorf("failed to create IP %s.%s: %v", podName, pod.Namespace, err)
err = fmt.Errorf("failed to create ips CR %s.%s: %v", podName, pod.Namespace, err)
klog.Error(err)
return err
}

if podNet.Type != providerTypeIPAM {
Expand Down

0 comments on commit bfa779d

Please sign in to comment.