-
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 outbound interface via nmstate
- Loading branch information
1 parent
df21b7c
commit 2fe0744
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ystemd/system-preset/99-microshift.preset → ...ystemd/system-preset/70-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,3 @@ | ||
enable firewall-microshift.service | ||
enable fix-resolve-conf-dot.service | ||
enable fix-resolv-conf-dot.service | ||
enable fix-resolv-conf-coredns.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 |