Skip to content

Commit

Permalink
OvnEip using default external subnet when not set (#3445)
Browse files Browse the repository at this point in the history
Signed-off-by: zcq98 <[email protected]>
Co-authored-by: zcq98 <[email protected]>
  • Loading branch information
zhaocongqi and zhaocongqi authored Nov 21, 2023
1 parent 64a5cf5 commit 4622372
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/controller/ovn_eip.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ func (c *Controller) handleAddOvnEip(key string) error {
var v4ip, v6ip, mac, subnetName string
subnetName = cachedEip.Spec.ExternalSubnet
if subnetName == "" {
err := fmt.Errorf("failed to create ovn eip '%s', subnet should be set", key)
klog.Error(err)
return err
klog.Infof("subnet has not been set for eip %q, using default external subnet %q", key, c.config.ExternalGatewaySwitch)
subnetName = c.config.ExternalGatewaySwitch
}
subnet, err := c.subnetsLister.Get(subnetName)
if err != nil {
Expand Down

0 comments on commit 4622372

Please sign in to comment.