Skip to content

Commit

Permalink
Respect GatewayConfig values
Browse files Browse the repository at this point in the history
  • Loading branch information
tssurya committed Dec 6, 2021
1 parent e7112f8 commit b6315f9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/network/ovn_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
data.Data["GenevePort"] = c.GenevePort
data.Data["CNIConfDir"] = pluginCNIConfDir(conf)
data.Data["CNIBinDir"] = CNIBinDir
data.Data["OVN_GATEWAY_MODE"] = bootstrapResult.OVN.OVNKubernetesConfig.GatewayMode
//data.Data["OVN_GATEWAY_MODE"] = bootstrapResult.OVN.OVNKubernetesConfig.GatewayMode
data.Data["OVN_NB_PORT"] = OVN_NB_PORT
data.Data["OVN_SB_PORT"] = OVN_SB_PORT
data.Data["OVN_NB_RAFT_PORT"] = OVN_NB_RAFT_PORT
Expand Down Expand Up @@ -154,6 +154,14 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
data.Data["EnableIPsec"] = false
}

if c.GatewayConfig != nil {
if c.GatewayConfig.RoutingViaHost {
data.Data["OVN_GATEWAY_MODE"] = OVN_LOCAL_GW_MODE
} else {
data.Data["OVN_GATEWAY_MODE"] = OVN_SHARED_GW_MODE
}
}

exportNetworkFlows := conf.ExportNetworkFlows
if exportNetworkFlows != nil {
if exportNetworkFlows.NetFlow != nil {
Expand Down

0 comments on commit b6315f9

Please sign in to comment.