apiVersion: core.openstack.org/v1beta1
kind: OpenStackControlPlane
metadata:
  name: openstack-galera-network-isolation
spec:
  secret: osp-secret
  storageClass: nfs-client
  #tls:
  #  endpoint:
  #    internal:
  #      enabled: false
  #    public:
  #      enabled: true
  dns:
    template:
      override:
        service:
          metadata:
            annotations:
              metallb.universe.tf/address-pool: ctlplane
              metallb.universe.tf/allow-shared-ip: ctlplane
              metallb.universe.tf/loadBalancerIPs: 172.16.29.60
          spec:
            type: LoadBalancer
      options:
      - key: server
        values:
        - 172.16.29.1
      replicas: 1
  cinder:
    apiOverride:
      route: {}
    template:
      databaseInstance: openstack
      secret: osp-secret
      cinderAPI:
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
      cinderScheduler:
        replicas: 1
      cinderBackup:
        networkAttachments:
        - storage
        replicas: 0 # backend needs to be configured
      cinderVolumes:
        volume1:
          networkAttachments:
          - storage
          replicas: 0 # backend needs to be configured
  glance:
    apiOverrides:
      default:
        route: {}
    template:
      databaseInstance: openstack
      storageClass: ""
      storageRequest: 10G
      secret: osp-secret
      keystoneEndpoint: default
      glanceAPIs:
        default:
          type: single
          replicas: 1
          override:
            service:
              internal:
                metadata:
                  annotations:
                    metallb.universe.tf/address-pool: internalapi
                    metallb.universe.tf/allow-shared-ip: internalapi
                    metallb.universe.tf/loadBalancerIPs: 172.16.31.60
                spec:
                  type: LoadBalancer
          networkAttachments:
          - storage
  keystone:
    apiOverride:
      route: {}
    template:
      override:
        service:
          internal:
            metadata:
              annotations:
                metallb.universe.tf/address-pool: internalapi
                metallb.universe.tf/allow-shared-ip: internalapi
                metallb.universe.tf/loadBalancerIPs: 172.16.31.60
            spec:
              type: LoadBalancer
      databaseInstance: openstack
      secret: osp-secret
  galera:
    enabled: true
    templates:
      openstack:
        storageRequest: 500M
        secret: osp-secret
        replicas: 1
      openstack-cell1:
        storageRequest: 500M
        secret: osp-secret
        replicas: 1
  memcached:
    templates:
      memcached:
        replicas: 1
  neutron:
    apiOverride:
      route: {}
    template:
      override:
        service:
          internal:
            metadata:
              annotations:
                metallb.universe.tf/address-pool: internalapi
                metallb.universe.tf/allow-shared-ip: internalapi
                metallb.universe.tf/loadBalancerIPs: 172.16.31.60
            spec:
              type: LoadBalancer
      databaseInstance: openstack
      secret: osp-secret
      networkAttachments:
      - internalapi
  barbican:
    apiOverride:
      route: {}
    template:
      databaseInstance: openstack
      secret: osp-secret
      barbicanAPI:
        replicas: 1
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
      barbicanWorker:
        replicas: 1
      barbicanKeystoneListener:
        replicas: 1
  horizon:
    apiOverride:
      route: {}
    template:
      replicas: 1
      secret: osp-secret
  nova:
    apiOverride:
      route: {}
    template:
      apiServiceTemplate:
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
      metadataServiceTemplate:
        override:
          service:
            metadata:
              annotations:
                metallb.universe.tf/address-pool: internalapi
                metallb.universe.tf/allow-shared-ip: internalapi
                metallb.universe.tf/loadBalancerIPs: 172.16.31.60
            spec:
              type: LoadBalancer
      secret: osp-secret
  manila:
    apiOverride:
      route: {}
    template:
      manilaAPI:
        replicas: 1
        networkAttachments:
        - internalapi
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
      manilaScheduler:
        replicas: 1
      manilaShares:
        share1:
          replicas: 1
          networkAttachments:
          - storage
  ovn:
    template:
      ovnDBCluster:
        ovndbcluster-nb:
          dbType: NB
          storageRequest: 10G
          networkAttachment: internalapi
        ovndbcluster-sb:
          dbType: SB
          storageRequest: 10G
          networkAttachment: internalapi
      ovnNorthd:
        networkAttachment: internalapi
      ovnController:
        external-ids:
          system-id: "random"
          ovn-bridge: "br-int"
          ovn-encap-type: "geneve"
        networkAttachment: tenant
  placement:
    apiOverride:
      route: {}
    template:
      override:
        service:
          internal:
            metadata:
              annotations:
                metallb.universe.tf/address-pool: internalapi
                metallb.universe.tf/allow-shared-ip: internalapi
                metallb.universe.tf/loadBalancerIPs: 172.16.31.60
            spec:
              type: LoadBalancer
      databaseInstance: openstack
      secret: osp-secret
  rabbitmq:
    templates:
      rabbitmq:
        override:
          service:
            metadata:
              annotations:
                metallb.universe.tf/address-pool: internalapi
                metallb.universe.tf/loadBalancerIPs: 172.16.31.61
            spec:
              type: LoadBalancer
      rabbitmq-cell1:
        override:
          service:
            metadata:
              annotations:
                metallb.universe.tf/address-pool: internalapi
                metallb.universe.tf/loadBalancerIPs: 172.16.31.62
            spec:
              type: LoadBalancer
  heat:
    apiOverride:
      route: {}
    cnfAPIOverride:
      route: {}
    enabled: false
    template:
      databaseInstance: openstack
      heatAPI:
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
        replicas: 1
      heatEngine:
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
        replicas: 1
      secret: osp-secret
  ironic:
    enabled: false
    template:
      databaseInstance: openstack
      ironicAPI:
        replicas: 1
      ironicConductors:
      - replicas: 1
        storageRequest: 10G
      ironicInspector:
        replicas: 1
      ironicNeutronAgent:
        replicas: 1
      secret: osp-secret
  telemetry:
    enabled: true
    template:
      metricStorage:
        enabled: false
        monitoringStack:
          type: prometheus
      autoscaling:
        enabled: false
        prometheus:
          deployPrometheus: false
        aodh:
          databaseInstance: openstack
          memcachedInstance: memcached
          secret: osp-secret
        heatInstance: heat
      ceilometer:
        enabled: true
        secret: osp-secret
  swift:
    enabled: true
    proxyOverride:
      route: {}
    template:
      swiftRing:
        ringReplicas: 1
      swiftStorage:
        replicas: 1
      swiftProxy:
        replicas: 1
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
  octavia:
    enabled: false
    template:
      databaseInstance: openstack
      octaviaAPI:
        replicas: 1
      secret: osp-secret
  redis:
    enabled: false
  designate:
    enabled: false
    apiOverride:
      route: {}
    template:
      databaseInstance: openstack
      secret: osp-secret
      designateAPI:
        override:
          service:
            internal:
              metadata:
                annotations:
                  metallb.universe.tf/address-pool: internalapi
                  metallb.universe.tf/allow-shared-ip: internalapi
                  metallb.universe.tf/loadBalancerIPs: 172.16.31.60
              spec:
                type: LoadBalancer
      designateCentral:
        replicas: 1
      designateWorker:
        replicas: 0
        networkAttachements:
          - designate
      designateProducer:
        replicas: 0
      designateMdns:
        replicas: 0
        networkAttachements:
          - designate
      designateBackendbind9:
        replicas: 0
        networkAttachements:
          - designate
