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 e368a20 commit 0689a72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/pod.go
Expand Up @@ -615,7 +615,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 0689a72

Please sign in to comment.