Skip to content

Commit

Permalink
keep subnet's vlan empty if not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Jul 15, 2021
1 parent 5efe1ba commit 1810dfc
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,6 @@ func formatSubnet(subnet *kubeovnv1.Subnet, c *Controller) error {
if subnet.Spec.Default && subnet.Name != c.config.DefaultLogicalSwitch {
subnet.Spec.Default = false
}
if c.config.NetworkType == util.NetworkTypeVlan && subnet.Spec.Vlan == "" {
subnet.Spec.Vlan = c.config.DefaultVlanName
subnet.Spec.UnderlayGateway = true
}
if subnet.Spec.Vlan != "" {
if _, err := c.vlansLister.Get(subnet.Spec.Vlan); err != nil {
klog.Warningf("subnet %s reference a none exist vlan %s", subnet.Name, subnet.Spec.Vlan)
Expand Down

0 comments on commit 1810dfc

Please sign in to comment.