Skip to content

Commit 91b383b

Browse files
committed
For eip created without spec.V4ip this field (#2912)
is always empty
1 parent b8523fc commit 91b383b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controller/vpc_nat_gw_eip.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ func (c *Controller) GetEip(eipName string) (*kubeovnv1.IptablesEIP, error) {
404404
klog.Errorf("failed to get eip %s, %v", eipName, err)
405405
return nil, err
406406
}
407-
if cachedEip.Status.IP == "" || cachedEip.Spec.V4ip == "" {
407+
if cachedEip.Status.IP == "" {
408408
return nil, fmt.Errorf("eip '%s' is not ready, has no v4ip", eipName)
409409
}
410410
eip := cachedEip.DeepCopy()
@@ -484,7 +484,7 @@ func (c *Controller) acquireEip(name, namespace, nicName string) (string, string
484484
}
485485

486486
func (c *Controller) eipChangeIP(eip *kubeovnv1.IptablesEIP) bool {
487-
if eip.Status.IP == "" || eip.Spec.V4ip == "" {
487+
if eip.Status.IP == "" {
488488
// eip created but not ready
489489
return false
490490
}

0 commit comments

Comments
 (0)