apiVersion: osp-director.openstack.org/v1beta1
kind: OpenStackNetConfig
metadata:
  name: openstacknetconfig
spec:
  attachConfigurations:
    br-osp:
      nodeNetworkConfigurationPolicy:
        nodeSelector:
          node-role.kubernetes.io/worker: ""
        desiredState:
          interfaces:
          - bridge:
              options:
                stp:
                  enabled: false
              port:
              - name: enp7s0
            description: Linux bridge with enp7s0 as a port
            name: br-osp
            type: linux-bridge
            state: up
            ipv4:
              enabled: false
            ipv6:
              enabled: false
            mtu: 9000
          - name: enp7s0
            description: Configuring enp7s0 on workers
            type: ethernet
            state: up
            ipv4:
              enabled: false
            ipv6:
              enabled: false
            mtu: 9000
    br-ex:
      nodeNetworkConfigurationPolicy:
        nodeSelector:
          node-role.kubernetes.io/worker: ""
        desiredState:
          interfaces:
          - bridge:
              options:
                stp:
                  enabled: false
              port:
              - name: enp6s0
            description: Linux bridge with enp6s0 as a port
            name: br-ex
            type: linux-bridge
            state: up
            ipv4:
              enabled: false
            ipv6:
              enabled: false
            mtu: 1500
  domainName: osptest.test.metalkube.org
  dnsServers: ['192.168.25.1']
  dnsSearchDomains : ['osptest.test.metalkube.org', 'test.metalkube.org']
  networks:
  - name: Control
    nameLower: ctlplane
    mtu: 9000
    isControlPlane: true
    subnets:
    - name: ctlplane
      ipv4:
        allocationEnd: 192.168.25.250
        allocationStart: 192.168.25.100
        cidr: 192.168.25.0/24
        gateway: 192.168.25.1
      attachConfiguration: br-osp
  - name: InternalApi
    nameLower: internal_api
    subnets:
    - name: internal_api
      ipv4:
        allocationEnd: 172.17.0.250
        allocationStart: 172.17.0.10
        cidr: 172.17.0.0/24
      vlan: 20
      attachConfiguration: br-osp
  - name: External
    nameLower: external
    subnets:
    - name: external
      ipv4:
        allocationEnd: 10.0.0.250
        allocationStart: 10.0.0.10
        cidr: 10.0.0.0/24
        gateway: 10.0.0.1
      attachConfiguration: br-ex
  - name: Storage
    nameLower: storage
    mtu: 9000
    subnets:
    - name: storage
      ipv4:
        allocationEnd: 172.18.0.250
        allocationStart: 172.18.0.10
        cidr: 172.18.0.0/24
      vlan: 30
      attachConfiguration: br-osp
  - name: StorageMgmt
    nameLower: storage_mgmt
    subnets:
    - name: storage_mgmt
      ipv4:
        allocationEnd: 172.19.0.250
        allocationStart: 172.19.0.10
        cidr: 172.19.0.0/24
      vlan: 40
      attachConfiguration: br-osp
  - name: Tenant
    nameLower: tenant
    vip: False
    mtu: 9000
    subnets:
    - name: tenant
      ipv4:
        allocationEnd: 172.20.0.250
        allocationStart: 172.20.0.10
        cidr: 172.20.0.0/24
      vlan: 50
      attachConfiguration: br-osp
  ovnBridgeMacMappings:
    physNetworks:
    - macPrefix: fa:16:3a
      name: datacentre
  reservations:
    openstackclient-0:
      ipReservations:
        ctlplane: 192.168.25.251
        external: 10.0.0.251
        internal_api: 172.17.0.251
    controlplane:
      ipReservations:
        ctlplane: 192.168.25.10
        external: 10.0.0.10
        internal_api: 172.17.0.10
        storage: 172.18.0.10
        storage_mgmt: 172.19.0.10
    controller-0:
      ipReservations:
        ctlplane: 192.168.25.20
        external: 10.0.0.20
        internal_api: 172.17.0.20
        storage: 172.18.0.20
        storage_mgmt: 172.19.0.20
        tenant: 172.20.0.20
      macReservations:
        datacentre: fa:16:3a:aa:aa:aa
        datacentre2: fa:16:3b:aa:aa:aa
    controller-1:
      ipReservations:
        ctlplane: 192.168.25.30
        external: 10.0.0.30
        internal_api: 172.17.0.30
        storage: 172.18.0.30
        storage_mgmt: 172.19.0.30
        tenant: 172.20.0.30
    compute-0:
      ipReservations:
        ctlplane: 192.168.25.40
        internal_api: 172.17.0.40
        storage: 172.18.0.40
        tenant: 172.20.0.40
  preserveReservations: True

