Skip to content

Commit

Permalink
Configure outbount interface via nmstate
Browse files Browse the repository at this point in the history
  • Loading branch information
aleskandro committed Nov 12, 2023
1 parent df21b7c commit cf21dac
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
enable firewall-microshift.service
enable fix-resolve-conf-dot.service
enable fix-resolv-conf-coredns.service
enable fix-resolv-conf-coredns.service
enable nmstate-outbound-interface.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Unit]
Description="Configure firewalld for microshift"
Documentation="https://access.redhat.com/documentation/en-us/red_hat_build_of_microshift/4.14/html/installing/microshift-install-rpm"
After=network-online.target microshift-ovs-init.service
Before=microshift.service
ConditionPathExists=!/var/.microshift-outbound-interface-configured
ConditionPathExists=/etc/microshift/nmstate-outbound-interface.yaml

[Service]
Type=oneshot
RemainAfterExit=true
# TODO: Take some values from the microshift config
ExecStartPre=/usr/bin/nmstate apply -f /etc/microshift/nmstate-outbound-interface.yaml
ExecStart=/usr/bin/touch /var/.microshift-outbound-interface-configured
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target

0 comments on commit cf21dac

Please sign in to comment.