Skip to content

Commit

Permalink
feat: support vxlan tunnel
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Apr 29, 2021
1 parent 801a04e commit 0489a72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions dist/images/install-pre-1.16.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fi
EXCLUDE_IPS="" # EXCLUDE_IPS for default subnet
LABEL="node-role.kubernetes.io/master" # The node label to deploy OVN DB
NETWORK_TYPE="geneve" # geneve or vlan
TUNNEL_TYPE="geneve" # geneve or vxlan

# VLAN Config only take effect when NETWORK_TYPE is vlan
PROVIDER_NAME="provider"
Expand Down Expand Up @@ -1481,6 +1482,8 @@ spec:
fieldPath: status.podIP
- name: HW_OFFLOAD
value: "$HW_OFFLOAD"
- name: TUNNEL_TYPE
value: "$TUNNEL_TYPE"
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
Expand Down
3 changes: 3 additions & 0 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fi
EXCLUDE_IPS="" # EXCLUDE_IPS for default subnet
LABEL="node-role.kubernetes.io/master" # The node label to deploy OVN DB
NETWORK_TYPE="geneve" # geneve or vlan
TUNNEL_TYPE="geneve" # geneve or vxlan

# VLAN Config only take effect when NETWORK_TYPE is vlan
PROVIDER_NAME="provider"
Expand Down Expand Up @@ -1520,6 +1521,8 @@ spec:
fieldPath: status.podIP
- name: HW_OFFLOAD
value: "$HW_OFFLOAD"
- name: TUNNEL_TYPE
value: "$TUNNEL_TYPE"
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
Expand Down
4 changes: 2 additions & 2 deletions dist/images/start-ovs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
HW_OFFLOAD=${HW_OFFLOAD:-false}
ENABLE_SSL=${ENABLE_SSL:-false}
OVN_DB_IPS=${OVN_DB_IPS:-}

TUNNEL_TYPE=${TUNNEL_TYPE:-geneve}

# Check required kernel module
modinfo openvswitch
Expand Down Expand Up @@ -96,7 +96,7 @@ function gen_conn_str {
ovs-vsctl set open . external-ids:ovn-remote="$(gen_conn_str 6642)"
ovs-vsctl set open . external-ids:ovn-remote-probe-interval=10000
ovs-vsctl set open . external-ids:ovn-openflow-probe-interval=180
ovs-vsctl set open . external-ids:ovn-encap-type=geneve
ovs-vsctl set open . external-ids:ovn-encap-type="${TUNNEL_TYPE}"
ovs-vsctl set open . external-ids:hostname="${KUBE_NODE_NAME}"

# Start ovn-controller
Expand Down

0 comments on commit 0489a72

Please sign in to comment.