2 apiVersion: k8s.plugin.opnfv.org/v1alpha1
9 - subnet: 172.16.33.0/24
11 gateway: 172.16.33.1/24
14 apiVersion: k8s.plugin.opnfv.org/v1alpha1
21 - subnet: 172.16.44.0/24
23 gateway: 172.16.44.1/24
29 name: sdwan-config-ovn
33 # Always exit on errors.
37 ipaddr0=`ifconfig $interface0 | awk '/inet/{print $2}' | cut -f2 -d ":" | awk 'NR==1 {print $1}'`
40 ipaddr1=`ifconfig $interface1 | awk '/inet/{print $2}' | cut -f2 -d ":" | awk 'NR==1 {print $1}'`
42 net_config=/etc/config/network
43 cat >> $net_config << EOF
44 config interface 'wan'
45 option ifname '$interface0'
47 option ipaddr '$ipaddr0'
48 option netmask '255.255.255.0'
50 config interface 'wanb'
51 option ifname '$interface1'
53 option ipaddr '$ipaddr1'
54 option netmask '255.255.255.0'
61 /etc/init.d/rpcd start
62 /etc/init.d/dnsmasq start
63 /etc/init.d/network start
64 /etc/init.d/odhcpd start
65 /etc/init.d/uhttpd start
67 /etc/init.d/dropbear start
68 /etc/init.d/mwan3 restart
70 echo "Entering sleep... (success)"
73 while true; do sleep 100; done
81 k8s.v1.cni.cncf.io/networks: '[{ "name": "ovn-networkobj"}]'
82 k8s.plugin.opnfv.org/nfn-network: '{ "type": "ovn4nfv", "interface": [{ "name": "ovn-port-net", "interface": "net0" , "defaultGateway": "false"},
83 { "name": "ovn-priv-net", "interface": "net1" , "defaultGateway": "false"}]}'
87 image: hle2/openwrt-1806-mwan3:v0.1.0
94 imagePullPolicy: IfNotPresent
101 - name: entrypoint-sh
103 name: sdwan-config-ovn