apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 11-worker-bonding
spec:
  config:
    ignition:
      version: 3.2.0 
    storage:
      files:
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWJvbmQwCnR5cGU9Ym9uZAppbnRlcmZhY2UtbmFtZT1ib25kMAphdXRvY29ubmVjdD10cnVlCmNvbm5lY3Rpb24uYXV0b2Nvbm5lY3Qtc2xhdmVzPTEKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKCltldGhlcm5ldF0KbXR1PTkwMDAKCltib25kXQptb2RlPTgwMi4zYWQKCltpcHY0XQptZXRob2Q9YXV0bwpkaGNwLXRpbWVvdXQ9MjE0NzQ4MzY0NwoKW2lwdjZdCm1ldGhvZD1kaXNhYmxlZAo=
        path: /etc/NetworkManager/system-connections/bond0.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWVuczFmMAp0eXBlPWV0aGVybmV0CmludGVyZmFjZS1uYW1lPWVuczFmMAptYXN0ZXI9Ym9uZDAKc2xhdmUtdHlwZT1ib25kCmF1dG9jb25uZWN0PXRydWUKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKCltldGhlcm5ldF0KbXR1PTkwMDA= 
        path: /etc/NetworkManager/system-connections/ens1f0.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWVuczFmMQp0eXBlPWV0aGVybmV0CmludGVyZmFjZS1uYW1lPWVuczFmMQptYXN0ZXI9Ym9uZDAKc2xhdmUtdHlwZT1ib25kCmF1dG9jb25uZWN0PXRydWUKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKCltldGhlcm5ldF0KbXR1PTkwMDA= 
        path: /etc/NetworkManager/system-connections/ens1f1.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWJvbmQxCnR5cGU9Ym9uZAppbnRlcmZhY2UtbmFtZT1ib25kMQphdXRvY29ubmVjdD10cnVlCmNvbm5lY3Rpb24uYXV0b2Nvbm5lY3Qtc2xhdmVzPTEKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKCltldGhlcm5ldF0KbXR1PTkwMDAKCltib25kXQptb2RlPTgwMi4zYWQKCltpcHY0XQptZXRob2Q9ZGlzYWJsZWQKZGhjcC10aW1lb3V0PTIxNDc0ODM2NDcKCltpcHY2XQptZXRob2Q9ZGlzYWJsZWQK
        path: /etc/NetworkManager/system-connections/bond1.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWVuczNmMAp0eXBlPWV0aGVybmV0CmludGVyZmFjZS1uYW1lPWVuczNmMAptYXN0ZXI9Ym9uZDEKc2xhdmUtdHlwZT1ib25kCmF1dG9jb25uZWN0PXRydWUKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKCltldGhlcm5ldF0KbXR1PTkwMDA= 
        path: /etc/NetworkManager/system-connections/ens3f0.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWVuczNmMQp0eXBlPWV0aGVybmV0CmludGVyZmFjZS1uYW1lPWVuczNmMQptYXN0ZXI9Ym9uZDEKc2xhdmUtdHlwZT1ib25kCmF1dG9jb25uZWN0PXRydWUKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKCltldGhlcm5ldF0KbXR1PTkwMDA= 
        path: /etc/NetworkManager/system-connections/ens3f1.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWJvbmQwLjM2MAp0eXBlPXZsYW4KaW50ZXJmYWNlLW5hbWU9Ym9uZDAuMzYwCmF1dG9jb25uZWN0PXRydWUKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKClt2bGFuXQpwYXJlbnQ9Ym9uZDAKaWQ9MzYwCgpbZXRoZXJuZXRdCm10dT05MDAwCgpbaXB2NF0KbWV0aG9kPWF1dG8KZGhjcC10aW1lb3V0PTIxNDc0ODM2NDcKbmV2ZXItZGVmYXVsdD10cnVlCgpbaXB2Nl0KbWV0aG9kPWRpc2FibGVkCm5ldmVyLWRlZmF1bHQ9dHJ1ZQ==
        path: /etc/NetworkManager/system-connections/bond0.360.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,W2Nvbm5lY3Rpb25dCmlkPWJvbmQwLjY2Mgp0eXBlPXZsYW4KaW50ZXJmYWNlLW5hbWU9Ym9uZDAuNjYyCmF1dG9jb25uZWN0PXRydWUKYXV0b2Nvbm5lY3QtcHJpb3JpdHk9OTkKClt2bGFuXQpwYXJlbnQ9Ym9uZDAKaWQ9NjYyCgpbZXRoZXJuZXRdCm10dT05MDAwCgpbaXB2NF0KbWV0aG9kPWF1dG8KZGhjcC10aW1lb3V0PTIxNDc0ODM2NDcKbmV2ZXItZGVmYXVsdD10cnVlCgpbaXB2Nl0KbWV0aG9kPWRpc2FibGVkCm5ldmVyLWRlZmF1bHQ9dHJ1ZQ==
        path: /etc/NetworkManager/system-connections/bond0.662.nmconnection
        filesystem: root
        mode: 0600
      - contents:
          source: data:;base64,IyEvdXNyL2Jpbi9iYXNoCgojIERvaW5nIHRoaXMgdG8gcmVtb3ZlIGxlZnRvdmVyIGlmY2ZnIGZpbGVzIGFmdGVyIHdlIG1pZ3JhdGUgdG8gbm0ga2V5IGZpbGVzCnJtIC1yZiAvZXRjL3N5c2NvbmZpZy9uZXR3b3JrLXNjcmlwdHMvKgoKY2F0IDw8RU9GID4gL2V0Yy9OZXR3b3JrTWFuYWdlci9jb25mLmQvOTgtY2xpZW50LWlkLmNvbmYKW2Nvbm5lY3Rpb24tYm9uZDBdCm1hdGNoLWRldmljZT1pbnRlcmZhY2UtbmFtZTpib25kMAppcHY0LmRoY3AtY2xpZW50LWlkPSQoaXAgbGluayBzaG93IGRldiBlbnMxZjAgfCBhd2sgJy9saW5rLyB7cHJpbnQgJDJ9JykKCltjb25uZWN0aW9uLWJvbmQxXQptYXRjaC1kZXZpY2U9aW50ZXJmYWNlLW5hbWU6Ym9uZDEKaXB2NC5kaGNwLWNsaWVudC1pZD0kKGlwIGxpbmsgc2hvdyBkZXYgZW5zM2YwIHwgYXdrICcvbGluay8ge3ByaW50ICQyfScpCgpFT0YKCmNhdCA8PEVPRiA+IC9ldGMvTmV0d29ya01hbmFnZXIvY29uZi5kLzk4LWRpc2FibGUtYXV0by5jb25mClttYWluXQpuby1hdXRvLWRlZmF1bHQ9ZW5zMWYwLGVuczFmMSxlbnMzZjAsZW5zM2YxCkVPRg==
        path: /usr/local/bin/set-client-id.sh
        filesystem: root
        mode: 0755
      - contents:
          source: data:;base64,IyEvdXNyL2Jpbi9iYXNoCgpmb3IgbmljIGluICQoaXAgbGluayB8IGF3ayAtRidbOiBdKycgJy9lbnMxLyB7cHJpbnQgJDJ9JykKZG8KICBpZiBbWyAiJChubWNsaSAtZyBHRU5FUkFMLkRSSVZFUiBkZXZpY2Ugc2hvdyAkbmljKSIgPT0gImk0MGUiIF1dOyB0aGVuCiAgICBlY2hvICJJbnRlbCBOSUMgJG5pYyBmb3VuZC4gRW5hYmxpbmcgbGluay1kb3duLW9uLWNsb3NlLi4uIgogICAgL3Vzci9zYmluL2V0aHRvb2wgLS1zZXQtcHJpdi1mbGFncyAkbmljIGxpbmstZG93bi1vbi1jbG9zZSBvbgogIGZpCmRvbmU=
        filesystem: root
        mode: 0755
        path: /usr/local/bin/set-ethtool.sh
      - contents:
          source: data:text/plain;charset=utf-8,bond0.662
        filesystem: root
        mode: 0755 
        path: /etc/ovnk/extra_bridge
    systemd:
      units:
      - contents: |-
          [Unit]
          Description=Set bond client-id to the first port MAC each
          Before=ovs-configuration.service network-online.target kubelet.service crio.service node-valid-hostname.service NetworkManager.service
          
          [Service]
          Type=oneshot
          ExecStart=/usr/local/bin/set-client-id.sh
          
          [Install]
          WantedBy=network-online.target
        enabled: true
        name: set-client-id.service
      - contents: |-
            [Unit]
            Description=Enable ethtool setting to network interfaces
            After=ovs-configuration.service network-online.target NetworkManager.service
            
            [Service]
            Type=oneshot
            ExecStart=/usr/local/bin/set-ethtool.sh
            
            [Install]
            WantedBy=network-online.target
        enabled: true
        name: set-ethtool.service
