Skip to content

Commit

Permalink
[BGP] fix ansibleVars indentation for dataplane templates
Browse files Browse the repository at this point in the history
The ansibleVars per-node section from the values.yaml generated
to create nodeset CRs was wrongly indentated (it should be nested to
ansible section).
This patch also uses ansibleVars from the architecure repo instead of
harcoding them on the templates.
  • Loading branch information
eduolivares authored and openshift-merge-bot[bot] committed Jul 11, 2024
1 parent 49557ab commit 165952f
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ data:
nodes:
{% for instance in instances_names %}
{{ instance }}:
ansibleVars:
{% set rack_number = instance.split('-')[1] %}
{% set peer_suffix = 1 if 'compute' in instance else 5 %}
edpm_ovn_bgp_agent_local_ovn_peer_ips:
- 100.64.{{ rack_number }}.{{ peer_suffix }}
- 100.65.{{ rack_number }}.{{ peer_suffix }}
edpm_frr_bgp_peers:
- 100.64.{{ rack_number }}.{{ peer_suffix }}
- 100.65.{{ rack_number }}.{{ peer_suffix }}
ansible:
host: {{ cifmw_networking_env_definition.instances[instance].networks.ctlplane.ip_v4 }}
{% if original_content.data.nodeset.nodes['edpm-' ~ node_type ~ '-' ~ loop.index0].ansible.ansibleVars is defined %}
ansibleVars: {{ original_content.data.nodeset.nodes['edpm-' ~ node_type ~ '-' ~ loop.index0].ansible.ansibleVars }}
{% endif %}
hostName: {{ instance }}
networks:
{% for net in cifmw_networking_env_definition.instances[instance].networks.keys() %}
Expand All @@ -54,6 +48,8 @@ data:
{% endif %}
{% endif %}
{% endfor %}
{% set rack_number = instance.split('-')[1] %}
{% set peer_suffix = 1 if 'compute' in instance else 5 %}
- name: BgpNet0
subnetName: subnet{{ rack_number }}
fixedIP: 100.64.{{ rack_number }}.{{ peer_suffix + 1 }}
Expand Down

0 comments on commit 165952f

Please sign in to comment.