[fge@Gris-NUC12 RHEL-1426]$ cat 1.yml
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: static-ip-net
spec:
  desiredState:
    interfaces:
    - ipv4:
        address:
        - ip: 192.168.0.176
          prefix-length: 18
        auto-dns: true
        dhcp: false
        enabled: true
      ipv6:
        address:
        - ip: fe80::3998:9201:288e:90c5
          prefix-length: 64
        auto-dns: true
        autoconf: false
        dhcp: false
        enabled: true
      name: ens9
      state: up
      type: ethernet
    routes:
      config:
      - destination: 9.9.9.9/32
        metric: 100
        next-hop-address: 192.168.0.1
        next-hop-interface: ens9
      - destination: 169.254.169.254/32
        metric: 100
        next-hop-address: 192.168.0.10
        next-hop-interface: ens9
  nodeSelector:
    kubernetes.io/hostname: net-ys-415o-xbzmm-worker-0-wtsqk
[fge@Gris-NUC12 RHEL-1426]$ cat 2.yml
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: capture-br1-deployment
spec:
  capture:
    default-gw: routes.running.destination=="9.9.9.9/32"
    primary-nic: interfaces.name==capture.default-gw.routes.running.0.next-hop-interface
    primary-nic-routes: routes.running.next-hop-interface==capture.primary-nic.interfaces.0.name
    default-gw-routes-takeover: capture.primary-nic-routes | routes.running.next-hop-interface
      := "capture-br1"
  desiredState:
    interfaces:
    - bridge:
        options:
          stp:
            enabled: false
        port:
        - name: '{{ capture.primary-nic.interfaces.0.name }}'
      ipv4: '{{ capture.primary-nic.interfaces.0.ipv4 }}'
      ipv6: '{{ capture.primary-nic.interfaces.0.ipv6 }}'
      name: capture-br1
      state: up
      type: linux-bridge
    routes:
      config: '{{ capture.default-gw-routes-takeover.routes.running }}'
  nodeSelector:
    capture: allow

[fge@Gris-NUC12 RHEL-1426]$ cat 3.yml
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: capture-br1-teardown
spec:
  capture:
    capture-br1: interfaces.name == "capture-br1"
    capture-br1-routes: routes.running.next-hop-interface == "capture-br1"
    capture-br1-routes-takeover: capture.capture-br1-routes | routes.running.next-hop-interface
      := capture.capture-br1.interfaces.0.bridge.port.0.name
  desiredState:
    interfaces:
    - bridge:
        options:
          stp:
            enabled: false
        port: []
      ipv4:
        auto-dns: true
        dhcp: false
        enabled: false
      ipv6:
        auto-dns: true
        autoconf: false
        dhcp: false
        enabled: false
      name: capture-br1
      state: absent
      type: linux-bridge
    - ipv4: '{{ capture.capture-br1.interfaces.0.ipv4 }}'
      ipv6: '{{ capture.capture-br1.interfaces.0.ipv6 }}'
      name: '{{ capture.capture-br1.interfaces.0.bridge.port.0.name }}'
      state: up
      type: ethernet
    routes:
      config: '{{ capture.capture-br1-routes-takeover.routes.running }}'
  nodeSelector:
    capture: allow
[fge@Gris-NUC12 RHEL-1426]$ cat 4.yml
apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: dynamic-ip-net
spec:
  desiredState:
    interfaces:
    - ipv4:
        auto-dns: true
        dhcp: true
        enabled: true
      ipv6:
        auto-dns: true
        autoconf: true
        dhcp: true
        enabled: true
      name: ens9
      state: up
      type: ethernet
  nodeSelector:
    kubernetes.io/hostname: net-ys-415o-xbzmm-worker-0-wtsqk
