diff --git a/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml b/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml index 795d6be6..3982405b 100644 --- a/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml +++ b/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml @@ -10,6 +10,7 @@ resources: - clusterversion.yaml - machineconfigs/disable-net-ifnames.yaml - machineconfigs/mellanox-udev-rules +- machineconfigs/configure-bond0 patches: - path: oauths/cluster_patch.yaml diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/Makefile b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/Makefile new file mode 100644 index 00000000..9327d8d7 --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/Makefile @@ -0,0 +1,10 @@ +MACHINECONFIGS = \ + machineconfig.yaml + +%.yaml: src/%.bu + butane -o $@ -d src $< + +all: $(MACHINECONFIGS) + +clean: + rm -f $(MACHINECONFIGS) diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/README.md b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/README.md new file mode 100644 index 00000000..f7eb8a10 --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/README.md @@ -0,0 +1,7 @@ +Including file content in ignition configs is a pain, because it has to be base64 encoded. The `Makefile` in this directory uses [Butane][] to transpile `MachineConfig` resources, automatically including and encoding content from files. + +Read "[Creating machine configs with Butane][]" in the [OpenShift documentation][] for more information. + +[butane]: https://coreos.github.io/butane/ +[openshift documentation]: https://docs.openshift.com/container-platform/4.10/installing/install_config/installing-customizing.html +[creating machine configs with butane]: https://docs.openshift.com/container-platform/4.10/installing/install_config/installing-customizing.html#installation-special-config-butane_installing-customizing diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/kustomization.yaml b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/kustomization.yaml new file mode 100644 index 00000000..18be132e --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- machineconfig.yaml diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/machineconfig.yaml b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/machineconfig.yaml new file mode 100644 index 00000000..d37bfd64 --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/machineconfig.yaml @@ -0,0 +1,26 @@ +# Generated by Butane; do not edit +apiVersion: machineconfiguration.openshift.io/v1 +kind: MachineConfig +metadata: + labels: + machineconfiguration.openshift.io/role: master + name: configure-bond0 +spec: + config: + ignition: + version: 3.2.0 + storage: + files: + - contents: + compression: gzip + source: data:;base64,H4sIAAAAAAAC/0zMwQqDMAzG8XvepaOCjO2QJ5EeavsNCzaRmgp7++EQtlvgn+83JRVBsqISqGSeVbIne2/4nlTE0F4xwUmsuHLspteOrXXQD7n9Nbev8cDOA9EEW9AEFqha56f3nmg6tUBVM3iOa5QE1xrVUqoKD+P5UrZjDFRhi2Y+bcpL2pyVCu3Gj/voPX0CAAD//04u+Q/FAAAA + mode: 384 + path: /etc/NetworkManager/system-connections/bond0.nmconnection + - contents: + source: data:,%5Bconnection%5D%0Aid%3Deth2%0Atype%3Dethernet%0Ainterface-name%3Deth2%0Amaster%3Dbond0%0Aslave-type%3Dbond%0Aautoconnect%3Dtrue%0A%0A%5Bethernet%5D%0Amtu%3D9000%0A + mode: 384 + path: /etc/NetworkManager/system-connections/eth2.nmconnection + - contents: + source: data:,%5Bconnection%5D%0Aid%3Deth3%0Atype%3Dethernet%0Ainterface-name%3Deth3%0Amaster%3Dbond0%0Aslave-type%3Dbond%0Aautoconnect%3Dtrue%0A%0A%5Bethernet%5D%0Amtu%3D9000%0A + mode: 384 + path: /etc/NetworkManager/system-connections/eth3.nmconnection diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/bond0.nmconnection b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/bond0.nmconnection new file mode 100644 index 00000000..d7cef358 --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/bond0.nmconnection @@ -0,0 +1,17 @@ +[connection] +id=bond0 +type=bond +interface-name=bond0 +autoconnect=true +connection.autoconnect-slaves=1 + +[ethernet] +mtu=9000 + +[bond] +mode=balance-rr +miimon=140 + +[ipv4] +method=auto +dhcp-timeout=86400 diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/eth2.nmconnection b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/eth2.nmconnection new file mode 100644 index 00000000..4620c7a2 --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/eth2.nmconnection @@ -0,0 +1,10 @@ +[connection] +id=eth2 +type=ethernet +interface-name=eth2 +master=bond0 +slave-type=bond +autoconnect=true + +[ethernet] +mtu=9000 diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/eth3.nmconnection b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/eth3.nmconnection new file mode 100644 index 00000000..20477904 --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/eth3.nmconnection @@ -0,0 +1,10 @@ +[connection] +id=eth3 +type=ethernet +interface-name=eth3 +master=bond0 +slave-type=bond +autoconnect=true + +[ethernet] +mtu=9000 diff --git a/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/machineconfig.bu b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/machineconfig.bu new file mode 100644 index 00000000..5aa84517 --- /dev/null +++ b/cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/machineconfig.bu @@ -0,0 +1,20 @@ +variant: openshift +version: 4.10.0 +metadata: + name: configure-bond0 + labels: + machineconfiguration.openshift.io/role: master +storage: + files: + - path: /etc/NetworkManager/system-connections/bond0.nmconnection + mode: 0600 + contents: + local: bond0.nmconnection + - path: /etc/NetworkManager/system-connections/eth2.nmconnection + mode: 0600 + contents: + local: eth2.nmconnection + - path: /etc/NetworkManager/system-connections/eth3.nmconnection + mode: 0600 + contents: + local: eth3.nmconnection