Skip to content

Commit

Permalink
[UniAlpha][Octavia] Enable createDefaultLbMgmtNetwork and manageLbMgm…
Browse files Browse the repository at this point in the history
…tNetworks

When octavia is configured with AZs, parameters
createDefaultLbMgmtNetwork and manageLbMgmtNetworks are set to False by
default. With this change, they are set to True on the unialpha config.
  • Loading branch information
eduolivares committed Nov 7, 2024
1 parent 8e78650 commit 4c1ad69
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 8 deletions.
23 changes: 23 additions & 0 deletions dt/bgp/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ resources:
- ocp_networks_octavia_netattach.yaml

patches:
# Add octavia network to NetConfig
- target:
kind: NetConfig
name: netconfig
patch: |-
- op: add
path: /spec/networks/-
value:
dnsDomain: octavia.example.com
name: octavia
subnets:
- _replaced_
mtu: 1500
# Add BGP networks to NetConfig
- target:
kind: NetConfig
Expand Down Expand Up @@ -101,6 +114,16 @@ patches:
networkAttachment: internalapi
replacements:
# octavia NetConfig customizations
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=octavia].subnets
# BGP NetConfig customizations
- source:
kind: ConfigMap
Expand Down
4 changes: 2 additions & 2 deletions dt/uni01alpha/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ replacements:
- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.availabilityZones
fieldPath: data.octavia.lbMgmtNetwork
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.lbMgmtNetwork.availabilityZones
- spec.octavia.template.lbMgmtNetwork
options:
create: true

Expand Down
14 changes: 13 additions & 1 deletion examples/dt/bgp/bgp_dt01/control-plane/nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,19 @@ data:
}
}
octavia:
dnsDomain: octavia.openstack.lab
dnsDomain: octavia.example.com
subnets:
- allocationRanges:
- end: 172.23.0.250
# we need some extra offset to avoid overlapping with octavia
# controlplane IPs
start: 172.23.0.115
cidr: 172.23.0.0/24
name: subnet1
vlan: 23
routes:
- destination: 172.24.0.0/16
nexthop: 172.23.0.150
mtu: 1500
vlan: 23
base_iface: enp7s0
Expand Down
24 changes: 23 additions & 1 deletion examples/dt/bgp/bgp_dt01/edpm/computes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ data:
edpm_frr_bgp_uplinks:
- nic3
- nic4
edpm_ovn_bridge_mappings:
- "datacentre:br-ex"
- "octavia:br-octavia"
timesync_ntp_servers:
- hostname: pool.ntp.org
# conntrack is necessary for some tobiko tests
Expand Down Expand Up @@ -64,7 +67,7 @@ data:
# force the MAC address of the bridge to this interface
primary: true
{% for network in nodeset_networks %}
{% if not network.lower().startswith('bgp') %}
{% if not network.lower().startswith('bgp') and network.lower() != 'octavia' %}
- type: vlan
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
Expand All @@ -78,6 +81,25 @@ data:
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% endfor %}
- type: ovs_bridge
name: br-octavia
use_dhcp: false
# dns_servers: {{ ctlplane_dns_nameservers }}
# domain: {{ dns_search_domains }}
addresses: []
routes: []
members:
- type: vlan
mtu: {{ lookup('vars', 'octavia_mtu') }}
vlan_id: {{ lookup('vars', 'octavia_vlan_id') }}
addresses:
- ip_netmask: >-
{{
lookup('vars', 'octavia_ip')
}}/{{
lookup('vars', 'octavia_cidr')
}}
routes: {{ lookup('vars', 'octavia_host_routes') }}
- type: interface
name: nic3
use_dhcp: false
Expand Down
24 changes: 23 additions & 1 deletion examples/dt/bgp/bgp_dt01/edpm/networkers/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ data:
edpm_frr_bgp_uplinks:
- nic3
- nic4
edpm_ovn_bridge_mappings:
- "datacentre:br-ex"
- "octavia:br-octavia"
timesync_ntp_servers:
- hostname: pool.ntp.org
# conntrack is necessary for some tobiko tests
Expand Down Expand Up @@ -66,7 +69,7 @@ data:
# force the MAC address of the bridge to this interface
primary: true
{% for network in nodeset_networks %}
{% if not network.lower().startswith('bgp') %}
{% if not network.lower().startswith('bgp') and network.lower() != 'octavia' %}
- type: vlan
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
Expand All @@ -80,6 +83,25 @@ data:
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% endfor %}
- type: ovs_bridge
name: br-octavia
use_dhcp: false
# dns_servers: {{ ctlplane_dns_nameservers }}
# domain: {{ dns_search_domains }}
addresses: []
routes: []
members:
- type: vlan
mtu: {{ lookup('vars', 'octavia_mtu') }}
vlan_id: {{ lookup('vars', 'octavia_vlan_id') }}
addresses:
- ip_netmask: >-
{{
lookup('vars', 'octavia_ip')
}}/{{
lookup('vars', 'octavia_cidr')
}}
routes: {{ lookup('vars', 'octavia_host_routes') }}
- type: interface
name: nic3
use_dhcp: false
Expand Down
14 changes: 13 additions & 1 deletion examples/dt/bgp/control-plane/nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,19 @@ data:
}
}
octavia:
dnsDomain: octavia.openstack.lab
dnsDomain: octavia.example.com
subnets:
- allocationRanges:
- end: 172.23.0.250
# we need some extra offset to avoid overlapping with octavia
# controlplane IPs
start: 172.23.0.115
cidr: 172.23.0.0/24
name: subnet1
vlan: 23
routes:
- destination: 172.24.0.0/16
nexthop: 172.23.0.150
mtu: 1500
vlan: 23
base_iface: enp8s0
Expand Down
7 changes: 5 additions & 2 deletions examples/dt/uni01alpha/control-plane/service-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ data:
enabled: true
amphoraImageContainerImage: quay.io/gthiemonge/octavia-amphora-image
apacheContainerImage: registry.redhat.io/ubi9/httpd-24:latest
availabilityZones:
- zone-1
lbMgmtNetwork:
availabilityZones:
- zone-1
createDefaultLbMgmtNetwork: true
manageLbMgmtNetworks: true
octaviaAPI:
networkAttachments:
- internalapi
Expand Down

0 comments on commit 4c1ad69

Please sign in to comment.