-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure outbount interface via nmstate
- Loading branch information
1 parent
df21b7c
commit cf21dac
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
overlay.d/15-microshift/usr/lib/systemd/system-preset/99-microshift.preset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
19 changes: 19 additions & 0 deletions
19
overlay.d/15-microshift/usr/lib/systemd/system/nmstate-outbound-interface.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |