network: Allow to override the ups/downs route for the network
Right now, post-up interface routes are semi-hardcoded for the production. This changes allows to define for the staging area some more setup.
As in for example the following for the staging area gateway:
---
networks:
default:
interface: eth0
address: 192.168.100.125
netmask: 255.255.255.0
gateway: 192.168.100.1
ups: 'iptables -t nat -A POSTROUTING -s 192.168.128.0/24 -o eth0 -j MASQUERADE'
downs: 'iptables -t nat -F'
private:
interface: eth1
address: 192.168.128.1
netmask: 255.255.255.0
ups: []
downs: []
Related T1874 Related infra/swh-sysadmin-provisioning!26
Test Plan
bin/octocatalog-diff gateway.internal.staging.swh.network (swh-site ; new_staging branch)
Migrated from D1792 (view on Phabricator)