diff --git a/README.md b/README.md index 33b1b57bb..718c6ce4a 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,4 @@ The following VAs are available. - [Hyperconverged OpenStack and Ceph](examples/va/hci/) - [Network Functions Virtualization with SRIOV](examples/va/nfv/sriov/) - [Network Functions Virtualization with OvS DPDK](examples/va/nfv/ovs-dpdk/) +- [Network Functions Virtualization with OvS DPDK & SRIOV](examples/va/nfv/ovs-dpdk-sriov/) [untested] diff --git a/examples/va/nfv/ovs-dpdk-sriov/.gitignore b/examples/va/nfv/ovs-dpdk-sriov/.gitignore new file mode 100644 index 000000000..3df8f53be --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/.gitignore @@ -0,0 +1 @@ +control-plane.yaml diff --git a/examples/va/nfv/ovs-dpdk-sriov/README.md b/examples/va/nfv/ovs-dpdk-sriov/README.md new file mode 100644 index 000000000..3425f3009 --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/README.md @@ -0,0 +1,31 @@ +# OpenStack OVS DPDK SRIOV + +**Based on OpenStack K8S operators from the "main" branch of the [OpenStack Operator repo](https://github.com/openstack-k8s-operators/openstack-operator/tree/12c57baeca4ae33dd30a7707d330eb094309b4cd) on Jan 31st, 2024** + +This is a collection of CR templates that represent a validated Red Hat OpenStack Services on OpenShift deployment that has the following characteristics: + +- 3 master/worker combo-node OpenShift cluster +- 3-replica Galera database +- RabbitMQ +- OVN networking +- Network isolation over a single NIC +- 2 compute nodes +- OvS DPDK & SRIOV using ml2 OVN + +## Considerations + +1. These CRs are validated for the overall functionality of the OSP cloud deployed, but they nonetheless require customization for the particular environment in which they are utilized. In this sense they are _templates_ meant to be consumed and tweaked to fit the specific constraints of the hardware available. + +2. The CRs are applied against an OpenShift cluster in _stages_. That is, there is an ordering in which each grouping of CRs is fed to the cluster. It is _not_ a case of simply taking all CRs from all stages and applying them all at once. + +3. In stages 1 and 2 [kustomize](https://kustomize.io/) is used to generate the CRs dynamically. The `*-values.yaml` file(s) must be updated to fit your environment. kustomize version 5 or newer required. + +4.In stage 3 [kustomize](https://kustomize.io/) is used to generate the dataplane CRs dynamically. The edpm/values.yaml file must be updated to fit your environment. kustomize version 5 or newer required. + +## Stages + +All stages must be executed in the order listed below. Everything is required unless otherwise indicated. + +1. [Install the OpenStack K8S operators and their dependencies](../../../common/) +2. [Configuring networking and deploy the OpenStack control plane](control-plane.md) +3. [Configure and deploy the data plane](dataplane.md) diff --git a/examples/va/nfv/ovs-dpdk-sriov/control-plane.md b/examples/va/nfv/ovs-dpdk-sriov/control-plane.md new file mode 100644 index 000000000..f4ec6662e --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/control-plane.md @@ -0,0 +1,55 @@ +# Configuring networking and deploy the OpenStack control plane + +## Assumptions + +- A storage class called `local-storage` should already exist. + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the nfv/ovs-dpdk-sriov directory +``` +cd architecture/examples/va/nfv/ovs-dpdk-sriov +``` +Edit the [nncp/values.yaml](nncp/values.yaml) and +[service-values.yaml](service-values.yaml) files to suit +your environment. +``` +vi nncp/values.yaml +vi service-values.yaml +``` + +## Apply node network configuration + +Generate the node network configuration +``` +kustomize build nncp > nncp.yaml +``` + +Apply the NNCP CRs +``` +oc apply -f nncp.yaml +``` +Wait for NNCPs to be available +``` +oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s +``` + +## Apply networking and control-plane configuration + +Generate the control-plane and networking CRs. +``` +kustomize build > control-plane.yaml +``` +Apply the CRs +``` +oc apply -f control-plane.yaml +``` + +Wait for control plane to be available +``` +oc wait osctlplane controlplane --for condition=Ready --timeout=600s +``` diff --git a/examples/va/nfv/ovs-dpdk-sriov/dataplane.md b/examples/va/nfv/ovs-dpdk-sriov/dataplane.md new file mode 100644 index 000000000..36fa9cae7 --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/dataplane.md @@ -0,0 +1,35 @@ +# Configuring and deploying the dataplane + +## Assumptions + +- The [control plane](control-plane.md) has been created and successfully deployed + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the nfv/ovs-dpdk-sriov/edpm directory +``` +cd architecture/examples/va/nfv/ovs-dpdk-sriov/edpm +``` +Edit the [values.yaml](edpm/values.yaml) file to suit +your environment. +``` +vi values.yaml +``` +Generate the dataplane CRs. +``` +kustomize build > dataplane.yaml +``` + +## Create CRs +``` +oc apply -f dataplane.yaml +``` + +Wait for dataplane deployment to finish +``` +oc wait osdpd edpm-deployment --for condition=Ready --timeout=1200s +``` diff --git a/examples/va/nfv/ovs-dpdk-sriov/edpm/.gitignore b/examples/va/nfv/ovs-dpdk-sriov/edpm/.gitignore new file mode 100644 index 000000000..644fb5d06 --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/edpm/.gitignore @@ -0,0 +1 @@ +dataplane.yaml diff --git a/examples/va/nfv/ovs-dpdk-sriov/edpm/kustomization.yaml b/examples/va/nfv/ovs-dpdk-sriov/edpm/kustomization.yaml new file mode 100644 index 000000000..5a10eef44 --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/edpm/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../va/nfv/ovs-dpdk-sriov/edpm/ + # - https://github.com/openstack-k8s-operators/architecture/va/nfv/ovs-dpdk-sriov/edpm/?ref=main + ## It's possible to replace ../../../../../va/nfv/ovs-dpdk-sriov/edpm/ with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - values.yaml diff --git a/examples/va/nfv/ovs-dpdk-sriov/edpm/values.yaml b/examples/va/nfv/ovs-dpdk-sriov/edpm/values.yaml new file mode 100644 index 000000000..bc21c7a46 --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/edpm/values.yaml @@ -0,0 +1,207 @@ +# local-config: referenced, but not emitted by kustomize +apiVersion: v1 +kind: ConfigMap +metadata: + name: edpm-values + annotations: + config.kubernetes.io/local-config: "true" +data: + ssh_keys: + # Authorized keys that will have access to the dataplane computes via SSH + authorized: CHANGEME + # The private key that will have access to the dataplane computes via SSH + private: CHANGEME2 + # The public key that will have access to the dataplane computes via SSH + public: CHANGEME3 + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + # CHANGEME -- see https://access.redhat.com/solutions/253273 + # edpm_bootstrap_command: | + # subscription-manager register --username --password + # podman login -u -p registry.redhat.io + service_net_map: + nova_api_network: internalapi + nova_libvirt_network: internalapi + timesync_ntp_servers: + - hostname: clock.redhat.com + # CPU pinning settings + # edpm nfv ovs dpdk config + # CHANGEME + edpm_kernel_args: "default_hugepagesz=1GB hugepagesz=1G hugepages=64 iommu=pt intel_iommu=on tsx=off isolcpus=2-11,14-23" + edpm_tuned_profile: "cpu-partitioning-powersave" + edpm_tuned_isolated_cores: "2-11,14-23" + edpm_nova_libvirt_qemu_group: "hugetlbfs" + edpm_ovs_dpdk_pmd_core_list: "1,13,2,14,3,15" + edpm_ovs_dpdk_socket_memory: "4096" + edpm_ovs_dpdk_memory_channels: "4" + edpm_ovs_dpdk_vhost_postcopy_support: "true" + edpm_ovn_bridge_mappings: ['dpdk2:br-link2','dpdk1:br-link1'] + # edpm nfv sriov config + edpm_neutron_sriov_agent_SRIOV_NIC_physical_device_mappings: 'sriov1:eno5,sriov2:eno6' + # edpm_network_config + # These vars are edpm_network_config role vars + edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + # Need to provide nic mapping based on system uuid or system product name + # here used systetm uuid + edpm-compute-0: # CHANGEME + dmiString: "system-uuid" # CHANGEME + id: "4c4c4544-0034-3810-8050-cac04f325432" # CHANGEME + nic1: eno1 # CHANGEME + nic2: eno2 # CHANGEME + nic3: eno3 # CHANGEME + nic4: eno4 # CHANGEME + nic5: eno5 # CHANGEME + nic6: eno6 # CHANGEME + edpm_network_config_template: | + --- + {% set mtu_list = [ctlplane_mtu] %} + {% for network in role_networks %} + {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} + {%- endfor %} + {% set min_viable_mtu = mtu_list | max %} + network_config: + - type: ovs_bridge + name: {{ neutron_physical_bridge_name }} + mtu: {{ min_viable_mtu }} + use_dhcp: false + dns_servers: {{ ctlplane_dns_nameservers }} + domain: {{ dns_search_domains }} + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} + routes: {{ ctlplane_host_routes }} + members: + - type: interface + name: nic2 + mtu: {{ min_viable_mtu }} + # force the MAC address of the bridge to this interface + primary: true + {% for network in role_networks if network not in ['External', 'Tenant'] %} + - type: vlan + mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} + vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} + addresses: + - ip_netmask: + {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} + routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} + {% endfor %} + - type: ovs_user_bridge + name: br-link1 + use_dhcp: false + ovs_extra: "set port br-link1 tag={{ lookup('vars', networks_lower['Tenant'] ~ '_vlan_id') }}" + addresses: + - ip_netmask: {{ lookup('vars', networks_lower['Tenant'] ~ '_ip') }}/{{ lookup('vars', networks_lower['Tenant'] ~ '_cidr') }} + mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} + rx_queue: 1 + members: + - type: ovs_dpdk_port + name: dpdk1 + members: + - type: interface + name: nic3 + - type: ovs_user_bridge + name: br-link2 + use_dhcp: false + mtu: 9000 + rx_queue: 1 + members: + - type: ovs_dpdk_port + name: dpdk2 + members: + - type: interface + name: nic4 + - type: sriov_pf + name: nic5 + numvfs: 10 + mtu: 9000 + use_dhcp: false + promisc: true + - type: sriov_pf + name: nic6 + numvfs: 10 + mtu: 9000 + use_dhcp: false + promisc: true + # These vars are for the network config templates themselves and are + # considered EDPM network defaults. + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: nic1 + # edpm_nodes_validation + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + dns_search_domains: [] + gather_facts: false + enable_debug: false + # edpm firewall, change the allowed CIDR if needed + edpm_sshd_configure_firewall: true + edpm_sshd_allowed_ranges: + - 192.168.122.0/24 + # SELinux module + edpm_selinux_mode: enforcing + nodes: + edpm-compute-0: + ansible: + ansibleHost: 192.168.122.100 + hostName: edpm-compute-0 + networks: + - defaultRoute: true + fixedIP: 192.168.122.100 + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + edpm-compute-1: + ansible: + ansibleHost: 192.168.122.101 + hostName: edpm-compute-1 + networks: + - defaultRoute: true + fixedIP: 192.168.122.101 + name: CtlPlane + subnetName: subnet1 + - name: InternalApi + subnetName: subnet1 + - name: Storage + subnetName: subnet1 + - name: Tenant + subnetName: subnet1 + services: + - bootstrap + - download-cache + - reboot-os + - configure-ovs-dpdk + - configure-network + - validate-network + - install-os + - configure-os + - run-os + - ovn + - neutron-metadata + - neutron-sriov + - libvirt + - nova-custom-ovsdpdksriov + - telemetry + nova: + compute: + conf: | + [DEFAULT] + reserved_host_memory_mb = 4096 + [compute] + cpu_shared_set = 0-3,24-27 + cpu_dedicated_set = 8-23,32-47 + migration: + ssh_keys: + private: CHANGEME4 + public: CHANGEME5 + pci: + conf: | + [pci] + device_spec = {"vendor_id":"8086", "product_id":"1572", "address": "0000:19:00.3", "physical_network":"sriov1", "trusted":"true"} #CHANGEME + device_spec = {"vendor_id":"8086", "product_id":"1572", "address": "0000:20:00.3", "physical_network":"sriov2", "trusted":"true"} #CHANGEME diff --git a/examples/va/nfv/ovs-dpdk-sriov/kustomization.yaml b/examples/va/nfv/ovs-dpdk-sriov/kustomization.yaml new file mode 100644 index 000000000..1d228c78c --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../va/nfv/ovs-dpdk-sriov/ + # - https://github.com/openstack-k8s-operators/architecture/va/nfv/ovs-dpdk-sriov?ref=main + ## It's possible to replace ../../../va/nfv/ovs-dpdk-sriov/ with a git checkout URL as per: + ## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md + +resources: + - nncp/values.yaml + - service-values.yaml diff --git a/examples/va/nfv/ovs-dpdk-sriov/nncp/kustomization.yaml b/examples/va/nfv/ovs-dpdk-sriov/nncp/kustomization.yaml new file mode 100644 index 000000000..9eebd2367 --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/nncp/kustomization.yaml @@ -0,0 +1,23 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +transformers: +# Set namespace to OpenStack on all namespaced objects without a namespace +- |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../lib/nncp + +resources: + - values.yaml diff --git a/examples/va/nfv/ovs-dpdk-sriov/nncp/values.yaml b/examples/va/nfv/ovs-dpdk-sriov/nncp/values.yaml new file mode 100644 index 000000000..dd534b7ec --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/nncp/values.yaml @@ -0,0 +1,201 @@ +# local-config: referenced, but not emitted by kustomize +apiVersion: v1 +kind: ConfigMap +metadata: + name: network-values + annotations: + config.kubernetes.io/local-config: "true" +data: + # nodes + node_0: + name: ostest-master-0 + internalapi_ip: 172.17.0.5 + tenant_ip: 172.19.0.5 + ctlplane_ip: 192.168.122.10 + storage_ip: 172.18.0.5 + node_1: + name: ostest-master-1 + internalapi_ip: 172.17.0.6 + tenant_ip: 172.19.0.6 + ctlplane_ip: 192.168.122.11 + storage_ip: 172.18.0.6 + node_2: + name: ostest-master-2 + internalapi_ip: 172.17.0.7 + tenant_ip: 172.19.0.7 + ctlplane_ip: 192.168.122.12 + storage_ip: 172.18.0.7 + + # networks + ctlplane: + dnsDomain: ctlplane.example.com + subnets: + - allocationRanges: + - end: 192.168.122.120 + start: 192.168.122.100 + - end: 192.168.122.200 + start: 192.168.122.150 + cidr: 192.168.122.0/24 + gateway: 192.168.122.1 + name: subnet1 + prefix-length: 24 + iface: enp7s0 + mtu: 1500 + lb_addresses: + - 192.168.122.80-192.168.122.90 + endpoint_annotations: + metallb.universe.tf/address-pool: ctlplane + metallb.universe.tf/allow-shared-ip: ctlplane + metallb.universe.tf/loadBalancerIPs: 192.168.122.80 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "ctlplane", + "type": "macvlan", + "master": "ospbr", + "ipam": { + "type": "whereabouts", + "range": "192.168.122.0/24", + "range_start": "192.168.122.30", + "range_end": "192.168.122.70" + } + } + internalapi: + dnsDomain: internalapi.example.com + subnets: + - allocationRanges: + - end: 172.17.0.250 + start: 172.17.0.100 + cidr: 172.17.0.0/24 + name: subnet1 + vlan: 20 + mtu: 1500 + prefix-length: 24 + iface: enp7s0.20 + vlan: 20 + base_iface: enp7s0 + lb_addresses: + - 172.17.0.80-172.17.0.90 + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "internalapi", + "type": "macvlan", + "master": "internalapi", + "ipam": { + "type": "whereabouts", + "range": "172.17.0.0/24", + "range_start": "172.17.0.30", + "range_end": "172.17.0.70" + } + } + storage: + dnsDomain: storage.example.com + subnets: + - allocationRanges: + - end: 172.18.0.250 + start: 172.18.0.100 + cidr: 172.18.0.0/24 + name: subnet1 + vlan: 21 + mtu: 1500 + prefix-length: 24 + iface: enp7s0.21 + vlan: 21 + base_iface: enp7s0 + lb_addresses: + - 172.18.0.80-172.18.0.90 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "storage", + "type": "macvlan", + "master": "storage", + "ipam": { + "type": "whereabouts", + "range": "172.18.0.0/24", + "range_start": "172.18.0.30", + "range_end": "172.18.0.70" + } + } + tenant: + dnsDomain: tenant.example.com + subnets: + - allocationRanges: + - end: 172.19.0.250 + start: 172.19.0.100 + cidr: 172.19.0.0/24 + name: subnet1 + vlan: 22 + mtu: 1500 + prefix-length: 24 + iface: enp7s0.22 + vlan: 22 + base_iface: enp7s0 + lb_addresses: + - 172.19.0.80-172.19.0.90 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "tenant", + "type": "macvlan", + "master": "tenant", + "ipam": { + "type": "whereabouts", + "range": "172.19.0.0/24", + "range_start": "172.19.0.30", + "range_end": "172.19.0.70" + } + } + external: + dnsDomain: external.example.com + subnets: + - allocationRanges: + - end: 10.0.0.250 + start: 10.0.0.100 + cidr: 10.0.0.0/24 + gateway: 10.0.0.1 + name: subnet1 + mtu: 1500 + datacentre: + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "datacentre", + "type": "bridge", + "bridge": "ospbr", + "ipam": {} + } + + dns-resolver: + config: + server: + - 192.168.122.1 + search: [] + options: + - key: server + values: + - 192.168.122.1 + + routes: + config: + - destination: 0.0.0.0/0 + next-hop-address: 192.168.122.1 + next-hop-interface: enp7s0 + + rabbitmq: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.85 + rabbitmq-cell1: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.86 + + lbServiceType: LoadBalancer + storageClass: host-nfs-storageclass + bridgeName: ospbr diff --git a/examples/va/nfv/ovs-dpdk-sriov/service-values.yaml b/examples/va/nfv/ovs-dpdk-sriov/service-values.yaml new file mode 100644 index 000000000..557beea1b --- /dev/null +++ b/examples/va/nfv/ovs-dpdk-sriov/service-values.yaml @@ -0,0 +1,55 @@ +# local-config: referenced, but not emitted by kustomize +# +# CHANGEME: +# +# - Change network_vlan_ranges based on EDPM OvS DPDK SRIOV environment. +# - change numa_nodes in the neutron and neutron_tunnel section +# based on DPDK NIC's and NUMA alignment in the OvS DPDK & SRIOV compute node. +# + +apiVersion: v1 +kind: ConfigMap +metadata: + name: service-values + annotations: + config.kubernetes.io/local-config: "true" +data: + neutron: + customServiceConfig: | + [DEFAULT] + global_physnet_mtu = 9000 + [ml2] + mechanism_drivers = ovn,sriovnicswitch + [ovn] + vhost_sock_dir = /var/lib/vhost_sockets + [ml2_type_vlan] + network_vlan_ranges = dpdk1:206:209,dpdk2:206:209,sriov1,sriov2 # CHANGEME + [neutron] + physnets = dpdk1, dpdk2 # CHANGEME + [neutron_physnet_dpdk1] # CHANGEME + numa_nodes = 0 # CHANGEME + [neutron_physnet_dpdk2 # CHANGEME + numa_nodes = 0 # CHANGEME + [neutron_tunnel] # CHANGEME + numa_nodes = 0 # CHANGEME + ovn: + ovnController: + nicMappings: + datacentre: enp4s0 # CHANGEME + glance: + customServiceConfig: | + [DEFAULT] + enabled_backends = default_backend:swift + [glance_store] + default_backend = default_backend + [default_backend] + swift_store_create_container_on_put = True + swift_store_auth_version = 3 + swift_store_auth_address = {{ .KeystoneInternalURL }} + swift_store_endpoint_type = internalURL + swift_store_user = service:glance + swift_store_key = {{ .ServicePassword }} + default: + replicas: 1 + swift: + enabled: true diff --git a/va/nfv/ovs-dpdk-sriov/README.md b/va/nfv/ovs-dpdk-sriov/README.md new file mode 100644 index 000000000..f3ea5aeb2 --- /dev/null +++ b/va/nfv/ovs-dpdk-sriov/README.md @@ -0,0 +1,11 @@ +# VA: OvS DPDK + +If you are looking for information on how to deploy the OvS DPDK & SRIOV VA, then +please see the +[OvS DPDK & SRIOV README in the examples directory](../../../examples/va/nfv/ovs-dpdk-sriov/README.md). + +This directory, `architecture/va/nfv/ovs-dpdk-sriov/`, exists so that the +[kustomization.yaml](../../../examples/va/nfv/ovs-dpdk-sriov/kustomization.yaml) +in the examples directory for the OvS DPDK & SRIOV VA, reference it by path as a +component. Its contents are likely uninteresting unless you want to +understand how kustomize was implemented in this repository. diff --git a/va/nfv/ovs-dpdk-sriov/edpm/kustomization.yaml b/va/nfv/ovs-dpdk-sriov/edpm/kustomization.yaml new file mode 100644 index 000000000..bca7ce7ae --- /dev/null +++ b/va/nfv/ovs-dpdk-sriov/edpm/kustomization.yaml @@ -0,0 +1,51 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: +# Set namespace to OpenStack on all namespaced objects without a namespace +- |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: +- ../../../../lib/dataplane + +resources: +- nova_ovs_dpdk_sriov.yaml + +replacements: +# Nova compute CPU pinning customization +- source: + kind: ConfigMap + name: edpm-values + fieldPath: data.nova.compute.conf + targets: + - select: + kind: ConfigMap + name: ovs-dpdk-sriov-cpu-pinning-nova + fieldPaths: + - data.25-cpu-pinning-nova\.conf + options: + create: true +# Nova compute PCI passthrough customization +- source: + kind: ConfigMap + name: edpm-values + fieldPath: data.nova.pci.conf + targets: + - select: + kind: ConfigMap + name: sriov-nova + fieldPaths: + - data.03-sriov-nova\.conf + options: + create: true diff --git a/va/nfv/ovs-dpdk-sriov/edpm/nova_ovs_dpdk_sriov.yaml b/va/nfv/ovs-dpdk-sriov/edpm/nova_ovs_dpdk_sriov.yaml new file mode 100644 index 000000000..797524435 --- /dev/null +++ b/va/nfv/ovs-dpdk-sriov/edpm/nova_ovs_dpdk_sriov.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: ovs-dpdk-sriov-cpu-pinning-nova +data: + 25-cpu-pinning-nova.conf: _replaced_ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sriov-nova +data: + 03-sriov-nova.conf: _replaced_ +--- +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneService +metadata: + name: nova-custom-ovsdpdk +spec: + label: nova-custom-ovsdpdk + configMaps: + - ovs-dpdk-sriov-cpu-pinning-nova + - sriov-nova + secrets: + - nova-cell1-compute-config + - nova-migration-ssh-key + playbook: osp.edpm.nova diff --git a/va/nfv/ovs-dpdk-sriov/kustomization.yaml b/va/nfv/ovs-dpdk-sriov/kustomization.yaml new file mode 100644 index 000000000..b28b64757 --- /dev/null +++ b/va/nfv/ovs-dpdk-sriov/kustomization.yaml @@ -0,0 +1,35 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: +# Set namespace to OpenStack on all namespaced objects without a namespace +- |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: +- ../../../lib/networking +- ../../../lib/control-plane + +replacements: +# Neutron control plane OvS DPDK & SRIOV customization +- source: + kind: ConfigMap + name: service-values + fieldPath: data.neutron.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.neutron.template.customServiceConfig + options: + create: true diff --git a/va/nfv/ovs-dpdk-sriov/namespace.yaml b/va/nfv/ovs-dpdk-sriov/namespace.yaml new file mode 100644 index 000000000..48838178c --- /dev/null +++ b/va/nfv/ovs-dpdk-sriov/namespace.yaml @@ -0,0 +1,11 @@ +apiVersion: builtin +kind: NamespaceTransformer +metadata: + name: _ignored_ + namespace: openstack +setRoleBindingSubjects: none +unsetOnly: true +fieldSpecs: +- path: metadata/name + kind: Namespace + create: true