forked from openshift/kubernetes-nmstate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: <carry>: Add machineconfigs before running e2e tests on OCP
Signed-off-by: Christoph Stäbler <cstabler@redhat.com> (cherry picked from commit 4fe0d7a) (cherry picked from commit 83bd895) (cherry picked from commit b322f05) (cherry picked from commit 8c1a3dd)
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
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
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
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,52 @@ | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
name: 10-nmstate-hack-master | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
systemd: | ||
units: | ||
- contents: | | ||
[Unit] | ||
Description=NMState e2e hack | ||
Wants=crio.service | ||
Before=kubelet.service | ||
After=crio.service | ||
[Service] | ||
Type=oneshot | ||
ExecStart=/bin/bash -c "for i in $(nmcli --fields NAME,UUID -t con show | grep 'Wired Connection' | awk -F : '{print $2}'); do nmcli con modify $i match.interface-name '!enp3s0, !enp4s0'; done" | ||
[Install] | ||
WantedBy=multi-user.target | ||
enabled: true | ||
name: nmstate-hack.service | ||
--- | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
name: 10-nmstate-hack-worker | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
systemd: | ||
units: | ||
- contents: | | ||
[Unit] | ||
Description=NMState e2e hack | ||
Wants=crio.service | ||
Before=kubelet.service | ||
After=crio.service | ||
[Service] | ||
Type=oneshot | ||
ExecStart=/bin/bash -c "for i in $(nmcli --fields NAME,UUID -t con show | grep 'Wired Connection' | awk -F : '{print $2}'); do nmcli con modify $i match.interface-name '!enp3s0, !enp4s0'; done" | ||
[Install] | ||
WantedBy=multi-user.target | ||
enabled: true | ||
name: nmstate-hack.service |