fickit: Add IP config in metadatas
This commit is contained in:
parent
bed79b947b
commit
3c8ba3ecc2
3 changed files with 40 additions and 3 deletions
|
|
@ -56,8 +56,10 @@ onboot:
|
|||
net: /run/netns/nginx
|
||||
- name: frontal-ip-setup # without bonding
|
||||
image: linuxkit/ip:bb250017b05de5e16ac436b1eb19a39c87b5a252
|
||||
command: ["/bin/sh", "-c", "ip link set name bond-frontal eth3; ip link set bond-frontal up; ip a add 10.42.192.3/24 dev bond-frontal; ip a add 91.243.117.240/32 dev bond-frontal; ip r add default via 10.42.192.1; ip link add link bond-frontal name internet type vlan id 4; ip a add 10.10.10.2/29 dev internet; ip link set internet up;" ]
|
||||
command: ["/bin/sh", "-c", "ip link set name bond-frontal eth3; ip link set bond-frontal up; while read IP; do ip a add ${IP} dev bond-frontal; done < /run/config/ip_config/frontend-players; ip r add default via $(cat /run/config/ip_config/frontend-router); ip link add link bond-frontal name internet type vlan id 4; ip a add 10.10.10.2/29 dev internet; ip link set internet up;" ]
|
||||
net: /run/netns/nginx
|
||||
binds:
|
||||
- /run/config/ip_config/:/run/config/ip_config/:ro
|
||||
runtime:
|
||||
interfaces:
|
||||
# - name: eth1
|
||||
|
|
@ -66,8 +68,10 @@ onboot:
|
|||
# - name: eth4
|
||||
# - name: frontal-ip-setup # with bonding
|
||||
# image: linuxkit/ip:bb250017b05de5e16ac436b1eb19a39c87b5a252
|
||||
# command: ["/bin/sh", "-c", "ip link set dev bond-frontal type bond mode balance-alb; ip link set bond-frontal up; ifenslave bond-frontal eth1 eth2 eth3 eth4; ip a add 172.23.42.254/24 dev bond-frontal; ip a add 172.23.42.1/24 dev bond-frontal; ip a add 91.243.117.240/32 dev bond-frontal; ip link add link bond-frontal name internet type vlan id 4; ip link set internet up; sysctl -w net.ipv4.ip_forward=1;" ]
|
||||
# command: ["/bin/sh", "-c", "ip link set dev bond-frontal type bond mode balance-alb; ip link set bond-frontal up; ifenslave bond-frontal eth1 eth2 eth3 eth4; while read IP; do ip a add ${IP} dev bond-frontal; done < /run/config/ip_config/frontend-players; ip r add default via $(cat /run/config/ip_config/frontend-router); ip link add link bond-frontal name internet type vlan id 4; ip link set internet up; sysctl -w net.ipv4.ip_forward=1;" ]
|
||||
# net: /run/netns/nginx
|
||||
# binds:
|
||||
# - /run/config/ip_config/:/run/config/ip_config/:ro
|
||||
# runtime:
|
||||
# interfaces:
|
||||
# - name: eth1
|
||||
|
|
|
|||
Reference in a new issue