Skip to content

Commit

Permalink
fix: gatewaynode might be null (#1896)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7fae28a)
  • Loading branch information
oilbeater committed Sep 8, 2022
1 parent 5f5e85f commit 72a2607
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/apis/kubeovn/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ type SubnetSpec struct {
Provider string `json:"provider,omitempty"`

GatewayType string `json:"gatewayType,omitempty"`
GatewayNode string `json:"gatewayNode,omitempty"`
GatewayNode string `json:"gatewayNode"`
NatOutgoing bool `json:"natOutgoing"`

ExternalEgressGateway string `json:"externalEgressGateway,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (c *Controller) initDefaultLogicalSwitch() error {
Provider: util.OvnProvider,
CIDRBlock: c.config.DefaultCIDR,
Gateway: c.config.DefaultGateway,
GatewayNode: "",
DisableGatewayCheck: !c.config.DefaultGatewayCheck,
ExcludeIps: strings.Split(c.config.DefaultExcludeIps, ","),
NatOutgoing: true,
Expand Down Expand Up @@ -174,6 +175,7 @@ func (c *Controller) initNodeSwitch() error {
Provider: util.OvnProvider,
CIDRBlock: c.config.NodeSwitchCIDR,
Gateway: c.config.NodeSwitchGateway,
GatewayNode: "",
ExcludeIps: strings.Split(c.config.NodeSwitchGateway, ","),
Protocol: util.CheckProtocol(c.config.NodeSwitchCIDR),
DisableInterConnection: true,
Expand Down

0 comments on commit 72a2607

Please sign in to comment.