Example 2: NodeNetworkConfigurationPolicy CR

Example NodeNetworkConfigurationPolicy(nncp) CR configuration for an environment with clients that are not directly attached to the VLAN interface used for the MetalLB IP address.

apiVersion: nmstate.io/v1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: designate-external-dns-policy-routing
spec:
  nodeSelector:
    node-role.kubernetes.io/worker: ""
  desiredState:
    routes:
      config:
      # Table 610: default route out of the designate network.
      - destination: 0.0.0.0/0
        next-hop-address: 10.3.43.1
        next-hop-interface: rhoso-bond0.343
        table-id: 610
    route-rules:
      config:
      # Keep on-subnet (external network) traffic on the main table.
      - ip-from: 172.29.89.88/32
        ip-to: 10.3.43.0/24
        route-table: 254
        priority: 602
      - ip-from: 172.29.134.52/32
        ip-to: 10.3.43.0/24
        route-table: 254
        priority: 603
      - ip-from: 172.29.196.23/32
        ip-to: 10.3.43.0/24
        route-table: 254
        priority: 604
      # Keep OCP cluster/pod-network traffic on the main table.
      - ip-from: 172.29.89.88/32
        ip-to: 10.192.0.0/16
        route-table: 254
        priority: 605
      - ip-from: 172.29.134.52/32
        ip-to: 10.192.0.0/16
        route-table: 254
        priority: 606
      - ip-from: 172.29.196.23/32
        ip-to: 10.192.0.0/16
        route-table: 254
        priority: 607
      # Everything else (internet replies) from each DNS ClusterIP -> table 610.
      - ip-from: 172.29.89.88/32
        route-table: 610
        priority: 608
      - ip-from: 172.29.134.52/32
        route-table: 610
        priority: 609
      - ip-from: 172.29.196.23/32
        route-table: 610
        priority: 610