Skip to content

Commit

Permalink
fix: gatewaynode might be null (#1896)
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Sep 8, 2022
1 parent 57edfe4 commit 7fae28a
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
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"`
U2oRouting bool `json:"u2oRouting,omitempty"`

Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/init.go
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 7fae28a

Please sign in to comment.