Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions automation/vars/multi-namespace-skmo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vas:
build_output: namespace.yaml

- name: nncp-configuration # stage 1
path: examples/va/multi-namespace/control-plane/networking/nncp
path: examples/va/multi-namespace-skmo/control-plane/networking/nncp
wait_conditions:
# We don't wait for these NNCPs at this stage, because we'll wait for
# both namespaces in the next stage so that they can deploy in parallel
Expand All @@ -26,24 +26,24 @@ vas:
--timeout=5m
values:
- name: network-values
src_file: values.yaml
src_file: ../../../../multi-namespace/control-plane/networking/nncp/values.yaml
build_output: nncp.yaml

- name: nncp-configuration2 # stage 2
path: examples/va/multi-namespace/control-plane2/networking/nncp
path: examples/va/multi-namespace-skmo/control-plane2/networking/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
oc -n openstack2 wait nncp
-l osp/nncm-config-type=standard
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
--timeout=5m
values:
- name: network-values2
src_file: values.yaml
src_file: ../../../../multi-namespace/control-plane2/networking/nncp/values.yaml
build_output: nncp2.yaml

- name: network-configuration # stage 3
path: examples/va/multi-namespace/control-plane/networking
path: examples/va/multi-namespace-skmo/control-plane/networking
wait_conditions:
- >-
oc -n metallb-system wait pod
Expand All @@ -52,11 +52,11 @@ vas:
--timeout=5m
values:
- name: network-values
src_file: nncp/values.yaml
src_file: ../../../multi-namespace/control-plane/networking/nncp/values.yaml
build_output: network.yaml

- name: network-configuration2 # stage 4
path: examples/va/multi-namespace/control-plane2/networking
path: examples/va/multi-namespace-skmo/control-plane2/networking
wait_conditions:
- >-
oc -n metallb-system wait pod
Expand All @@ -65,7 +65,7 @@ vas:
--timeout=5m
values:
- name: network-values2
src_file: nncp/values.yaml
src_file: ../../../multi-namespace/control-plane2/networking/nncp/values.yaml
build_output: network2.yaml

- pre_stage_run: # stage 5
Expand Down Expand Up @@ -222,7 +222,7 @@ vas:
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"

- name: edpm-nodeset # stage 7
path: examples/va/multi-namespace/edpm/nodeset
path: examples/va/multi-namespace-skmo/edpm/nodeset
wait_conditions:
# We don't wait for this namespace's OpenStackDataPlaneNodeSet at
# this stage, because we'll wait for both namespaces in the next
Expand All @@ -233,7 +233,7 @@ vas:
--timeout=5m
values:
- name: edpm-nodeset-values
src_file: values.yaml
src_file: ../../../multi-namespace/edpm/nodeset/values.yaml
build_output: nodeset.yaml

- pre_stage_run: # stage 8
Expand All @@ -242,7 +242,7 @@ vas:
source: "../../playbooks/multi-namespace/ns2_osdp_services.yaml"
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
name: edpm-nodeset2
path: examples/va/multi-namespace/edpm2/nodeset
path: examples/va/multi-namespace-skmo/edpm2/nodeset
wait_conditions:
- >-
oc -n openstack wait
Expand All @@ -254,10 +254,15 @@ vas:
--timeout=10m
values:
- name: edpm-nodeset2-values
src_file: values.yaml
src_file: ../../../multi-namespace/edpm2/nodeset/values.yaml
build_output: nodeset2.yaml

- name: edpm-deployment # stage 9
- pre_stage_run: # stage 9
- name: Recreate EDPM deployments when NodeSet config hash drifted
type: playbook
source: "skmo/recreate-edpm-deployment-if-stale.yaml"
inventory: "${HOME}/ci-framework-data/artifacts/zuul_inventory.yml"
name: edpm-deployment
path: examples/va/multi-namespace/edpm
wait_conditions:
# We don't wait for this namespace's OpenStackDataPlaneDeployment at
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# SKMO uses linux-bridge ospbr for ctlplane (NNCP). MetalLB must announce VIPs on
# the bridge, not the raw NIC (enp7s0), or EDPM nodes cannot reach dnsmasq UDP/53.
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patches:
- target:
group: metallb.io
kind: L2Advertisement
name: ctlplane
patch: |-
- op: replace
path: /spec/interfaces/0
value: ospbr
- target:
group: metallb.io
kind: L2Advertisement
name: ctlplane2
patch: |-
- op: replace
path: /spec/interfaces/0
value: ospbr2
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: edpm-nodeset-values
data:
nodeset:
ansible:
ansibleVars:
edpm_ovn_bridge_mappings:
- "datacentre:br-ex"
- "octavia:octbr"
edpm_network_config_template: |
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in nodeset_networks %}
{% set _ = mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) %}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
- type: interface
name: nic1
use_dhcp: true
mtu: {{ min_viable_mtu }}
- 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 nodeset_networks %}
- 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_bridge
name: octbr
mtu: {{ min_viable_mtu }}
use_dhcp: false
members:
- type: vlan
mtu: {{ min_viable_mtu }}
vlan_id: 23
device: nic2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# OVN Octavia compute bridge overlay for EDPM nodesets.
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patches:
- target:
kind: ConfigMap
name: edpm-nodeset-values
path: edpm-octavia-ansible-vars.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Octavia replacement blocks in this file and examples/va/multi-namespace-skmo/control-plane2/kustomization.yaml are identical. While not a blocking issue, it might be cleaner if that config could be extracted to a higher-level common kustomization.yaml that both sub-dirs could then include as a resource/component. In fact, it could be placed in va/multi-namespace-skmo and moved out of examples entirely, which would make the inclusion cleaner too.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ kind: Component

components:
- ../../multi-namespace/control-plane
- ../components/metallb-ctlplane-bridge
- ../../../../va/multi-namespace-skmo/octavia-controlplane

resources:
- networking/octavia-netattach.yaml
- octavia-ca-passphrase.yaml

patches:
- target:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../multi-namespace/control-plane/networking
- octavia-netattach.yaml

components:
- ../../components/metallb-ctlplane-bridge
- ../../../../../va/multi-namespace-skmo/networking-octavia
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# ci_gen_kustomize_values writes env-specific network-values to the base
# values.yaml before build (see automation vars src_file).
resources:
- ../../../../multi-namespace/control-plane/networking/nncp

components:
- ../../../../../../va/multi-namespace-skmo/octavia-network-values

# Octavia NNCP patches for SKMO. Select by osp/nncp-node label so patches apply
# after lib/nncp-single-nic renames node-0 -> ostest-master-0.
patches:
- target:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-0
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia vlan host interface
name: octavia
state: up
type: vlan
vlan:
base-iface: _replaced_
id: _replaced_
- target:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-0
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia bridge
mtu: 1500
name: octbr
type: linux-bridge
bridge:
options:
stp:
enabled: false
port:
- name: octavia
- target:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-1
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia vlan host interface
name: octavia
state: up
type: vlan
vlan:
base-iface: _replaced_
id: _replaced_
- target:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-1
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia bridge
mtu: 1500
name: octbr
type: linux-bridge
bridge:
options:
stp:
enabled: false
port:
- name: octavia
- target:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-2
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia vlan host interface
name: octavia
state: up
type: vlan
vlan:
base-iface: _replaced_
id: _replaced_
- target:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-2
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia bridge
mtu: 1500
name: octbr
type: linux-bridge
bridge:
options:
stp:
enabled: false
port:
- name: octavia

replacements:
- source:
kind: ConfigMap
name: octavia-network-values
fieldPath: data.octavia.base_iface
targets:
- select:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-0
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
- source:
kind: ConfigMap
name: octavia-network-values
fieldPath: data.octavia.vlan
targets:
- select:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-0
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.id
- source:
kind: ConfigMap
name: octavia-network-values
fieldPath: data.octavia.base_iface
targets:
- select:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-1
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
- source:
kind: ConfigMap
name: octavia-network-values
fieldPath: data.octavia.vlan
targets:
- select:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-1
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.id
- source:
kind: ConfigMap
name: octavia-network-values
fieldPath: data.octavia.base_iface
targets:
- select:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-2
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface
- source:
kind: ConfigMap
name: octavia-network-values
fieldPath: data.octavia.vlan
targets:
- select:
kind: NodeNetworkConfigurationPolicy
labelSelector: osp/nncp-node=node-2
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.id
Loading
Loading